/*
 * Rozana Himachal - Videos & Reels pages (2026-10)
 * Loaded only on the video pages (and on the homepage when the videos section is on).
 * The videos play in the official Facebook / YouTube players.
 */

/* ---------- page head, playlist chips ---------- */
/* page title and the tabs (All | short videos | videos | playlists) in one row */
.rh-videos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 26px;
}

.rh-videos-head .page-title {
    margin-bottom: 0;
}

.rh-videos-head .rh-chips {
    margin: 0;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .rh-videos-head .rh-chips {
        width: 100%;
    }
}

.rh-btn-reels {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 999px;
    background-color: var(--vr-theme-color);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--vr-theme-color) 35%, transparent);
    transition: transform .15s ease, box-shadow .2s ease;
}

.rh-btn-reels:hover {
    transform: translateY(-1px);
}

.rh-btn-reels svg {
    fill: currentColor;
}

.rh-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 14px 0 26px;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.rh-chips::-webkit-scrollbar {
    display: none;
}

.rh-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background-color: #f2f3f5;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}

.rh-chip:hover {
    background-color: color-mix(in srgb, var(--vr-theme-color) 14%, #fff);
    color: var(--vr-theme-color);
}

.rh-chip.active {
    background-color: var(--vr-theme-color);
    color: #fff;
}

.rh-chip-count {
    padding: 0 7px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, .07);
    font-size: 11px;
}

.rh-chip.active .rh-chip-count {
    background-color: rgba(255, 255, 255, .25);
}

.rh-playlist-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

/* search on the "View All" pages */
.rh-video-search {
    position: relative;
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 520px;
    margin: -8px 0 22px;
}

.rh-video-search .form-control {
    height: 42px;
    padding-left: 38px;
    border-radius: 999px;
}

.rh-video-search .btn {
    flex-shrink: 0;
    height: 42px;
    padding: 0 20px;
    border-radius: 999px;
}

.rh-video-search-icon {
    position: absolute;
    left: 14px;
    top: 12px;
    color: #9ca3af;
    pointer-events: none;
}

.rh-video-search-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -10px 0 20px;
    color: #4b5563;
    font-size: 14px;
}

.rh-video-search-clear {
    display: inline-flex;
    padding: 3px;
    border-radius: 50%;
    background-color: #f2f3f5;
    color: #374151;
}

.dark-mode .rh-video-search-info {
    color: #d1d5db;
}

.dark-mode .rh-video-search-clear {
    background-color: rgba(255, 255, 255, .1);
    color: #e5e5e5;
}

/* Videos page: 2 rows per section (the grids have 6 / 4 / 3 / 2 columns) */
.rh-vgrid.rh-two-rows > :nth-child(n+9) {
    display: none;
}

@media (max-width: 1199.98px) {
    .rh-vgrid.rh-two-rows > :nth-child(n+7),
    .rh-sgrid.rh-two-rows > :nth-child(n+9) {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .rh-vgrid.rh-two-rows > :nth-child(n+5),
    .rh-sgrid.rh-two-rows > :nth-child(n+5) {
        display: none;
    }
}

.rh-playlist-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rh-playlist-desc {
    max-width: 860px;
    margin-top: 8px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

.rh-videos-empty {
    padding: 60px 0;
    text-align: center;
    color: #9ca3af;
}

.rh-videos-empty p {
    margin-top: 12px;
    font-size: 16px;
}

/* ---------- sections ---------- */
.rh-vsection {
    margin-bottom: 36px;
}

.rh-vsection .section-title .title a {
    color: inherit;
}

.rh-vsection-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rh-vsection-more,
.rh-vsection-play {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--vr-theme-color);
}

.rh-vsection-play {
    color: #374151;
}

.rh-vsection-play svg {
    fill: currentColor;
}

/* ---------- grids and horizontal rows ---------- */
.rh-vgrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 18px;
}

/* short videos page: 9:16 cards */
.rh-sgrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px 14px;
}

.rh-vlist {
    margin-bottom: 10px;
}

.rh-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.rh-load-more .spinner-border {
    display: none;
    margin-left: 6px;
}

.rh-load-more.is-loading {
    pointer-events: none;
    opacity: .8;
}

.rh-load-more.is-loading .spinner-border {
    display: inline-block;
}

