﻿/* ============================================================
   REELS - CARRUSEL
   Mantiene el comportamiento visual de la v3 que ya quedó bien.
============================================================ */

.rbs-reels-section {
    position: relative;
    color: #fff;
}

.rbs-reels-message {
    margin: 0 56px 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #fff;
}

.rbs-reels-error {
    color: #ffd6d6;
}

.rbs-reels-carousel-wrap {
    position: relative;
    padding-top: 0;
    padding-bottom: 44px;
}

.rbs-reel-card {
    cursor: pointer;
    user-select: none;
}

.rbs-reel-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 16px;
    background: #08152b;
    border: 1px solid rgba(255,255,255,.075);
    box-shadow: 0 16px 34px rgba(0,0,0,.26);
}

.rbs-reel-poster,
.rbs-reel-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rbs-reel-poster {
    z-index: 1;
}

.rbs-reel-preview {
    z-index: 2;
    opacity: 0;
    transition: opacity .22s ease;
    pointer-events: none;
}

.rbs-reel-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(0,0,0,.02) 0%, rgba(0,0,0,.12) 48%, rgba(0,0,0,.82) 100%);
}

.rbs-reel-info {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 5;
}

    .rbs-reel-info h3 {
        margin: 0 0 10px;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.22;
        color: #fff;
        text-shadow: 0 2px 10px rgba(0,0,0,.38);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.rbs-reel-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,.84);
}

    .rbs-reel-metric i {
        font-size: 14px;
    }

.rbs-reels-nav-prev,
.rbs-reels-nav-next {
    top: 50%;
    z-index: 30;
}

#owl-carousel-component-instagram-reels .owl-dots,
#owl-carousel-component-instagram-reels .owl-nav {
    display: none !important;
}

/* ============================================================
   REELS MODAL FINAL - PREMIUM SOBRIO
   Fondo semitransparente + blur para sentirse dentro del sitio.
============================================================ */

body.reels-modal-open {
    overflow: hidden !important;
}

.rbs-reels-full-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    color: #fff;
    overflow: hidden;
    background: radial-gradient(circle at 52% 46%, rgba(255, 204, 0, .075) 0%, rgba(255, 204, 0, .025) 20%, transparent 42%), radial-gradient(circle at 48% 48%, rgba(30, 77, 130, .22) 0%, rgba(3, 13, 31, .48) 48%, rgba(1, 6, 17, .72) 100%), rgba(1, 8, 22, .72);
    backdrop-filter: blur(10px) saturate(118%);
    -webkit-backdrop-filter: blur(10px) saturate(118%);
}

    .rbs-reels-full-modal::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(0,0,0,.28) 0%, transparent 24%, transparent 72%, rgba(0,0,0,.24) 100%), radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,.26) 78%);
    }

.rbs-reels-modal-shell {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 100svh;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(330px, 430px) minmax(360px, 520px) minmax(90px, 160px);
    align-items: center;
    justify-content: center;
    gap: clamp(38px, 5vw, 86px);
    padding: 0 clamp(42px, 6vw, 96px);
}

.rbs-reels-modal-close {
    position: absolute;
    top: 28px;
    right: 34px;
    z-index: 10;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(3, 11, 28, .38);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

    .rbs-reels-modal-close:hover {
        transform: scale(1.04);
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.38);
    }

/* =========================
   Panel izquierdo editorial
========================= */

.rbs-reels-modal-info {
    width: min(430px, 100%);
    color: #fff;
}

.rbs-reels-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    text-decoration: none;
    margin-bottom: 28px;
}

    .rbs-reels-profile:hover {
        color: #fff;
        text-decoration: none;
    }

.rbs-reels-profile-avatar {
    width: 76px;
    height: 76px;
    min-width: 76px;
    border-radius: 50%;
    background: #fff;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255,204,0,.54), 0 16px 36px rgba(0,0,0,.32), 0 0 26px rgba(255,204,0,.16);
}

    .rbs-reels-profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .rbs-reels-profile-avatar i {
        color: #07142d;
        font-size: 36px;
    }

.rbs-reels-profile-text h3,
.rbs-reels-profile-text .txt3,
.rbs-reels-profile-text txt3 {
    display: block;
    margin: 0;
    color: #fff;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.rbs-reels-profile-text txt1 {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.72);
}

.rbs-reels-info-accent {
    width: 56px;
    height: 3px;
    margin: 0 0 26px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffcc00, rgba(255,204,0,.15));
    box-shadow: 0 0 12px rgba(255,204,0,.34);
}

.rbs-reels-copy {
    max-width: 430px;
}

.rbs-reels-modal-title {
    display: block;
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 2.45vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.025em;
    text-shadow: 0 4px 24px rgba(0,0,0,.44);
}

.rbs-reels-hashtags {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 22px;
}

    .rbs-reels-hashtags txt1 {
        color: #ffcc00;
        font-weight: 700;
    }

.rbs-reels-modal-description {
    display: block;
    margin: 24px 0 0;
    max-height: 118px;
    overflow: auto;
    padding-right: 8px;
    color: rgba(255,255,255,.82);
    font-size: clamp(14px, .92vw, 17px);
    font-weight: 400;
    line-height: 1.58;
}

    .rbs-reels-modal-description::-webkit-scrollbar {
        width: 5px;
    }

    .rbs-reels-modal-description::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.22);
        border-radius: 999px;
    }

.rbs-reels-modal-metrics {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

@media (max-width: 991px) {
    .rbs-reels-modal-metrics {
        display: none !important;
    }
}

.rbs-reels-modal-metric {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .rbs-reels-modal-metric + .rbs-reels-modal-metric {
        padding-left: 26px;
        border-left: 1px solid rgba(255,255,255,.22);
    }

.rbs-reels-modal-metric-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 50%;
    border: 2px solid rgba(255,204,0,.78);
    color: #ffcc00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255,204,0,.07);
}

.rbs-reels-modal-metric h2,
.rbs-reels-modal-metric txt3 {
    display: block;
    margin: 0;
    color: #fff;
    font-weight: 800;
    line-height: 1.05;
}

.rbs-reels-modal-metric txt1 {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.70);
}

.rbs-reels-auto-mode {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

    .rbs-reels-auto-mode h3,
    .rbs-reels-auto-mode txt3 {
        display: block;
        margin: 0;
        color: #fff;
        font-weight: 800;
        line-height: 1.1;
    }

    .rbs-reels-auto-mode txt1 {
        display: block;
        margin-top: 6px;
        color: rgba(255,255,255,.70);
    }

.rbs-reels-auto-switch {
    position: relative;
    width: 48px;
    height: 26px;
    min-width: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.12);
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.22);
}

    .rbs-reels-auto-switch b {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: rgba(255,255,255,.86);
        transition: left .18s ease, background .18s ease;
    }

    .rbs-reels-auto-switch.active {
        border-color: rgba(255,204,0,.64);
        background: rgba(255,204,0,.30);
    }

        .rbs-reels-auto-switch.active b {
            left: 25px;
            background: #fff;
            box-shadow: 0 0 12px rgba(255,204,0,.36);
        }

/* =========================
   Video central
========================= */

.rbs-reels-modal-video-zone {
    height: 100svh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rbs-reels-video-frame {
    position: relative;
    height: min(88svh, 860px);
    width: calc(min(88svh, 860px) * .5625);
    max-width: min(500px, 33vw);
    min-width: 360px;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
/*    border: 1px solid rgba(255,204,0,.46);
    box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 24px rgba(255,204,0,.10);*/
}

    .rbs-reels-video-frame::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.28) 100%);
    }

.rbs-reels-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

.rbs-reels-sound-toggle {
    position: absolute;
    right: 18px;
    bottom: 44px;
    z-index: 8;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: rgba(0,0,0,.48);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(0,0,0,.30);
    cursor: pointer;
}

    .rbs-reels-sound-toggle i {
        font-size: 16px;
    }

/* Hitarea invisible que amplía el área de toque de la barra de progreso.
   La barra visual sigue siendo de 4px pero el área tocable es de 36px. */
.rbs-reels-progress-hitarea {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    padding: 16px 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.rbs-reels-progress {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,.34);
    overflow: visible;
    transition: height .15s ease;
}

