/* VexaCourse Global Overrides - Point 4 */

/* Remove background effects on organization and course listing pages */
.organizations-lists-hero__mask,
.organizations-lists-hero,
.organization-card__mask,
.courses-lists-hero__mask,
.courses-lists-hero {
    display: none !important;
}

/* Clean transparent backgrounds for organization cards */
.organization-card {
    background: transparent !important;
}

/* === Course Detail Page Overrides === */
/* Black Enroll Button */
.js-enroll-actions-card .btn-primary {
    background-color: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}
.js-enroll-actions-card .btn-primary:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}
.js-enroll-actions-card .btn-outline-accent {
    border-color: #111 !important;
    color: #111 !important;
}
.js-enroll-actions-card .btn-outline-accent:hover {
    background-color: #111 !important;
    color: #fff !important;
}


/* ================================================ */
/* === Learning Page - Video + Sidebar Layout ===    */
/* ================================================ */

/* Full height learning page */
.learning-page {
    height: 100vh !important;
    overflow: hidden !important;
}

/* Main content area - takes remaining space beside sidebar */
.learning-page__main {
    flex: 1 !important;
    min-width: 0 !important;
    height: calc(100vh - 71px) !important;
    overflow: hidden !important;
}

/* Sidebar - VISIBLE with course content list */
.learning-page__sidebar {
    width: 380px !important;
    min-width: 380px !important;
    max-width: 380px !important;
    height: calc(100vh - 71px) !important;
    overflow-y: auto !important;
    border-left: 1px solid #e8e8e8 !important;
    background: #fff !important;
    z-index: 50 !important;
}

.rtl .learning-page__sidebar {
    border-left: none !important;
    border-right: 1px solid #e8e8e8 !important;
}

/* Main content inner - remove padding, fill space */
.learning-page__main-content {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
}

/* Simplebar wrappers - full width, allow scrolling */
.learning-page__main-content .simplebar-wrapper,
.learning-page__main-content .simplebar-mask,
.learning-page__main-content .simplebar-offset,
.learning-page__main-content .simplebar-content-wrapper,
.learning-page__main-content .simplebar-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.learning-page__main-content .simplebar-content-wrapper {
    overflow-y: auto !important;
}

/* Inner main content container */
.learning-page__main-content #mainContent {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove white card padding/rounding around player */
.learning-page__main-content .bg-white.rounded-24.p-16 {
    padding: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Video player card - fills width, good height */
.learning-page__file-player-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    position: relative !important;
    border-radius: 0 !important;
    margin: 0 !important;
    background-color: #000 !important;
    overflow: hidden !important;
}

/* Iframe/video fills the player card */
.learning-page__file-player-card > iframe,
.learning-page__file-player-card > video,
.learning-page__file-player-card .plyr,
.learning-page__file-player-card .plyr__video-embed,
.learning-page__file-player-card .plyr--video,
.learning-page__file-player-card iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Cover image before play */
.learning-page__file-player-card img.img-cover {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Play button - centered */
.learning-page__file-player-card .file-player-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5 !important;
}

/* Plyr video wrapper */
.learning-page__file-player-card .plyr__video-wrapper {
    height: 100% !important;
}

/* Gray bg override */
.learning-page__file-player-card iframe.bg-gray-200,
.learning-page__file-player-card .bg-gray-200 {
    background-color: #000 !important;
}

/* Remove margin-bottom from player card */
.learning-page__file-player-card.mb-16 {
    margin-bottom: 0 !important;
}

/* Item footer below video */
.learning-page__main-content .learning-page-item-footer {
    padding: 16px !important;
    background: var(--white) !important;
}

/* Mobile responsive - stack video and sidebar vertically */
@media (max-width: 991px) {
    .learning-page {
        flex-direction: column !important;
        height: auto !important;
        overflow: auto !important;
    }
    .learning-page__main {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    .learning-page__sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border-left: none !important;
        border-top: 1px solid #e8e8e8 !important;
    }
    .rtl .learning-page__sidebar {
        border-right: none !important;
    }
}