/* playlist card: number of videos on the right side of the image */
.rh-pcard-count {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 36%;
    background-color: rgba(0, 0, 0, .68);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.rh-hscroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 280px;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.rh-hscroll > * {
    scroll-snap-align: start;
}

.rh-hscroll-reels {
    grid-auto-columns: 172px;
    gap: 12px;
}

@media (max-width: 1199.98px) {
    .rh-vgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rh-sgrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .rh-vgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .rh-sgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .rh-hscroll {
        grid-auto-columns: 72%;
        gap: 12px;
    }

    .rh-hscroll-reels {
        grid-auto-columns: 40%;
        gap: 10px;
    }

    .rh-vsection-play {
        display: none;
    }
}

/* ---------- video card (16:9) ---------- */
.rh-vcard {
    display: block;
    color: inherit;
}

.rh-vcard-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--rh-radius, 8px);
    overflow: hidden;
    background-color: #e9ecef;
}

.rh-vcard-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.rh-vcard-thumb.is-vertical {
    background-color: #111;
}

.rh-vcard-thumb.is-vertical .rh-vcard-img {
    object-fit: contain;
}

.rh-vcard-thumb .rh-vcard-bg {
    filter: blur(14px) brightness(.6);
    transform: scale(1.25);
}

.rh-vcard-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .55);
    color: #fff;
    transition: background-color .2s ease, transform .2s ease;
}

.rh-vcard-play svg {
    margin-left: 3px;
    fill: currentColor;
}

.rh-vcard-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.rh-vcard-platform {
    position: absolute;
    left: 8px;
    top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
}

.rh-pf-facebook {
    background-color: #1877f2;
}

.rh-pf-youtube {
    background-color: #ff0033;
}

.rh-vcard-title {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.rh-vcard-meta {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12.5px;
}

@media (hover: hover) {
    .rh-vcard:hover .rh-vcard-img,
    .rh-rcard:hover img {
        transform: scale(1.045);
    }

    .rh-vcard:hover .rh-vcard-play {
        background-color: var(--vr-theme-color);
        transform: scale(1.08);
    }

    .rh-vcard:hover .rh-vcard-title {
        color: var(--vr-theme-color);
    }
}

/* ---------- reel card (9:16) ---------- */
.rh-rcard {
    display: block;
}

.rh-rcard-thumb {
    position: relative;
    display: block;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background-color: #111;
}

.rh-rcard-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.rh-rcard-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 40px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85));
    color: #fff;
}

.rh-rcard-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.rh-rcard-views {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-size: 12px;
    opacity: .85;
}

.rh-rcard-views svg {
    fill: currentColor;
}

/* ---------- homepage section ---------- */
.rh-home-videos .rh-hscroll {
    margin-bottom: 10px;
}

/* ---------- dark mode ---------- */
.dark-mode .rh-chip {
    background-color: rgba(255, 255, 255, .08);
    color: #e5e5e5;
}

.dark-mode .rh-chip.active {
    background-color: var(--vr-theme-color);
    color: #fff;
}

.dark-mode .rh-chip-count {
    background-color: rgba(255, 255, 255, .1);
}

.dark-mode .rh-vcard-thumb {
    background-color: #1e1e1e;
}

.dark-mode .rh-vcard-title,
.dark-mode .rh-vsection-play {
    color: #eee;
}

.dark-mode .rh-vcard-meta,
.dark-mode .rh-playlist-info {
    color: #9ca3af;
}

.dark-mode .rh-playlist-desc {
    color: #d1d5db;
}

/* =====================================================================
   Reels player (full screen, swipe up/down)
   ===================================================================== */
html.rh-reels-open,
html.rh-reels-open body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

.rh-reels {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    background-color: #000;
    color: #fff;
}

.rh-reels-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 14px;
    background: linear-gradient(rgba(0, 0, 0, .7), transparent);
    pointer-events: none;
}

.rh-reels-top > * {
    pointer-events: auto;
}

.rh-reels-heading {
    flex: 1;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 700;
}

.rh-reels-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .14);
    color: #fff;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color .2s ease;
}

.rh-reels-btn:hover,
.rh-reels-btn:focus {
    background-color: rgba(255, 255, 255, .28);
    color: #fff;
}

.rh-reels-btn:disabled {
    opacity: .35;
}

.rh-reels-btn-space {
    width: 42px;
    flex-shrink: 0;
}