/* Al tocar/hover la hitarea, la barra crece un poco para dar feedback */
.rbs-reels-progress-hitarea:hover .rbs-reels-progress,
.rbs-reels-progress-hitarea:active .rbs-reels-progress {
    height: 6px;
}

    .rbs-reels-progress span {
        display: block;
        height: 100%;
        width: 0;
        border-radius: 999px;
        background: #ffcc00;
        transition: width .08s linear;
        position: relative;
    }

    /* Thumb (bolita) visible al hacer hover/seek */
    .rbs-reels-progress span::after {
        content: "";
        position: absolute;
        right: -6px;
        top: 50%;
        transform: translateY(-50%) scale(0);
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #ffcc00;
        box-shadow: 0 0 8px rgba(255,204,0,.54);
        transition: transform .15s ease;
    }

    .rbs-reels-progress-hitarea:hover .rbs-reels-progress span::after,
    .rbs-reels-progress-hitarea:active .rbs-reels-progress span::after {
        transform: translateY(-50%) scale(1);
    }

/* Quitar el time display en la posición anterior (ahora va dentro del hitarea) */

/* =========================
   Navegación derecha
========================= */

.rbs-reels-modal-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.rbs-reels-modal-nav-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(3,11,28,.28);
    color: #ffcc00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

    .rbs-reels-modal-nav-btn:hover {
        transform: scale(1.05);
        background: rgba(255,204,0,.08);
        border-color: rgba(255,204,0,.50);
    }

.rbs-reels-modal-nav-line {
    position: relative;
    width: 1px;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,.04), rgba(255,255,255,.34), rgba(255,255,255,.04));
}

    .rbs-reels-modal-nav-line span {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #ffcc00;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 18px rgba(255,204,0,.74);
    }

/* =========================
   Responsive
========================= */

@media (max-width: 1280px) {
    .rbs-reels-modal-shell {
        grid-template-columns: minmax(300px, 390px) minmax(340px, 480px) 90px;
        gap: 34px;
        padding: 0 34px;
    }

    .rbs-reels-video-frame {
        max-width: min(470px, 38vw);
    }

    .rbs-reels-modal-title {
        font-size: clamp(28px, 2.4vw, 40px);
    }
}

@media (max-width: 991px) {
    .rbs-reels-full-modal {
        overflow: hidden;
        background: rgba(1, 8, 22, .84);
    }

    .rbs-reels-modal-shell {
        display: block;
        width: 100vw;
        height: 100svh;
        min-height: 0;
        padding: 0;
    }

    .rbs-reels-modal-video-zone {
        width: 100vw;
        height: 100svh;
        min-height: 0;
    }

    .rbs-reels-video-frame {
        width: 100vw;
        height: 100svh;
        max-width: none;
        min-width: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .rbs-reels-modal-info {
        position: absolute;
        left: 16px;
        right: 78px;
        bottom: 30px;
        z-index: 12;
        width: auto;
        max-width: 560px;
        text-shadow: 0 2px 12px rgba(0,0,0,.72);
    }

    .rbs-reels-profile {
        gap: 12px;
        margin-bottom: 14px;
    }

    .rbs-reels-profile-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        padding: 5px;
    }

    .rbs-reels-info-accent {
        margin-bottom: 12px;
    }

    .rbs-reels-modal-title {
        font-size: 23px;
        line-height: 1.12;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .rbs-reels-hashtags {
        margin-top: 10px;
        gap: 10px;
    }

    .rbs-reels-modal-description {
        margin-top: 10px;
        max-height: 76px;
        font-size: 14px;
        line-height: 1.42;
    }

    .rbs-reels-modal-metrics {
        margin-top: 14px;
        gap: 14px;
    }

    .rbs-reels-modal-metric-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 14px;
        background: rgba(0,0,0,.34);
        backdrop-filter: blur(10px);
    }

    .rbs-reels-modal-metric + .rbs-reels-modal-metric {
        padding-left: 14px;
    }

    .rbs-reels-auto-mode {
        display: none;
    }

    .rbs-reels-modal-nav {
        position: absolute;
        z-index: 14;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .rbs-reels-modal-nav-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
        background: rgba(0,0,0,.28);
    }

    .rbs-reels-modal-nav-line {
        height: 88px;
    }

    .rbs-reels-modal-close {
        top: 18px;
        right: 18px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .rbs-reels-modal-info {
        left: 14px;
        right: 72px;
        bottom: 24px;
    }

    .rbs-reels-modal-title {
        font-size: 20px;
    }

    .rbs-reels-modal-description {
        display: none;
    }

    .rbs-reels-modal-metric:nth-child(n + 2) {
        display: none;
    }
}


/* ============================================================
   AJUSTE FINAL V8 - MÁS CERCANO A MAQUETA SOBRIA
   - Fondo semitransparente con sitio visible detrás
   - Sin franja opaca central
   - Tipografías más grandes
   - Glow del video más fino y elegante
============================================================ */

.rbs-reels-full-modal {
    background: rgba(2, 10, 28, 0.66) !important;
    backdrop-filter: blur(14px) saturate(112%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(112%) !important;
}

    .rbs-reels-full-modal::before {
        background: radial-gradient(circle at 50% 50%, rgba(31, 79, 134, 0.18) 0%, transparent 34%), linear-gradient(90deg, rgba(1, 10, 27, 0.28) 0%, rgba(1, 10, 27, 0.08) 18%, rgba(1, 10, 27, 0.08) 82%, rgba(1, 10, 27, 0.28) 100%) !important;
        opacity: 1 !important;
    }

    .rbs-reels-full-modal::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,.22) 82%);
        z-index: 1;
    }

.rbs-reels-modal-shell,
.rbs-reels-modal-video-zone,
.rbs-reels-modal-info,
.rbs-reels-modal-nav {
    background: transparent !important;
}

.rbs-reels-modal-shell {
    z-index: 2;
    grid-template-columns: minmax(380px, 470px) minmax(390px, 520px) minmax(90px, 150px) !important;
    gap: clamp(44px, 5vw, 78px) !important;
    padding: 24px clamp(44px, 6vw, 92px) !important;
}

.rbs-reels-modal-info {
    width: min(470px, 100%) !important;
    max-width: 470px !important;
}

.rbs-reels-profile {
    gap: 18px !important;
    margin-bottom: 30px !important;
}

.rbs-reels-profile-avatar {
    width: 78px !important;
    height: 78px !important;
    min-width: 78px !important;
    padding: 8px !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.72), 0 0 20px rgba(255, 204, 0, 0.16), 0 16px 34px rgba(0,0,0,.30) !important;
}

.rbs-reels-profile-text h3,
.rbs-reels-profile-text .txt3,
.rbs-reels-profile-text txt3 {
    font-size: clamp(18px, 1.12vw, 23px) !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
}

.rbs-reels-profile-text txt1 {
    font-size: clamp(14px, .9vw, 17px) !important;
    color: rgba(255,255,255,.76) !important;
}

