/* ==========================================================================
   RB Video — Одиночный видеоблок
   ========================================================================== */

:root {
    --rb-video-block-margin: 24px auto;
    --rb-video-block-padding: 0;
    --rb-video-block-border: none;
    --rb-video-block-border-radius: 0;
    --rb-video-block-color: inherit;
    --rb-video-block-background: none;
    --rb-video-block-box-shadow: none;
    --rb-video-header-font-size: 1.25em;
    --rb-video-header-font-weight: 600;
    --rb-video-header-color: inherit;
    --rb-video-link-width: auto;
    --rb-video-link-height: auto;
    --rb-video-link-padding: 6px 10px;
    --rb-video-link-icon-size: clamp(22px, 3.5vw, 34px);
    --rb-video-link-color: inherit;
    --rb-video-link-background-color: hsla(220, 10%, 95%, 0.4);
    --rb-video-link-hover-background-color: hsla(220, 10%, 90%, 0.55);
    --rb-video-link-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    --rb-video-link-border-radius: 10px;
    --rb-video-player-icon-size: clamp(44px, 9vw, 60px);
    --rb-video-embed-border-radius: 10px;
}

/* Base */
.rb-video.rb-video {
    background: var(--rb-video-block-background);
    border: var(--rb-video-block-border);
    border-radius: var(--rb-video-block-border-radius);
    box-shadow: var(--rb-video-block-box-shadow);
    color: var(--rb-video-block-color);
    line-height: 1.5;
    margin: var(--rb-video-block-margin);
    padding: var(--rb-video-block-padding);
    position: relative;
}

.rb-video,
.rb-video *,
.rb-video *::before,
.rb-video *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

.rb-video a {
    text-decoration: none;
    color: inherit;
}

.rb-video svg {
    display: block;
    max-width: 100%;
}

.rb-video img {
    display: block;
    max-width: 100%;
    height: auto;
}

.rb-video__inner {
    position: relative;
}

.rb-video__inner,
.rb-video__body,
.rb-video__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rb-video__body {
    position: relative;
}

/* Header */
.rb-video__header {
    color: var(--rb-video-header-color);
    font-size: var(--rb-video-header-font-size);
    font-weight: var(--rb-video-header-font-weight);
}

.rb-video__description {
    font-size: 0.9em;
    line-height: 1.6;
    opacity: 0.85;
}

/* Poster */
.rb-video__poster {
    border-radius: var(--rb-video-embed-border-radius);
    cursor: pointer;
    height: 100%;
    object-fit: cover;
    transition: filter 0.25s ease;
    width: 100%;
}

.rb-video__poster:hover {
    filter: brightness(1.05);
}

/* Play icon */
.rb-video__play-icon {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.15), transparent 65%);
    color: #fff;
    height: var(--rb-video-player-icon-size);
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: var(--rb-video-player-icon-size);
    z-index: 10;
}

.rb-video__play-icon svg {
    filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.4));
    height: 100%;
    width: 100%;
    transition: transform 0.25s ease;
}

/* Links */
.rb-video__links {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    position: relative;
    scrollbar-width: none;
}

.rb-video__links::-webkit-scrollbar {
    display: none;
}

.rb-video .rb-video__links .rb-video__link {
    align-items: center;
    border: none;
    border-radius: var(--rb-video-link-border-radius);
    box-shadow: var(--rb-video-link-box-shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: clamp(11px, 2vw, 13px);
    gap: 6px;
    height: var(--rb-video-link-height);
    justify-content: center;
    line-height: 1.3;
    padding: var(--rb-video-link-padding);
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
    width: var(--rb-video-link-width);
}

.rb-video .rb-video__links .rb-video__link,
.rb-video .rb-video__links .rb-video__link:visited {
    background-color: var(--rb-video-link-background-color);
    color: var(--rb-video-link-color);
}

.rb-video .rb-video__links .rb-video__link:hover {
    background-color: var(--rb-video-link-hover-background-color);
    color: var(--rb-video-link-hover-color, var(--rb-video-link-color));
}

.rb-video .rb-video__links .rb-video__link:focus {
    outline: none;
}

.rb-video .rb-video__links .rb-video__link.rb-video__link--current {
    box-shadow: inset 0 0 0 1.5px #3366ee;
}

/* Обёртка иконки */
.rb-video .rb-video__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--rb-video-link-icon-size);
    height: var(--rb-video-link-icon-size);
    flex-shrink: 0;
}