.rh-reels-sound .rh-sound-on,
.rh-reels-sound[aria-pressed="true"] .rh-sound-off {
    display: none;
}

.rh-reels-sound[aria-pressed="true"] .rh-sound-on {
    display: inline-flex;
}

.rh-reels-track {
    position: relative;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    outline: none;
}

.rh-reels-track::-webkit-scrollbar {
    display: none;
}

.rh-reel {
    position: relative;
    display: flex;
    justify-content: center;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.rh-reel-bg {
    position: absolute;
    inset: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    object-fit: cover;
    filter: blur(30px) brightness(.35);
    pointer-events: none;
}

.rh-reel-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    height: 100%;
    padding: calc(64px + env(safe-area-inset-top)) 12px 0;
}

/* the video takes the free space and keeps its shape (container query units) */
.rh-reel-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    container-type: size;
}

.rh-reel-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

@supports (width: 1cqw) {
    .is-vertical .rh-reel-frame {
        width: min(100cqw, 100cqh * 9 / 16);
        height: min(100cqh, 100cqw * 16 / 9);
    }

    .is-wide .rh-reel-frame {
        width: min(100cqw, 100cqh * 16 / 9);
        height: min(100cqh, 100cqw * 9 / 16);
    }
}

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

.rh-reel-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .55);
    color: #fff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background-color .2s ease, transform .2s ease;
}

.rh-reel-play svg {
    margin-left: 5px;
    fill: currentColor;
}

.rh-reel-play:hover {
    background-color: var(--vr-theme-color);
    transform: scale(1.06);
}

.rh-reel-iframe {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    border: 0;
}

.rh-reel.is-loaded .rh-reel-play {
    display: none;
}

.rh-reel-info {
    flex: none;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 4px calc(14px + env(safe-area-inset-bottom));
}

.rh-reel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: rgba(255, 255, 255, .75);
    font-size: 12.5px;
}

.rh-reel-platform {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
}

.rh-reels .rh-reel-title {
    display: -webkit-box;
    margin: 8px 0 4px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
}

.rh-reel-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    line-height: 1.55;
    cursor: pointer;
    word-break: break-word;
}

.rh-reel-info.is-open .rh-reel-title,
.rh-reel-info.is-open .rh-reel-desc {
    display: block;
    -webkit-line-clamp: unset;
}

.rh-reel-info.is-open .rh-reel-desc {
    max-height: 35vh;
    overflow-y: auto;
}

.rh-reel-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.rh-reel-actions::-webkit-scrollbar {
    display: none;
}

.rh-reel-act {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    padding: 7px 13px;
    border: 0;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.rh-reel-act:hover,
.rh-reel-act:focus {
    background-color: rgba(255, 255, 255, .26);
    color: #fff;
}

.rh-reels-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(-50%);
}

.rh-reels-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, .7);
}

.rh-reels-empty p {
    margin-top: 12px;
}

.rh-reel-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.rh-reel-loader::after {
    content: "";
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rhSpin .8s linear infinite;
}

@keyframes rhSpin {
    to {
        transform: rotate(360deg);
    }
}

.rh-reels-sheet {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: rgba(0, 0, 0, .55);
}

.rh-reels-sheet[hidden] {
    display: none;
}

.rh-reels-sheet-inner {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    background-color: #1c1c1e;
    animation: rhSheetUp .2s ease-out;
}

.rh-reels-sheet-inner a,
.rh-reels-sheet-inner button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.rh-reels-sheet-inner a:hover,
.rh-reels-sheet-inner button:hover {
    background-color: rgba(255, 255, 255, .16);
    color: #fff;
}

@keyframes rhSheetUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
}

.rh-reels-toast {
    position: absolute;
    left: 50%;
    bottom: 110px;
    z-index: 9;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .95);
    color: #111;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity .2s ease;
    pointer-events: none;
}

.rh-reels-toast.is-visible {
    opacity: 1;
}

@media (max-width: 767.98px) {
    .rh-reels-nav {
        display: none;
    }

    .rh-reel-stage {
        padding-left: 8px;
        padding-right: 8px;
    }

    .rh-reels .rh-reel-title {
        font-size: 16px;
    }
}

@media (max-height: 680px) {
    .rh-reel-desc {
        -webkit-line-clamp: 1;
    }

    .rh-reel-stage {
        padding-top: calc(58px + env(safe-area-inset-top));
    }
}