/* === Side-Click Navigation Overlays === */
.vx-video-nav-overlay {
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.vx-video-nav-overlay:hover {
    opacity: 1;
}

.vx-video-nav-overlay--prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 20px;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

.vx-video-nav-overlay--next {
    right: 0;
    justify-content: flex-end;
    padding-right: 20px;
    background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
}

/* RTL support */
.rtl .vx-video-nav-overlay--prev {
    left: auto;
    right: 0;
    padding-right: 20px;
    padding-left: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
}
.rtl .vx-video-nav-overlay--next {
    right: auto;
    left: 0;
    padding-left: 20px;
    padding-right: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

.vx-video-nav-overlay__icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background 0.2s ease;
}
.vx-video-nav-overlay:hover .vx-video-nav-overlay__icon {
    transform: scale(1.1);
    background: rgba(255,255,255,1);
}

.vx-video-nav-overlay__icon svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

/* ============================================= */
/* Mobile Bottom Navigation Bar - Mobile Only    */
/* ============================================= */
@media (min-width: 769px) {
    .vx-mobile-nav-bar { display: none !important; }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 100px !important;
    }
    .vx-mobile-nav-bar {
        position: fixed;
        bottom: 25px;
        left: 5%;
        right: 5%;
        height: 70px;
        background: #000000;
        border-radius: 20px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        -webkit-tap-highlight-color: transparent;
    }
    .vx-mobile-nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none !important;
        color: #adb5bd;
        font-weight: 600;
        font-size: 10px;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        padding: 5px;
    }
    .vx-mobile-nav-item:hover, .vx-mobile-nav-item:focus {
        text-decoration: none !important;
        color: #adb5bd;
    }
    .vx-mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 4px;
        transition: 0.4s;
        z-index: 2;
    }
    .vx-mobile-nav-item span {
        white-space: nowrap;
        font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    }
    .vx-mobile-nav-item.active {
        color: #ffffff;
        transform: translateY(-8px);
    }
    .vx-mobile-nav-item.active:hover, .vx-mobile-nav-item.active:focus {
        color: #ffffff;
    }
    .vx-mobile-nav-item.active i {
        font-size: 20px;
    }
    .vx-mobile-nav-dot {
        position: absolute;
        bottom: -12px;
        width: 6px;
        height: 6px;
        background: #ffffff;
        border-radius: 50%;
        opacity: 0;
        transform: scale(0);
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .vx-mobile-nav-item.active .vx-mobile-nav-dot {
        opacity: 1;
        transform: scale(1);
    }
    .vx-mobile-nav-home {
        background: #ffffff !important;
        color: #000000 !important;
        width: 50px;
        height: 50px;
        border-radius: 15px;
        justify-content: center;
        margin-top: -35px;
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
        border: 4px solid #ffffff;
    }
    .vx-mobile-nav-home:hover, .vx-mobile-nav-home:focus {
        color: #000000 !important;
    }
    .vx-mobile-nav-home i {
        margin: 0 !important;
        font-size: 20px !important;
        color: #000000 !important;
    }
    .vx-mobile-nav-home.active {
        transform: translateY(-8px);
        box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
    }
    .vx-mobile-nav-home .vx-mobile-nav-dot { display: none; }
    .vx-mobile-nav-home span { display: none; }
}

/* ============================================= */
/* Mobile Content-First Layout                    */
/* Courses, Products, Organizations pages         */
/* ============================================= */
@media (max-width: 991px) {
    /* Reorder: content column first, sidebar hidden */
    main .row {
        display: flex !important;
        flex-direction: column !important;
    }
    main .row > .col-12.col-lg-9 {
        order: 1 !important;
        margin-top: 12px !important;
    }
    main .row > .col-12.col-lg-3 {
        order: 2 !important;
        display: none !important;
    }
}