.rbs-reels-info-accent {
    width: 56px !important;
    height: 3px !important;
    margin: 0 0 28px !important;
    background: linear-gradient(90deg, #ffcc00 0%, rgba(255,204,0,.16) 100%) !important;
    box-shadow: 0 0 9px rgba(255, 204, 0, 0.20) !important;
}

.rbs-reels-copy {
    max-width: 470px !important;
}

.rbs-reels-modal-title {
    font-size: clamp(34px, 1.85vw, 58px) !important;
/*    line-height: 1.05 !important;*/
    letter-spacing: -.032em !important;
    font-weight: 800 !important;
    text-shadow: 0 5px 24px rgba(0,0,0,.46) !important;
}

.rbs-reels-hashtags {
    gap: 20px !important;
    margin-top: 22px !important;
    margin-bottom: 0 !important;
}

    .rbs-reels-hashtags txt1 {
        font-size: clamp(14px, .9vw, 17px) !important;
        font-weight: 800 !important;
        color: #ffcc00 !important;
    }

.rbs-reels-modal-description {
    max-height: 145px !important;
    margin-top: 26px !important;
    padding-right: 8px !important;
    font-size: clamp(16px, 1.05vw, 20px) !important;
    line-height: 1.68 !important;
    color: rgba(255,255,255,.84) !important;
}

.rbs-reels-modal-metrics {
    margin-top: 34px !important;
    padding-top: 22px !important;
    padding-bottom: 22px !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
    gap: 30px !important;
}

.rbs-reels-modal-metric {
    gap: 14px !important;
    min-width: 155px !important;
}

    .rbs-reels-modal-metric + .rbs-reels-modal-metric {
        padding-left: 26px !important;
        border-left: 1px solid rgba(255,255,255,.18) !important;
    }

.rbs-reels-modal-metric-icon {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    font-size: 22px !important;
    border-color: rgba(255,204,0,.82) !important;
    background: rgba(255,204,0,.045) !important;
    box-shadow: 0 0 13px rgba(255,204,0,.09) !important;
}

.rbs-reels-modal-metric h2,
.rbs-reels-modal-metric txt3 {
    font-size: clamp(20px, 1.35vw, 28px) !important;
    line-height: 1 !important;
}

.rbs-reels-modal-metric txt1 {
    font-size: clamp(13px, .86vw, 16px) !important;
    color: rgba(255,255,255,.76) !important;
}

.rbs-reels-auto-mode {
    margin-top: 26px !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

    .rbs-reels-auto-mode h3,
    .rbs-reels-auto-mode txt3 {
        font-size: clamp(16px, 1vw, 19px) !important;
    }

    .rbs-reels-auto-mode txt1 {
        font-size: clamp(13px, .86vw, 16px) !important;
    }

.rbs-reels-auto-switch {
    width: 56px !important;
    height: 30px !important;
    min-width: 56px !important;
}

    .rbs-reels-auto-switch b {
        width: 22px !important;
        height: 22px !important;
    }

    .rbs-reels-auto-switch.active b {
        left: 29px !important;
        background: #fff !important;
    }

.rbs-reels-modal-video-zone {
    position: relative !important;
    min-height: 0 !important;
}

.rbs-reels-video-frame {
    height: min(86svh, 850px) !important;
    width: calc(min(86svh, 850px) * .5625) !important;
    max-width: min(500px, 34vw) !important;
    min-width: 390px !important;
/*    border-radius: 19px !important;
    border: 1px solid rgba(255, 204, 0, 0.62) !important;
    box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.08), 0 0 14px rgba(255, 204, 0, 0.06), 0 18px 52px rgba(0,0,0,.38) !important;*/
}

    .rbs-reels-video-frame::before {
        content: "";
        position: absolute;
        inset: -12px;
        z-index: 0;
        pointer-events: none;
        background: radial-gradient(circle at left center, rgba(255, 204, 0, 0.055) 0%, transparent 30%), radial-gradient(circle at right center, rgba(255, 204, 0, 0.055) 0%, transparent 30%);
        filter: blur(12px);
    }

    .rbs-reels-video-frame::after {
        z-index: 2 !important;
        background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.32) 100%) !important;
    }

.rbs-reels-video {
    position: relative !important;
    z-index: 1 !important;
}

.rbs-reels-sound-toggle {
    width: 48px !important;
    height: 48px !important;
    right: 18px !important;
    bottom: 46px !important;
    z-index: 5 !important;
    background: rgba(0,0,0,.40) !important;
}

/* rbs-reels-progress ahora vive dentro del hitarea, no necesita posición absoluta propia */


.rbs-reels-time {
    position: absolute;
    left: 20px;
    bottom: 42px;
    z-index: 5;
    color: rgba(255,255,255,.86);
    font-size: 14px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.rbs-reels-modal-nav-btn {
    width: 62px !important;
    height: 62px !important;
    border-color: rgba(255,255,255,.28) !important;
    background: rgba(3,11,28,.22) !important;
    font-size: 20px !important;
}

.rbs-reels-modal-nav-line {
    height: 168px !important;
}

    .rbs-reels-modal-nav-line span {
        width: 13px !important;
        height: 13px !important;
        box-shadow: 0 0 16px rgba(255,204,0,.52) !important;
    }

.rbs-reels-modal-close {
    background: rgba(3,11,28,.20) !important;
}

@media (max-width: 1280px) {
    .rbs-reels-modal-shell {
        grid-template-columns: minmax(330px, 410px) minmax(360px, 480px) 90px !important;
        gap: 34px !important;
        padding: 0 34px !important;
    }

    .rbs-reels-video-frame {
        min-width: 360px !important;
        max-width: min(470px, 38vw) !important;
    }

    .rbs-reels-modal-title {
        font-size: clamp(30px, 2.5vw, 42px) !important;
    }
}

@media (max-width: 991px) {
    .rbs-reels-full-modal {
        background: rgba(1, 8, 22, .84) !important;
    }

    .rbs-reels-video-frame {
        width: 100vw !important;
        height: 100svh !important;
        max-width: none !important;
        min-width: 0 !important;
        border-radius: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .rbs-reels-time {
        left: 14px;
        bottom: 36px;
        font-size: 12px;
    }
}


/* ============================================================
   AJUSTE FINAL V9 - MOBILE TIPO REEL NATIVO + OWL ESTABLE
   - En móvil: video full-screen tipo teléfono real
   - Se ocultan flechas y X del modal en móvil
   - Se navega por swipe vertical / rueda / teclado desde JS
   - Se reduce ruido visual en overlay móvil
============================================================ */

/* Evita franjas opacas de contenedores intermedios */
.rbs-reels-modal-shell,
.rbs-reels-modal-video-zone,
.rbs-reels-modal-info,
.rbs-reels-modal-nav {
    background: transparent !important;
}

/* Carrusel: evita espacios raros por overflow visible */
#owl-carousel-component-instagram-reels .owl-stage-outer {
    overflow: hidden !important;
}

#owl-carousel-component-instagram-reels .owl-stage {
    display: flex;
}

#owl-carousel-component-instagram-reels .owl-item {
    float: none;
}

