/* ============================================================
   RECORDED WEBINARS — recorded-webinars.css
   Theme: Purple Brand  |  all colours via :root variables
   ============================================================ */

:root {
    /* Primary Brand */
    --primary:        #7C4DFF;
    --primary-dark:   #6236E8;
    --primary-light:  #A78BFA;

    /* Accent */
    --accent:         #F4C542;
    --accent-dark:    #EAB308;

    /* Backgrounds */
    --bg:             #FFFFFF;
    --bg-soft:        #F8F7FC;
    --bg-section:     #F3F0FF;

    /* Text */
    --text-dark:      #17152B;
    --text-medium:    #5E5B75;
    --text-light:     #8D89A6;

    /* Borders */
    --border:         #E8E5F5;

    /* Shadows */
    --shadow-sm:      0 4px 12px rgba(124, 77, 255, 0.08);
    --shadow-md:      0 8px 24px rgba(124, 77, 255, 0.12);
    --shadow-lg:      0 15px 40px rgba(124, 77, 255, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7C4DFF 0%, #8B5CF6 50%, #A855F7 100%);
    --gradient-hero:    linear-gradient(135deg, #6D28D9 0%, #7C3AED 50%, #9333EA 100%);
}

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.rw-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 32px 24px 56px;
    background: var(--bg-soft);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    color: var(--text-dark);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.rw-header {
    text-align: center;
    margin-bottom: 28px;
}

.rw-header h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.rw-header h1 i {
    /* icon colour falls back to gradient start */
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 30px;
}

.rw-header p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.rw-search-form {
    max-width: 540px;
    margin: 0 auto 28px;
}

.rw-search-wrap {
    position: relative;
}

.rw-search-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
    pointer-events: none;
}

.rw-search-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 20px 0 46px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

.rw-search-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}

.rw-search-wrap input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

/* ============================================================
   TOOLBAR  (top + bottom shared)
   ============================================================ */
.rw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rw-toolbar-bottom {
    margin-top: 28px;
    margin-bottom: 0;
}

.rw-toolbar-left,
.rw-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Results count pill */
.rw-results-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    background: var(--bg-section);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 8px;
    white-space: nowrap;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.rw-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.rw-pagination a,
.rw-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text-medium);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.rw-pagination a:hover {
    background: var(--bg-section);
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.rw-pagination span.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.rw-pagination span.disabled {
    opacity: 0.38;
    pointer-events: none;
}

.rw-page-numbers {
    display: flex;
    gap: 4px;
}

/* Per-page select */
.rw-per-page-form {
    display: inline-block;
}

.rw-per-page-form select {
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rw-per-page-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

/* ============================================================
   FILTER BUTTON  &  CLEAR BUTTON
   ============================================================ */
.rw-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 18px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.rw-filter-btn:hover {
    background: var(--gradient-hero);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.rw-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: var(--bg);
    color: #DC2626;
    border: 1.5px solid #FECACA;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.rw-clear-btn:hover {
    background: #FEF2F2;
    color: #DC2626;
    text-decoration: none;
}

/* ============================================================
   FILTER PANEL
   ============================================================ */
.rw-filter-panel {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    display: none;
}

.rw-filter-panel.open {
    display: block;
    animation: rwSlideDown 0.25s ease;
}

@keyframes rwSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.rw-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rw-filter-group h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.rw-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.rw-filter-option:hover {
    background: var(--bg-section);
    color: var(--primary);
}

.rw-filter-option input[type="checkbox"],
.rw-filter-option input[type="radio"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.rw-filter-empty {
    font-size: 13px;
    color: var(--text-light);
    padding: 6px 10px;
}

.rw-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.rw-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 28px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, transform 0.15s;
}

.rw-apply-btn:hover {
    background: var(--gradient-hero);
    transform: translateY(-1px);
}

/* ============================================================
   WEBINAR GRID
   ============================================================ */
.rw-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ============================================================
   WEBINAR CARD
   ============================================================ */
.rw-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s;
    box-shadow: var(--shadow-sm);
}

.rw-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* --- Badge row --- */
.rw-badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rw-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.rw-badge-demand {
    background: var(--bg-section);
    color: var(--primary);
    border: 1px solid #DDD6FE;
}

.rw-badge-duration {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.rw-badge-avail {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.rw-badge-zoom {
    background: #E0F2FE;
    color: #075985;
    border: 1px solid #BAE6FD;
}

/* --- Title --- */
.rw-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    transition: color 0.2s;
    margin: 0;
}

.rw-card:hover .rw-card-title {
    color: var(--primary);
}

/* --- Instructor --- */
.rw-instructor {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.rw-inst-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.rw-inst-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rw-inst-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.rw-inst-desig {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

/* --- Footer --- */
.rw-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.rw-price-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.rw-price-free {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    background: #ECFDF5;
    color: #065F46;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #A7F3D0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rw-enroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    line-height: 1;
}

.rw-enroll-btn:hover {
    background: var(--gradient-hero);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
    text-decoration: none;
}

/* --- Empty state --- */
.rw-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.rw-empty i {
    font-size: 48px;
    color: var(--primary-light);
    margin-bottom: 16px;
    display: block;
}

.rw-empty p {
    font-size: 15px;
    font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Two-column grid → single below 768px */
@media (max-width: 768px) {
    .rw-grid {
        grid-template-columns: 1fr;
    }
}

/* Three-column filter → single below 680px */
@media (max-width: 680px) {
    .rw-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Toolbar stacks on small screens */
@media (max-width: 900px) {
    .rw-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rw-toolbar-left,
    .rw-toolbar-right {
        justify-content: center;
    }

    .rw-pagination {
        justify-content: center;
    }

    .rw-filter-btn,
    .rw-clear-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rw-page {
        padding: 20px 14px 40px;
    }

    .rw-header h1 {
        font-size: 26px;
    }

    .rw-card {
        padding: 14px 16px;
    }

    .rw-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .rw-enroll-btn {
        width: 100%;
        justify-content: center;
    }

    .rw-pagination a,
    .rw-pagination span {
        font-size: 12px;
        padding: 0 8px;
        min-width: 30px;
        height: 32px;
    }
}