/* ============================================= */
/* Course Card - Icons Row (live streaming etc)   */
/* ============================================= */
.vx-course-card__icons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.vx-course-card__type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #555;
}
.vx-course-card__type-icon--live {
    background: #fee2e2;
    color: #dc2626;
    position: relative;
}
.vx-course-card__live-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
    animation: vx-pulse 1.5s infinite;
}
@keyframes vx-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Course card cart button */
.vx-course-card__btn--cart {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.vx-course-card__btn--cart:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* ============================================= */
/* Cart Drawer - Fix z-index over mobile nav      */
/* ============================================= */
@media (max-width: 768px) {
    .cart-drawer {
        z-index: 99999 !important;
    }
    .cart-drawer-mask {
        z-index: 99998 !important;
    }
    /* Add bottom padding to cart drawer so content isn't hidden behind mobile nav */
    .cart-drawer__body {
        padding-bottom: 120px !important;
    }
}

/* ============================================= */
/* Mobile Card Layouts - Content First            */
/* Books: title → price → buy at top              */
/* Courses: title → subscribe → description       */
/* ============================================= */
@media (max-width: 768px) {
    /* Course cards on mobile - reorder body content */
    .vx-course-card__body {
        display: flex;
        flex-direction: column;
    }
    .vx-course-card__title { order: 1; }
    .vx-course-card__actions { order: 2; margin-top: 10px !important; margin-bottom: 8px; }
    .vx-course-card__tag-row { order: 3; }
    .vx-course-card__instructor { order: 4; }
    .vx-course-card__icons-row { order: 5; }
    .vx-course-card__price-block { order: 6; }

    /* Product/Book cards on mobile - title → price → buy */
    .vx-product-card__body {
        display: flex;
        flex-direction: column;
    }
    .vx-product-card__title { order: 1; }
    .vx-product-card__price-block { order: 2; margin-top: 8px !important; }
    .vx-product-card__actions { order: 3; margin-top: 8px !important; }
    .vx-product-card__tag-row { order: 4; margin-top: 8px; }
    .vx-product-card__instructor { order: 5; }
}


/* ==========================================
   TOP CATEGORIES STRIP
   ========================================== */
.vx-top-categories {
    direction: rtl;
    margin-bottom: 8px;
    overflow: visible;
}
.vx-top-categories__scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 12px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.vx-top-categories__scroll::-webkit-scrollbar {
    display: none;
}
.vx-top-categories__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f0f2f5;
    border-radius: 50px;
    white-space: nowrap;
    text-decoration: none !important;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 2px solid #e0e3e8;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.vx-top-categories__item:hover {
    background: #e2e5ea;
    text-decoration: none !important;
    color: #333;
    border-color: #c0c4cc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.vx-top-categories__item.active {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    border-color: #357abd;
    box-shadow: 0 3px 10px rgba(53,122,189,0.35);
}
.vx-top-categories__item.active:hover {
    background: linear-gradient(135deg, #357abd, #2a6299);
    color: #fff;
}
.vx-top-categories__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
.vx-top-categories__icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}
.vx-top-categories__item.active .vx-top-categories__icon img {
    filter: brightness(0) invert(1);
}
.vx-top-categories__icon i {
    font-size: 15px;
}
.vx-top-categories__label {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
}



/* Mobile categories adjustments */
@media (max-width: 768px) {
    .vx-top-categories {
        margin-bottom: 4px;
    }
    .vx-top-categories__item {
        padding: 8px 14px;
        font-size: 13px;
    }
    .vx-top-categories__icon {
        width: 22px;
        height: 22px;
    }
    .vx-top-categories__icon img {
        width: 18px;
        height: 18px;
    }
    .vx-top-categories__label {
        font-size: 12px;
        font-weight: 500;
    }
}




/* ==========================================
   MOBILE: Bigger, cleaner cart icon in header
   ========================================== */
@media (max-width: 768px) {
    .js-view-cart-drawer {
        width: 44px !important;
        height: 44px !important;
        background: rgba(255,255,255,0.2) !important;
        border-radius: 12px !important;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .js-view-cart-drawer .icons {
        width: 26px !important;
        height: 26px !important;
        opacity: 1 !important;
    }
    .js-view-cart-drawer .js-cart-counter,
    .theme-header-1__top-navbar-cart-counter {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        min-width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        background: #ff3b30 !important;
        border-radius: 10px !important;
        padding: 0 5px !important;
        box-shadow: 0 2px 6px rgba(255,59,48,0.4) !important;
    }
}