.rb-video .rb-video__link-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

/* Embed container */
.rb-video__embed-container {
    display: none;
    position: relative;
}

.rb-video--has-poster .rb-video__embed-container {
    display: block;
}

.rb-video__embed {
    background-color: rgba(30, 30, 30, 0.06);
    border-radius: var(--rb-video-embed-border-radius);
    height: 0;
    padding-top: 56.25%;
    position: relative;
    width: 100%;
}

.rb-video__embed:hover .rb-video__play-icon svg {
    transform: scale(1.15);
}

.rb-video__embed iframe,
.rb-video__embed img,
.rb-video__embed video {
    border-radius: var(--rb-video-embed-border-radius);
    bottom: 0;
    height: 100% !important;
    left: 0;
    max-width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 100% !important;
}

/* Loader */
.rb-video__loader {
    animation: rb-video-spin 0.8s linear infinite;
    border: 5px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    border-top-color: #2563eb;
    height: 48px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
}

@keyframes rb-video-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Пресеты
   ========================================================================== */

/* Card */
.rb-video--style-card {
    --rb-video-block-padding: clamp(18px, 2vw, 36px);
    --rb-video-block-border: 1px solid rgba(0, 0, 0, 0.06);
    --rb-video-block-box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08), 0 8px 48px rgba(37, 99, 235, 0.06);
    --rb-video-block-border-radius: 14px;
    --rb-video-block-background: #fff;
    --rb-video-link-width: 104px;
    --rb-video-link-height: 76px;
    --rb-video-link-padding: 0 10px;
}

.rb-video--style-card.rb-video--has-poster .rb-video__links--count-1 {
    display: none;
}

/* Minimal */
.rb-video--style-minimal {
    --rb-video-link-width: 104px;
    --rb-video-link-height: 76px;
    --rb-video-link-padding: 0 10px;
}

.rb-video--style-minimal.rb-video--has-poster .rb-video__links--count-1 {
    display: none;
}

/* Inline */
.rb-video--style-inline {
    --rb-video-link-padding: 8px 14px 8px 10px;
    --rb-video-link-icon-size: clamp(18px, 3vw, 22px);
}

.rb-video--style-inline.rb-video--has-poster .rb-video__links--count-1 {
    display: none;
}

.rb-video--style-inline .rb-video__links {
    flex-wrap: wrap;
}

.rb-video--style-inline .rb-video__links .rb-video__link {
    flex-direction: row;
}

/* Frost */
.rb-video--style-frost {
    --rb-video-block-background: #f0f7ff;
    --rb-video-block-border-radius: 14px;
    --rb-video-block-padding: clamp(18px, 2vw, 36px);
    --rb-video-block-border: 1px solid #c8e0f8;
    --rb-video-link-icon-size: clamp(18px, 3vw, 26px);
    --rb-video-link-padding: 10px 18px;
    --rb-video-link-background-color: #fff;
    --rb-video-link-hover-background-color: #fff;
    --rb-video-link-box-shadow: inset 0 0 0 1px #c8e0f8;
}

.rb-video--style-frost .rb-video__link {
    flex-direction: row;
    overflow: hidden;
    position: relative;
}

.rb-video--style-frost .rb-video__link::after {
    background-color: var(--rb-video-link-color);
    border-radius: 2px;
    bottom: -3px;
    content: "";
    display: block;
    height: 4px;
    left: 25%;
    position: absolute;
    transition: bottom 0.2s ease;
    width: 50%;
}

.rb-video--style-frost .rb-video__link:hover::after {
    bottom: 0;
}