@media (max-width: 991px) {
    body.reels-modal-open {
        overflow: hidden !important;
        touch-action: none;
    }

    .rbs-reels-full-modal {
        background: #000 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .rbs-reels-full-modal::before,
    .rbs-reels-full-modal::after {
        display: none !important;
    }

    .rbs-reels-modal-shell {
        display: block !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .rbs-reels-modal-video-zone {
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 0 !important;
        display: block !important;
        overflow: hidden !important;
    }

    .rbs-reels-video-frame {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        min-width: 0 !important;
        aspect-ratio: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    .rbs-reels-video-frame::before {
        display: none !important;
    }

    .rbs-reels-video-frame::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        z-index: 2 !important;
        pointer-events: none !important;
        background:
            linear-gradient(to bottom, rgba(0,0,0,.08) 0%, transparent 24%, transparent 50%, rgba(0,0,0,.82) 100%) !important;
    }

    .rbs-reels-video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* En móvil quitamos flechas y X como pediste */
    .rbs-reels-modal-close,
    .rbs-reels-modal-nav {
        display: none !important;
    }

    /* Info estilo Instagram/Shorts: overlay inferior, legible y sin tapar demasiado */
    .rbs-reels-modal-info {
        position: absolute !important;
        left: 18px !important;
        right: 18px !important;
        bottom: calc(58px + env(safe-area-inset-bottom)) !important;
        z-index: 8 !important;
        width: auto !important;
        max-width: none !important;
        color: #fff !important;
        text-shadow: 0 2px 12px rgba(0,0,0,.80) !important;
        pointer-events: none;
    }

    .rbs-reels-modal-info a,
    .rbs-reels-modal-info button {
        pointer-events: auto;
    }

    .rbs-reels-profile {
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    .rbs-reels-profile-avatar {
        width: 58px !important;
        height: 58px !important;
        min-width: 58px !important;
        padding: 5px !important;
        box-shadow: 0 0 0 2px rgba(255,204,0,.78), 0 10px 24px rgba(0,0,0,.34) !important;
    }

    .rbs-reels-profile-text h3,
    .rbs-reels-profile-text .txt3,
    .rbs-reels-profile-text txt3 {
        font-size: 16px !important;
        line-height: 1.15 !important;
        max-width: calc(100vw - 115px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .rbs-reels-profile-text txt1 {
        font-size: 13px !important;
        color: rgba(255,255,255,.82) !important;
    }

    .rbs-reels-info-accent {
        width: 42px !important;
        height: 3px !important;
        margin: 0 0 14px !important;
        box-shadow: 0 0 10px rgba(255,204,0,.34) !important;
    }

    .rbs-reels-copy {
        max-width: calc(100vw - 36px) !important;
    }

    .rbs-reels-modal-title {
        font-size: clamp(18px, 5.5vw, 26px) !important;
        line-height: 1.08 !important;
        letter-spacing: -.02em !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .rbs-reels-hashtags {
        margin-top: 12px !important;
        gap: 12px !important;
        max-height: 22px !important;
        overflow: hidden !important;
    }

    .rbs-reels-hashtags txt1 {
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    .rbs-reels-modal-description {
        display: none !important;
    }

    .rbs-reels-modal-metrics {
        margin-top: 16px !important;
        padding: 0 !important;
        border: 0 !important;
        gap: 18px !important;
        flex-wrap: nowrap !important;
    }

    .rbs-reels-modal-metric {
        min-width: auto !important;
        gap: 10px !important;
    }

    .rbs-reels-modal-metric + .rbs-reels-modal-metric {
        padding-left: 18px !important;
        border-left: 1px solid rgba(255,255,255,.22) !important;
    }

    .rbs-reels-modal-metric-icon {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 17px !important;
        background: rgba(0,0,0,.34) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }

    .rbs-reels-modal-metric h2,
    .rbs-reels-modal-metric txt3 {
        font-size: 17px !important;
        line-height: 1 !important;
    }

    .rbs-reels-modal-metric txt1 {
        font-size: 12px !important;
    }

    .rbs-reels-auto-mode {
        display: none !important;
    }

    .rbs-reels-sound-toggle {
        right: 16px !important;
        bottom: calc(42px + env(safe-area-inset-bottom)) !important;
        width: 48px !important;
        height: 48px !important;
        z-index: 10 !important;
        background: rgba(0,0,0,.42) !important;
    }

    .rbs-reels-progress-hitarea {
        padding: 14px 16px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .rbs-reels-progress {
        height: 3px !important;
    }

    .rbs-reels-time {
        left: 16px !important;
        bottom: calc(28px + env(safe-area-inset-bottom)) !important;
        z-index: 10 !important;
        font-size: 12px !important;
        color: rgba(255,255,255,.86) !important;
    }
}

@media (max-width: 576px) {
    .rbs-reels-modal-info {
        left: 14px !important;
        right: 14px !important;
        bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }

    .rbs-reels-profile-avatar {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
    }

    .rbs-reels-modal-title {
        font-size: clamp(14px, 4.2vw, 16px) !important;
        display: block !important;
        overflow: visible !important;
    }

    .rbs-reels-modal-metric:nth-child(n + 2) {
        display: flex !important;
    }
}


/* ============================================================
   AJUSTE V10 - DESCRIPCIÓN TIPO FACEBOOK / INSTAGRAM
   Ver más / Ver menos cuando la descripción es larga.
============================================================ */

.rbs-reels-modal-description-wrap {
    margin-top: 24px;
    max-width: 100%;
}

.rbs-reels-modal-description-wrap .rbs-reels-modal-description {
    display: inline;
    margin: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.rbs-reels-see-more {
    display: inline;
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.66);
    font-size: clamp(13px, .86vw, 16px);
    font-weight: 800;
    line-height: 1.4;
    cursor: pointer;
    vertical-align: baseline;
}

.rbs-reels-see-more:hover,
.rbs-reels-see-more:focus {
    color: #ffcc00;
    outline: none;
    text-decoration: none;
}

@media (max-width: 991px) {
    .rbs-reels-modal-description-wrap {
        margin-top: 10px;
        /* Contenedor inline para que descripción y "Ver más" fluyan juntos */
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: inline !important;
        font-size: 13px;
        line-height: 1.42;
        white-space: nowrap;
        overflow: hidden;
    }

    .rbs-reels-see-more {
        font-size: 13px;
        text-shadow: 0 2px 10px rgba(0,0,0,.65);
        white-space: nowrap;
    }

    .rbs-reels-modal-description.is-expanded {
        display: block !important;
        white-space: normal !important;
        max-height: 128px;
        overflow-y: auto;
        padding-right: 6px;
    }

    /* Cuando está expandida, el wrap vuelve a fluir normal */
    .rbs-reels-modal-description-wrap:has(.is-expanded) {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

@media (max-width: 576px) {
    .rbs-reels-modal-description-wrap {
        margin-top: 8px;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: inline;
        font-size: 13px;
        line-height: 1.35;
    }

    .rbs-reels-see-more {
        font-size: 13px;
        color: rgba(255,255,255,.78);
    }

    .rbs-reels-modal-description.is-expanded {
        display: block;
        max-height: 118px;
        overflow-y: auto;
    }
}


/* ============================================================
   AJUSTE FINAL V11 - DESCRIPCIÓN SIN DUPLICAR + VER MÁS MÓVIL
============================================================ */

.rbs-reels-modal-description-wrap {
    margin-top: 24px;
    max-width: 100%;
}

.rbs-reels-modal-description-wrap .rbs-reels-modal-description {
    display: inline !important;
    margin: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.rbs-reels-see-more {
    display: inline !important;
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.72);
    font-size: clamp(13px, .86vw, 16px);
    font-weight: 800;
    line-height: 1.4;
    cursor: pointer;
    vertical-align: baseline;
    text-shadow: 0 2px 10px rgba(0,0,0,.52);
}

.rbs-reels-see-more:hover,
.rbs-reels-see-more:focus {
    color: #ffcc00;
    outline: none;
    text-decoration: none;
}

.rbs-reels-mobile-description-sheet {
    display: none;
}

@media (max-width: 991px) {
    .rbs-reels-modal-description-wrap {
        margin-top: 8px !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: inline !important;
        font-size: 14px !important;
        line-height: 1.38 !important;
        color: rgba(255,255,255,.88) !important;
    }

    .rbs-reels-see-more {
        display: inline !important;
        font-size: 14px !important;
        color: #ffcc00 !important;
    }
}

@media (max-width: 576px) {
    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: inline !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .rbs-reels-modal-description.is-expanded {
        max-height: none !important;
        overflow: visible !important;
    }

    .rbs-reels-mobile-description-sheet {
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 82px;
        z-index: 40;
        display: block;
        max-height: 38svh;
        padding: 16px 16px 18px;
        border-radius: 18px;
        background: rgba(4, 12, 28, .88);
        border: 1px solid rgba(255,255,255,.14);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 18px 48px rgba(0,0,0,.42);
        overflow-y: auto;
        text-shadow: none;
    }

    .rbs-reels-mobile-description-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 10px;
    }

    .rbs-reels-mobile-description-header strong {
        color: #fff;
        font-size: 15px;
        font-weight: 800;
    }

    .rbs-reels-mobile-description-header button {
        padding: 0;
        border: 0;
        background: transparent;
        color: #ffcc00;
        font-size: 13px;
        font-weight: 800;
    }

    .rbs-reels-mobile-description-sheet p {
        margin: 0;
        color: rgba(255,255,255,.88);
        font-size: 14px;
        line-height: 1.45;
    }
}

/* ============================================================
   AJUSTE FINAL V12 - TÍTULO COMPLETO + LINKS EN DESCRIPCIÓN
   - El JS ya no corta el título.
   - La descripción conserva links.
   - Ver más aparece si el título o descripción no caben.
   - En móvil Ver más abre hoja inferior con título + hashtags + descripción.
============================================================ */

.rbs-reels-modal-title {
    overflow-wrap: anywhere;
}

.rbs-reels-modal-title:not(.is-expanded) {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rbs-reels-modal-title.is-expanded {
    display: block !important;
    overflow: visible !important;
}

.rbs-reels-modal-description-wrap {
    margin-top: 22px !important;
}

.rbs-reels-modal-description-wrap .rbs-reels-modal-description {
    display: inline !important;
    overflow-wrap: anywhere;
}

.rbs-reels-see-more {
    display: inline !important;
    margin-left: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #ffcc00 !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    vertical-align: baseline !important;
    text-shadow: 0 2px 10px rgba(0,0,0,.58) !important;
}

.rbs-reels-see-more:hover,
.rbs-reels-see-more:focus {
    color: #fff !important;
    outline: none !important;
    text-decoration: none !important;
}

.rbs-reels-mobile-description-sheet {
    display: none;
}

@media (max-width: 991px) {
    .rbs-reels-modal-title:not(.is-expanded) {
        -webkit-line-clamp: 3;
    }

    .rbs-reels-modal-description-wrap {
        margin-top: 10px !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: inline !important;
        font-size: 14px !important;
        line-height: 1.42 !important;
        color: rgba(255,255,255,.90) !important;
    }

    .rbs-reels-see-more {
        display: inline !important;
        font-size: 14px !important;
    }
}

@media (max-width: 576px) {
    /*
      En móvil mantenemos el overlay compacto. El texto completo se abre
      en la hoja inferior para que no rompa el layout tipo reel.
    */
    .rbs-reels-modal-title,
    .rbs-reels-modal-title.is-expanded {
        font-size: 23px !important;
        line-height: 1.13 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description,
    .rbs-reels-modal-description-wrap .rbs-reels-modal-description.is-expanded {
        display: inline !important;
        max-height: none !important;
        overflow: visible !important;
        font-size: 13px !important;
        line-height: 1.42 !important;
    }

    .rbs-reels-mobile-description-sheet {
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 78px;
        z-index: 40;
        display: block;
        max-height: 44svh;
        padding: 16px 16px 18px;
        border-radius: 18px;
        background: rgba(4, 12, 28, .92);
        border: 1px solid rgba(255,255,255,.14);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 18px 52px rgba(0,0,0,.48);
        overflow-y: auto;
        text-shadow: none;
    }

    .rbs-reels-mobile-description-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 12px;
    }

    .rbs-reels-mobile-description-header strong {
        color: #fff;
        font-size: 15px;
        font-weight: 800;
    }

    .rbs-reels-mobile-description-header button {
        padding: 0;
        border: 0;
        background: transparent;
        color: #ffcc00;
        font-size: 13px;
        font-weight: 800;
    }

    .rbs-reels-mobile-description-sheet h2 {
        margin: 0 0 12px;
        color: #fff;
        font-size: 20px;
        line-height: 1.18;
        font-weight: 800;
        overflow-wrap: anywhere;
    }

    .rbs-reels-mobile-sheet-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 12px;
    }

    .rbs-reels-mobile-sheet-tags span {
        color: #ffcc00;
        font-size: 13px;
        font-weight: 800;
    }

    .rbs-reels-mobile-description-sheet p {
        margin: 0;
        color: rgba(255,255,255,.90);
        font-size: 14px;
        line-height: 1.48;
        overflow-wrap: anywhere;
        white-space: normal;
    }
}

/* ============================================================
   V13 - MOBILE UX + ANIMACIONES TIPO REELS/SHORTS
   - Móvil más compacto
   - Ver más como bottom sheet
   - Back button móvil + soporte botón atrás del navegador/teléfono
   - Animación de entrada más suave
   - Ajuste visual para no ocupar media pantalla con texto
============================================================ */

.rbs-reels-mobile-back,
.rbs-reels-mobile-see-more-main {
    display: none;
}

.rbs-reels-full-modal {
    animation: rbsReelsModalFadeIn .22s ease both;
}

.rbs-reels-modal-info {
    animation: rbsReelsInfoIn .36s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-video-frame {
    animation: rbsReelsVideoIn .34s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-modal-nav {
    animation: rbsReelsNavIn .38s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-mobile-description-sheet {
    animation: rbsReelsSheetUp .24s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes rbsReelsModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rbsReelsInfoIn {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rbsReelsVideoIn {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rbsReelsNavIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rbsReelsSheetUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Carrusel: evita recortes visuales raros y mejora el arrastre */
#owl-carousel-component-instagram-reels .owl-stage {
    will-change: transform;
}

#owl-carousel-component-instagram-reels .owl-item {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@media (hover: hover) {
    .rbs-reel-card-media {
        transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    }

    .rbs-reel-card:hover .rbs-reel-card-media {
        transform: translateY(-3px);
        border-color: rgba(255,204,0,.20);
        box-shadow: 0 18px 40px rgba(0,0,0,.34);
    }
}

/* =========================
   Mobile / Tablet vertical
========================= */
@media (max-width: 991px) {
    .rbs-reels-full-modal {
        background: rgba(0,0,0,.92) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        touch-action: pan-y;
    }

    .rbs-reels-full-modal::before,
    .rbs-reels-full-modal::after {
        display: none !important;
    }

    .rbs-reels-modal-close,
    .rbs-reels-modal-nav {
        display: none !important;
    }

    .rbs-reels-mobile-back {
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: 12px;
        z-index: 60;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 8px 12px;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 999px;
        background: rgba(0,0,0,.28);
        color: #fff;
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 8px 22px rgba(0,0,0,.22);
    }

    .rbs-reels-mobile-back span {
        display: inline-block;
    }

    .rbs-reels-modal-shell,
    .rbs-reels-modal-video-zone,
    .rbs-reels-video-frame {
        width: 100vw !important;
        height: 100svh !important;
        min-height: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
    }

    .rbs-reels-video-frame::before {
        display: none !important;
    }

    .rbs-reels-video-frame::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        background:
            linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.54) 22%, rgba(0,0,0,.18) 42%, transparent 64%),
            linear-gradient(to bottom, rgba(0,0,0,.30) 0%, transparent 28%) !important;
    }

    .rbs-reels-video {
        width: 100vw !important;
        height: 100svh !important;
        object-fit: cover !important;
    }

    .rbs-reels-modal-info {
        position: absolute !important;
        left: 14px !important;
        right: 68px !important;
        /* Pegado justo encima de los controles — sin top, solo ocupa lo que necesita */
        bottom: calc(env(safe-area-inset-bottom, 0px) + 50px) !important;
        top: auto !important;
        z-index: 20 !important;
        width: auto !important;
        max-width: none !important;
        color: #fff !important;
        text-shadow: 0 2px 12px rgba(0,0,0,.72);
        animation: rbsReelsMobileInfoUp .28s cubic-bezier(.2,.8,.2,1) both;
        /* Sin altura mínima — el bloque crece solo con su contenido hacia arriba */
        height: auto !important;
        min-height: 0 !important;
        background: none !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    @keyframes rbsReelsMobileInfoUp {
        from { opacity: 0; transform: translateY(14px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Móvil: perfil compacto + título sin clamp + hashtags + ver más.
       Todo alineado desde abajo, sin huecos. */
    .rbs-reels-info-accent {
        display: none !important;
    }

    /* Perfil compacto — avatar pequeño + nombre en una línea */
    .rbs-reels-profile {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        margin-bottom: 8px !important;
    }

    .rbs-reels-profile-avatar {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        padding: 3px !important;
    }

    .rbs-reels-profile-text h3,
    .rbs-reels-profile-text .txt3,
    .rbs-reels-profile-text txt3 {
        font-size: 13px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 180px !important;
    }

    .rbs-reels-profile-text txt1 {
        display: none !important;
    }

    .rbs-reels-copy {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Título sin line-clamp forzado — que fluya naturalmente */
    .rbs-reels-modal-title {
        font-size: clamp(15px, 4.5vw, 18px) !important;
        line-height: 1.22 !important;
        letter-spacing: -.01em !important;
        font-weight: 700 !important;
        max-width: 100% !important;
        display: block !important;
        overflow: visible !important;
        white-space: normal !important;
        margin: 0 0 5px !important;
    }

    .rbs-reels-hashtags {
        margin-top: 4px !important;
        gap: 6px 10px !important;
        max-height: none !important;
        overflow: visible !important;
        flex-wrap: wrap !important;
    }

    .rbs-reels-hashtags txt1 {
        font-size: 12px !important;
        line-height: 1 !important;
        font-weight: 800 !important;
    }

    /* Descripción oculta — sin margen si no hay contenido */
    .rbs-reels-modal-description-wrap {
        margin-top: 4px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .rbs-reels-modal-description {
        display: none !important;
    }

    /* Ver más inline */
    .rbs-reels-modal-description-wrap .rbs-reels-see-more {
        display: inline !important;
        margin-left: 0 !important;
        color: rgba(255,255,255,.72) !important;
        font-size: 13px !important;
        font-weight: 800 !important;
    }

    .rbs-reels-single-see-more {
        display: none !important;
    }

    .rbs-reels-mobile-see-more-main {
        display: inline-flex;
        margin-top: 8px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #ffcc00;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
        text-shadow: 0 2px 8px rgba(0,0,0,.5);
    }

    .rbs-reels-modal-metrics {
        margin-top: 12px !important;
        padding-top: 10px !important;
        padding-bottom: 0 !important;
        border-top: 1px solid rgba(255,255,255,.16) !important;
        border-bottom: 0 !important;
        gap: 12px !important;
    }

    .rbs-reels-modal-metric {
        min-width: 0 !important;
        gap: 8px !important;
    }

    .rbs-reels-modal-metric + .rbs-reels-modal-metric {
        padding-left: 12px !important;
        border-left: 1px solid rgba(255,255,255,.22) !important;
    }

    .rbs-reels-modal-metric-icon {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        font-size: 14px !important;
        background: rgba(0,0,0,.24) !important;
        border-width: 2px !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .rbs-reels-modal-metric h2,
    .rbs-reels-modal-metric txt3 {
        font-size: 15px !important;
        line-height: 1 !important;
    }

    .rbs-reels-modal-metric txt1 {
        font-size: 11px !important;
        margin-top: 2px !important;
        color: rgba(255,255,255,.78) !important;
    }

    .rbs-reels-auto-mode {
        display: none !important;
    }

    .rbs-reels-sound-toggle {
        right: 14px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 34px) !important;
        width: 44px !important;
        height: 44px !important;
        z-index: 24 !important;
        background: rgba(0,0,0,.38) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }

    .rbs-reels-time {
        left: 14px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 28px) !important;
        z-index: 24 !important;
        font-size: 11px !important;
    }

    .rbs-reels-progress-hitarea {
        padding: 13px 14px;
        padding-bottom: calc(13px + env(safe-area-inset-bottom, 0px));
    }

    .rbs-reels-progress {
        height: 3px !important;
        z-index: 24 !important;
    }

    .rbs-reels-mobile-description-sheet {
        position: absolute !important;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
        z-index: 70 !important;
        display: block !important;
        max-height: 48svh !important;
        padding: 16px 16px 18px !important;
        border-radius: 18px !important;
        background: rgba(4, 12, 28, .92) !important;
        border: 1px solid rgba(255,255,255,.14) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        box-shadow: 0 18px 52px rgba(0,0,0,.48) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 576px) {
    .rbs-reels-mobile-back span {
        display: none;
    }

    .rbs-reels-mobile-back {
        width: 38px;
        min-height: 38px;
        justify-content: center;
        padding: 0;
    }

    .rbs-reels-modal-info {
        left: 13px !important;
        right: 62px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 46px) !important;
    }

    .rbs-reels-profile-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .rbs-reels-profile-text h3,
    .rbs-reels-profile-text .txt3,
    .rbs-reels-profile-text txt3 {
        max-width: 220px;
        font-size: 13.5px !important;
    }

    .rbs-reels-modal-title {
        font-size: clamp(14px, 4.2vw, 17px) !important;
        display: block !important;
        overflow: visible !important;
    }

    .rbs-reels-modal-description-wrap {
        margin-top: 0 !important;
    }

    .rbs-reels-modal-description {
        display: none !important;
    }

    .rbs-reels-hashtags txt1 {
        font-size: 11.5px !important;
    }

    .rbs-reels-modal-metrics {
        margin-top: 10px !important;
    }
}

/* ============================================================
   AJUSTE V14 - MOBILE UX + VIEWPORT REAL + ANIMACIONES
   - El texto ya captura taps/clicks y no dispara el video.
   - Altura real con --rbs-reel-vh para evitar huecos con barras del navegador.
   - Animaciones más suaves en desktop y móvil.
============================================================ */

:root {
    --rbs-reel-vh: 100dvh;
}

body.reels-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.rbs-reels-full-modal {
    height: var(--rbs-reel-vh, 100dvh) !important;
    min-height: var(--rbs-reel-vh, 100dvh) !important;
    overscroll-behavior: none;
    animation: rbsReelsModalFadeIn .22s ease-out both;
}

.rbs-reels-modal-shell {
    height: var(--rbs-reel-vh, 100dvh) !important;
    min-height: min(640px, var(--rbs-reel-vh, 100dvh)) !important;
    animation: rbsReelsShellIn .34s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-modal-info {
    animation: rbsReelsInfoIn .42s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-video-frame {
    animation: rbsReelsVideoIn .38s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-modal-nav {
    animation: rbsReelsNavIn .42s cubic-bezier(.2,.8,.2,1) both;
}

.rbs-reels-modal-close,
.rbs-reels-mobile-back {
    animation: rbsReelsControlIn .26s ease-out both;
}

@keyframes rbsReelsModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rbsReelsShellIn {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rbsReelsInfoIn {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rbsReelsVideoIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rbsReelsNavIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rbsReelsControlIn {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Desktop: pequeña sensación de cambio cuando entra otro reel */
.rbs-reels-video-frame .rbs-reels-video {
    animation: rbsReelsMediaSoftIn .28s ease-out both;
}

@keyframes rbsReelsMediaSoftIn {
    from { opacity: .72; transform: scale(1.012); }
    to { opacity: 1; transform: scale(1); }
}

/* El overlay de texto debe ser interactuable: antes algunos taps caían al video */
.rbs-reels-modal-info,
.rbs-reels-modal-info *,
.rbs-reels-mobile-description-sheet,
.rbs-reels-mobile-description-sheet * {
    pointer-events: auto !important;
}

.rbs-reels-modal-info {
    touch-action: manipulation;
}

.rbs-reels-mobile-description-sheet {
    touch-action: pan-y;
}

.rbs-reels-video {
    touch-action: manipulation;
}

@media (hover: hover) {
    .rbs-reels-modal-close:hover,
    .rbs-reels-mobile-back:hover,
    .rbs-reels-sound-toggle:hover,
    .rbs-reels-modal-nav-btn:hover {
        transform: translateY(-1px) scale(1.035);
    }

    .rbs-reels-see-more:hover,
    .rbs-reels-mobile-see-more-main:hover {
        color: #fff !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rbs-reels-full-modal,
    .rbs-reels-modal-shell,
    .rbs-reels-modal-info,
    .rbs-reels-video-frame,
    .rbs-reels-modal-nav,
    .rbs-reels-modal-close,
    .rbs-reels-mobile-back,
    .rbs-reels-video-frame .rbs-reels-video,
    .rbs-reels-mobile-description-sheet {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 991px) {
    html:has(.rbs-reels-full-modal),
    body.reels-modal-open {
        height: var(--rbs-reel-vh, 100dvh) !important;
        max-height: var(--rbs-reel-vh, 100dvh) !important;
        overflow: hidden !important;
    }

    .rbs-reels-full-modal,
    .rbs-reels-modal-shell,
    .rbs-reels-modal-video-zone,
    .rbs-reels-video-frame,
    .rbs-reels-video {
        width: 100vw !important;
        height: var(--rbs-reel-vh, 100dvh) !important;
        min-height: var(--rbs-reel-vh, 100dvh) !important;
        max-height: var(--rbs-reel-vh, 100dvh) !important;
    }

    .rbs-reels-full-modal {
        position: fixed !important;
        inset: 0 !important;
        background: #000 !important;
        overscroll-behavior: none !important;
        touch-action: none;
    }

    .rbs-reels-modal-shell {
        overflow: hidden !important;
    }

    .rbs-reels-modal-video-zone {
        position: absolute !important;
        inset: 0 !important;
        overflow: hidden !important;
    }

    .rbs-reels-video-frame {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        overflow: hidden !important;
        background: #000 !important;
    }

    .rbs-reels-video {
        position: absolute !important;
        inset: 0 !important;
        object-fit: cover !important;
        z-index: 1 !important;
    }

    .rbs-reels-video-frame::after {
        z-index: 2 !important;
        background:
            linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.58) 21%, rgba(0,0,0,.20) 43%, transparent 65%),
            linear-gradient(to bottom, rgba(0,0,0,.18) 0%, transparent 28%) !important;
    }

    .rbs-reels-modal-info {
        z-index: 30 !important;
        pointer-events: auto !important;
        transform: translateZ(0);
        will-change: transform, opacity;
        animation: rbsReelsMobileInfoUp .30s cubic-bezier(.2,.8,.2,1) both !important;
    }

    .rbs-reels-modal-info::before {
        content: "";
        position: absolute;
        inset: -10px -8px -8px;
        z-index: -1;
        pointer-events: none;
        background: radial-gradient(circle at 20% 90%, rgba(0,0,0,.34), transparent 58%);
        filter: blur(2px);
    }

    .rbs-reels-mobile-back,
    .rbs-reels-sound-toggle,
    .rbs-reels-progress-hitarea,
    .rbs-reels-progress,
    .rbs-reels-time {
        transform: translateZ(0);
    }

    .rbs-reels-sound-toggle {
        z-index: 36 !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 42px) !important;
    }

    .rbs-reels-time {
        z-index: 36 !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 34px) !important;
    }

    .rbs-reels-progress-hitarea {
        z-index: 36 !important;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .rbs-reels-progress {
        z-index: 36 !important;
    }

    .rbs-reels-mobile-description-sheet {
        z-index: 80 !important;
        animation: rbsReelsSheetIn .24s cubic-bezier(.2,.8,.2,1) both;
    }

    @keyframes rbsReelsSheetIn {
        from { opacity: 0; transform: translateY(22px) scale(.98); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
}

@media (max-width: 576px) {
    .rbs-reels-modal-info {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 58px) !important;
        right: 64px !important;
    }

    .rbs-reels-modal-title {
        font-size: clamp(14px, 4.2vw, 16px) !important;
        line-height: 1.22 !important;
        display: block !important;
        overflow: visible !important;
    }

    .rbs-reels-modal-description-wrap {
        max-height: 42px !important;
    }

    .rbs-reels-modal-description {
        font-size: 12.5px !important;
        line-height: 1.44 !important;
    }

    .rbs-reels-modal-metrics {
        margin-top: 10px !important;
        padding-top: 9px !important;
    }

    .rbs-reels-sound-toggle {
        right: 12px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 44px) !important;
    }
}


/* ============================================================
   V15 - FIX SCROLL EN COMENTARIO / VER MÁS MÓVIL
   Permite desplazar la hoja inferior sin activar swipe del reel.
============================================================ */

.rbs-reels-mobile-description-sheet,
.rbs-reels-mobile-description-sheet * {
    pointer-events: auto !important;
}

.rbs-reels-mobile-description-sheet {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
}

.rbs-reels-mobile-description-sheet p,
.rbs-reels-mobile-description-sheet h2,
.rbs-reels-mobile-description-sheet span,
.rbs-reels-mobile-description-sheet button {
    touch-action: pan-y !important;
}

.rbs-reels-modal-info,
.rbs-reels-modal-description-wrap,
.rbs-reels-modal-description,
.rbs-reels-see-more,
.rbs-reels-modal-metric,
.rbs-reels-mobile-see-more-main {
    pointer-events: auto !important;
}

@media (max-width: 991px) {
    /*
      No usamos touch-action:none en todo el modal porque bloquea el scroll
      de la hoja de descripción en algunos navegadores Android/Chrome.
      El JS ya previene el scroll solo cuando el gesto inicia sobre el video.
    */
    .rbs-reels-full-modal {
        touch-action: pan-y !important;
    }

    .rbs-reels-video,
    .rbs-reels-video-frame,
    .rbs-reels-modal-video-zone {
        touch-action: pan-y !important;
    }

    .rbs-reels-mobile-description-sheet {
        z-index: 90 !important;
        max-height: min(48svh, 390px) !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 86px) !important;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 576px) {
    .rbs-reels-mobile-description-sheet {
        left: 12px !important;
        right: 12px !important;
        max-height: min(50svh, 420px) !important;
    }
}

/* ============================================================
   V16 - HOJA TIPO FACEBOOK PARA VER MÁS EN MÓVIL
   - El texto del overlay nunca queda cortado de forma incómoda.
   - Al tocar título/descripción o Ver más, sube una hoja inferior.
   - La hoja es 100% scrolleable y no dispara swipe del reel.
============================================================ */

.rbs-reels-copy {
    cursor: default;
}

@media (max-width: 576px) {
    .rbs-reels-copy {
        cursor: pointer;
    }

    /* El overlay principal queda compacto aunque esté abierto el sheet */
    .rbs-reels-modal-title,
    .rbs-reels-modal-title.is-expanded {
        display: block !important;
        overflow: visible !important;
        font-size: clamp(15px, 4.5vw, 18px) !important;
        line-height: 1.22 !important;
        margin-bottom: 0 !important;
    }

    .rbs-reels-modal-description-wrap {
        max-height: 46px !important;
        overflow: hidden !important;
        margin-top: 8px !important;
        line-height: 1.38 !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description,
    .rbs-reels-modal-description-wrap .rbs-reels-modal-description.is-expanded {
        display: inline !important;
        max-height: none !important;
        overflow: visible !important;
        font-size: 13px !important;
        line-height: 1.38 !important;
        color: rgba(255,255,255,.92) !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-see-more,
    .rbs-reels-mobile-see-more-main {
        display: inline !important;
        color: #ffcc00 !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        text-shadow: 0 2px 8px rgba(0,0,0,.48);
    }

    /* Hoja inferior tipo Facebook/Instagram */
    .rbs-reels-mobile-description-sheet {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999999 !important;
        display: block !important;
        max-height: min(72svh, calc(var(--rbs-reel-vh, 100dvh) * .72)) !important;
        min-height: 220px !important;
        padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 24px 24px 0 0 !important;
        background: rgba(5, 13, 30, .96) !important;
        border: 1px solid rgba(255,255,255,.14) !important;
        border-bottom: 0 !important;
        box-shadow: 0 -24px 70px rgba(0,0,0,.55) !important;
        backdrop-filter: blur(22px) saturate(120%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(120%) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        animation: rbsReelsFacebookSheetUp .26s cubic-bezier(.18,.9,.2,1) both !important;
    }

    .rbs-reels-mobile-description-sheet::before {
        content: "";
        display: block;
        width: 44px;
        height: 4px;
        margin: 0 auto 14px;
        border-radius: 999px;
        background: rgba(255,255,255,.34);
    }

    .rbs-reels-mobile-description-header {
        position: sticky;
        top: -18px;
        z-index: 2;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 14px !important;
        margin: 0 -18px 14px !important;
        padding: 12px 18px 10px !important;
        background: linear-gradient(to bottom, rgba(5,13,30,.98), rgba(5,13,30,.88)) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .rbs-reels-mobile-description-header strong {
        color: #fff !important;
        font-size: 15px !important;
        font-weight: 800 !important;
    }

    .rbs-reels-mobile-description-header button {
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    .rbs-reels-mobile-description-sheet h2 {
        margin: 0 0 14px !important;
        color: #fff !important;
        font-size: 22px !important;
        line-height: 1.18 !important;
        font-weight: 850 !important;
        letter-spacing: -.02em;
        overflow-wrap: anywhere;
    }

    .rbs-reels-mobile-sheet-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px 14px !important;
        margin-bottom: 14px !important;
    }

    .rbs-reels-mobile-sheet-tags span {
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    .rbs-reels-mobile-description-sheet p {
        margin: 0 !important;
        color: rgba(255,255,255,.90) !important;
        font-size: 15px !important;
        line-height: 1.52 !important;
        overflow-wrap: anywhere !important;
        white-space: pre-wrap;
    }

    .rbs-reels-mobile-description-sheet,
    .rbs-reels-mobile-description-sheet * {
        pointer-events: auto !important;
    }

    @keyframes rbsReelsFacebookSheetUp {
        from {
            opacity: 0;
            transform: translateY(36px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ============================================================
   V17 - HOJA INFO LIMPIA + UN SOLO VER MÁS
   - Quita el tab/handle superior de la hoja
   - Evita Ver más duplicado
   - La hoja inferior queda escrolleable y alineada a la izquierda
   - El overlay principal en móvil se mantiene compacto
============================================================ */

.rbs-reels-mobile-see-more-main {
    display: none !important;
}

.rbs-reels-modal-description-wrap .rbs-reels-see-more:not(.rbs-reels-single-see-more) {
    display: none !important;
}

.rbs-reels-single-see-more {
    display: inline-block;
    margin-top: 8px;
    margin-left: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffcc00;
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0,0,0,.46);
}

.rbs-reels-single-see-more:hover,
.rbs-reels-single-see-more:focus {
    color: #fff;
    outline: 0;
}

@media (max-width: 576px) {
    .rbs-reels-copy {
        cursor: pointer;
    }

    .rbs-reels-modal-description-wrap {
        margin-top: 8px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .rbs-reels-modal-description-wrap .rbs-reels-modal-description {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        max-height: none !important;
        color: rgba(255,255,255,.92) !important;
        font-size: 13px !important;
        line-height: 1.38 !important;
        text-align: left !important;
    }

    .rbs-reels-single-see-more {
        display: inline-block !important;
        margin-top: 6px !important;
        font-size: 13px !important;
        color: #ffcc00 !important;
    }

    .rbs-reels-mobile-description-sheet {
        left: 10px !important;
        right: 10px !important;
        bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
        max-height: min(70svh, calc(var(--rbs-reel-vh, 100dvh) * .70)) !important;
        min-height: auto !important;
        padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 22px !important;
        background: rgba(5, 13, 30, .96) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        text-align: left !important;
    }

    .rbs-reels-mobile-description-sheet::before {
        display: none !important;
        content: none !important;
    }

    .rbs-reels-mobile-description-header {
        position: sticky !important;
        top: -18px !important;
        z-index: 3 !important;
        margin: -18px -18px 14px !important;
        padding: 16px 18px 12px !important;
        background: linear-gradient(to bottom, rgba(5,13,30,.99), rgba(5,13,30,.92)) !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
    }

    .rbs-reels-mobile-description-header strong {
        font-size: 15px !important;
        font-weight: 850 !important;
    }

    .rbs-reels-mobile-description-header button {
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 850 !important;
    }

    .rbs-reels-mobile-description-sheet h2 {
        margin: 0 0 12px !important;
        color: #fff !important;
        font-size: 22px !important;
        line-height: 1.16 !important;
        font-weight: 850 !important;
        letter-spacing: -.02em !important;
        text-align: left !important;
        overflow-wrap: anywhere !important;
    }

    .rbs-reels-mobile-sheet-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px 14px !important;
        margin: 0 0 14px !important;
        justify-content: flex-start !important;
    }

    .rbs-reels-mobile-sheet-tags span {
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 850 !important;
    }

    .rbs-reels-mobile-description-sheet p {
        margin: 0 !important;
        color: rgba(255,255,255,.90) !important;
        font-size: 15px !important;
        line-height: 1.52 !important;
        text-align: left !important;
        overflow-wrap: anywhere !important;
        white-space: pre-wrap !important;
    }
}


/* ============================================================
   V18 - BOTTOM SHEET PREMIUM / SIN TAB VISUAL
   - Quita sangrías y centrados heredados en descripción
   - Hoja inferior más limpia tipo Facebook/Instagram
   - Mejor scroll y lectura en móvil
============================================================ */

.rbs-reels-mobile-description-backdrop {
    display: none;
}

@media (max-width: 576px) {
    .rbs-reels-mobile-description-backdrop {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999998 !important;
        display: block !important;
        background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,.10) 45%, transparent 78%) !important;
        pointer-events: auto !important;
        animation: rbsReelsSheetBackdropIn .18s ease-out both;
    }

    @keyframes rbsReelsSheetBackdropIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .rbs-reels-mobile-description-sheet {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-height: min(76svh, calc(var(--rbs-reel-vh, 100dvh) * .76)) !important;
        min-height: 250px !important;
        padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 28px 28px 0 0 !important;
        background:
            radial-gradient(circle at 16% 0%, rgba(255,204,0,.055), transparent 30%),
            linear-gradient(180deg, rgba(6,16,38,.985), rgba(3,10,26,.985)) !important;
        border: 1px solid rgba(255,255,255,.12) !important;
        border-bottom: 0 !important;
        box-shadow: 0 -22px 70px rgba(0,0,0,.62) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        text-align: left !important;
        text-indent: 0 !important;
        white-space: normal !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        animation: rbsReelsSheetPremiumUp .24s cubic-bezier(.2,.85,.2,1) both !important;
    }

    @keyframes rbsReelsSheetPremiumUp {
        from { opacity: .82; transform: translateY(34px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .rbs-reels-mobile-description-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 5 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 14px !important;
        margin: 0 !important;
        padding: 18px 20px 14px !important;
        background:
            linear-gradient(to bottom, rgba(6,16,38,.995), rgba(6,16,38,.94)) !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        text-align: left !important;
    }

    .rbs-reels-mobile-description-header strong {
        color: #fff !important;
        font-size: 15px !important;
        font-weight: 850 !important;
        letter-spacing: -.01em !important;
        text-align: left !important;
    }

    .rbs-reels-mobile-description-header button {
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .rbs-reels-mobile-description-sheet h2 {
        margin: 18px 20px 12px !important;
        color: #fff !important;
        font-size: clamp(21px, 6vw, 26px) !important;
        line-height: 1.12 !important;
        font-weight: 850 !important;
        letter-spacing: -.025em !important;
        text-align: left !important;
        text-indent: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .rbs-reels-mobile-sheet-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 8px 14px !important;
        margin: 0 20px 16px !important;
        text-align: left !important;
    }

    .rbs-reels-mobile-sheet-tags span {
        color: #ffcc00 !important;
        font-size: 14px !important;
        font-weight: 850 !important;
        line-height: 1.2 !important;
        text-align: left !important;
    }

    .rbs-reels-mobile-sheet-description,
    .rbs-reels-mobile-description-sheet p {
        display: block !important;
        margin: 0 20px !important;
        padding: 0 !important;
        color: rgba(255,255,255,.90) !important;
        font-size: 15px !important;
        line-height: 1.58 !important;
        font-weight: 500 !important;
        text-align: left !important;
        text-indent: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .rbs-reels-mobile-description-sheet p::first-letter {
        margin-left: 0 !important;
    }

    .rbs-reels-mobile-description-sheet a {
        color: #ffcc00 !important;
        text-decoration: none !important;
        word-break: break-word !important;
    }

    .rbs-reels-mobile-description-sheet::-webkit-scrollbar {
        width: 5px;
    }

    .rbs-reels-mobile-description-sheet::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.22);
        border-radius: 999px;
    }
}


/* ============================================================
   V19 - SWIPE SOBRE DESCRIPCIÓN COMPACTA + SHEET SCROLLABLE
   - Texto compacto: permite swipe para cambiar reel.
   - Hoja Ver más: permite scroll real del comentario.
============================================================ */

.rbs-reels-modal-info,
.rbs-reels-copy,
.rbs-reels-modal-title,
.rbs-reels-modal-description-wrap,
.rbs-reels-modal-description,
.rbs-reels-hashtags,
.rbs-reels-modal-metrics {
    pointer-events: auto !important;
    touch-action: pan-y !important;
}

.rbs-reels-mobile-description-sheet,
.rbs-reels-mobile-description-panel {
    pointer-events: auto !important;
    touch-action: pan-y !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

.rbs-reels-mobile-description-sheet *,
.rbs-reels-mobile-description-panel * {
    pointer-events: auto !important;
}

@media (max-width: 576px) {
    .rbs-reels-mobile-description-sheet,
    .rbs-reels-mobile-description-panel {
        max-height: 56svh !important;
        max-height: calc(var(--rbs-reel-vh, 100svh) * .56) !important;
    }
}

/* ============================================================
   FIX V22 - OWL REELS SIN MARGEN EXTRA
   - Mantiene px-5 del contenedor.
   - Owl usa margin 15.
   - Evita recorte al regresar al primer item.
============================================================ */

.rbs-reels-carousel-wrap {
    padding-bottom: 44px;
}

#owl-carousel-component-instagram-reels {
    overflow: hidden;
}

#owl-carousel-component-instagram-reels,
#owl-carousel-component-instagram-reels .owl-stage-outer,
#owl-carousel-component-instagram-reels .owl-stage,
#owl-carousel-component-instagram-reels .owl-item,
#owl-carousel-component-instagram-reels .rbs-reel-slide,
#owl-carousel-component-instagram-reels .rbs-reel-card {
    box-sizing: border-box;
}

#owl-carousel-component-instagram-reels .owl-stage-outer {
    overflow: hidden !important;
}

#owl-carousel-component-instagram-reels .owl-stage {
    display: flex;
    align-items: stretch;
    will-change: transform;
}

#owl-carousel-component-instagram-reels .owl-item {
    float: none;
    display: flex;
    flex-shrink: 0;
    height: auto;
    overflow: visible;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: translateZ(0);
    backface-visibility: hidden;
}

#owl-carousel-component-instagram-reels .rbs-reel-slide,
#owl-carousel-component-instagram-reels .rbs-reel-card {
    width: 100%;
    height: 100%;
}

#owl-carousel-component-instagram-reels .owl-item .rbs-reel-card {
    width: 100%;
}

@media (max-width: 576px) {
    .rbs-reels-carousel-wrap {
        padding-bottom: 34px;
        overflow: hidden;
    }

    #owl-carousel-component-instagram-reels {
        width: 100%;
        overflow: hidden;
    }

    .rbs-reel-card-media {
        width: 100%;
        border-radius: 16px;
        transform: translateZ(0);
    }
}


/* ============================================================
   V23 - REELS usando helper global owlCarousel()
   Las flechas usan data-target como los demás carruseles.
============================================================ */
#owl-carousel-component-instagram-reels .owl-dots,
#owl-carousel-component-instagram-reels .owl-nav {
    display: none !important;
}

.fa-instagram {
    font-size: 20px;
}

h1 {
    line-height: normal !important;
}

.rbs-reels-modal-description {
    font-weight: 100 !important;
}

/* ============================================================
   FIX MOBILE V25 - SCROLL VERTICAL SOBRE CARDS DE REELS
   - Tap corto abre modal
   - Swipe horizontal sigue siendo del carrusel
   - Swipe vertical permite bajar/subir la página
============================================================ */

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .rbs-reel-card,
    .rbs-reel-card-media,
    .rbs-reel-poster,
    .rbs-reel-preview,
    .rbs-reel-overlay,
    .rbs-reel-info {
        touch-action: pan-y !important;
    }

    .rbs-reel-preview {
        pointer-events: none !important;
    }

    #owl-carousel-component-instagram-reels,
    #owl-carousel-component-instagram-reels .owl-stage-outer,
    #owl-carousel-component-instagram-reels .owl-stage,
    #owl-carousel-component-instagram-reels .owl-item {
        touch-action: pan-y !important;
    }
}

@media (max-width: 576px) {
    .rbs-reels-carousel-wrap.px-5 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .rbs-reel-card,
    .rbs-reel-card-media {
        -webkit-tap-highlight-color: transparent;
        touch-action: pan-x;
    }
}