/* Overlay */
.rb-video--style-overlay {
    --rb-video-block-border-radius: 14px;
    --rb-video-link-width: 104px;
    --rb-video-link-height: 76px;
    --rb-video-link-padding: 0 10px;
    --rb-video-embed-border-radius: 14px;
}

.rb-video--style-overlay .rb-video__play-icon {
    display: none;
}

.rb-video--style-overlay .rb-video__body {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.02), #0f172a),
                radial-gradient(ellipse at 20% 10%, rgba(56, 189, 248, 0.4), transparent 55%),
                radial-gradient(ellipse at 80% 15%, rgba(251, 191, 36, 0.35), transparent 50%),
                radial-gradient(ellipse at 70% 60%, rgba(244, 114, 182, 0.2), transparent 50%),
                radial-gradient(ellipse at 30% 70%, rgba(52, 211, 153, 0.35), transparent 55%);
    border-radius: var(--rb-video-block-border-radius);
}

.rb-video--style-overlay .rb-video__links {
    padding: 0 18px;
}

.rb-video--style-overlay .rb-video__links .rb-video__link {
    background: #fff;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.25);
}

.rb-video--style-overlay .rb-video__links .rb-video__link:hover {
    background: #fff;
}

.rb-video--style-overlay.rb-video--playing .rb-video__links {
    padding: 18px 18px 0;
}

.rb-video--style-overlay:not(.rb-video--playing) .rb-video__links {
    height: 100%;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 50;
}

.rb-video--style-overlay:not(.rb-video--playing) .rb-video__links:not(.rb-video__links--count-1) .rb-video__link:hover {
    transform: translateY(-4px);
}

.rb-video--style-overlay:not(.rb-video--playing) .rb-video__embed-container::before {
    background: rgba(15, 23, 42, 0.35);
    border-radius: var(--rb-video-embed-border-radius);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 20;
}

.rb-video--style-overlay .rb-video__embed-container {
    display: block;
}

.rb-video--style-overlay.rb-video--playing .rb-video__links--count-1 {
    display: none;
}

/* Aurora */
.rb-video--style-aurora {
    --rb-video-block-padding: clamp(18px, 2vw, 36px);
    --rb-video-block-border-radius: 14px;
    --rb-video-block-background: #818cf8;
    --rb-video-block-color: #fff;
    --rb-video-link-padding: 10px;
    --rb-video-link-background-color: rgba(255, 255, 255, 0.95);
    --rb-video-link-hover-background-color: #fff;
    --rb-video-link-box-shadow: none;
    --rb-video-link-border-radius: 10px;
    --rb-video-embed-border-radius: 10px;
    background-image:
        radial-gradient(at 30% 40%, rgba(251, 146, 60, 0.6) 0, transparent 55%),
        radial-gradient(at 90% 10%, rgba(239, 68, 68, 0.5), transparent 60%),
        radial-gradient(at 75% 55%, rgba(236, 72, 153, 0.4) 0, transparent 50%),
        radial-gradient(at 80% 90%, rgba(99, 102, 241, 0.7), transparent 55%),
        radial-gradient(at 10% 15%, rgba(59, 130, 246, 0.5), transparent 60%);
}

.rb-video--style-aurora .rb-video__link {
    display: flex;
    flex: 1 0 0;
}

/* Chips */
.rb-video--style-chips {
    --rb-video-link-padding: 8px 18px;
    --rb-video-link-border-radius: 32px;
    --rb-video-link-icon-size: clamp(18px, 3vw, 22px);
}

.rb-video--style-chips .rb-video__links {
    flex-wrap: wrap;
}

.rb-video--style-chips .rb-video__links .rb-video__link {
    background-color: var(--rb-video-link-color);
    color: #fff;
    flex-direction: row;
}

.rb-video--style-chips .rb-video__links .rb-video__link:hover {
    background-color: var(--rb-video-link-color);
    color: #fff;
    filter: brightness(1.1);
}

