/* ============================================================
   LIVE WEBINARS — live-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
   ============================================================ */
.lw-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
   ============================================================ */
.lw-header {
    text-align: center;
    margin-bottom: 28px;
}

.lw-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;
}

.lw-header h1 i {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 30px;
}

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

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

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

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

.lw-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);
}

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

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

/* ============================================================
   TOOLBAR
   ============================================================ */
.lw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

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

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

.lw-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
   ============================================================ */
.lw-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.lw-pagination a,
.lw-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;
}

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

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

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

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

.lw-per-page-form {
    display: inline-block;
}

.lw-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;
}

.lw-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
   ============================================================ */
.lw-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;
}

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

.lw-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;
}

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

/* ============================================================
   FILTER PANEL
   ============================================================ */
.lw-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;
}

.lw-filter-panel.open {
    display: block;
    animation: lwSlideDown 0.25s ease;
}

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

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

.lw-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;
}

.lw-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;
}

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

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

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

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

.lw-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;
}

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

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

/* ============================================================
   WEBINAR CARD  (horizontal: date box + content)
   ============================================================ */
.lw-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    box-shadow: var(--shadow-sm);
    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;
}

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

/* --- DATE BOX (left column) --- */
.lw-date-box {
    background: var(--gradient-primary);
    color: #fff;
    width: 110px;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 10px;
    text-align: center;
    flex-shrink: 0;
}

.lw-date-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.lw-date-month {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Status badges inside date box */
.lw-status-badge {
    width: 100%;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lw-status-badge.live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.25);
    animation: lwLiveGlow 2s ease-in-out infinite;
}

.lw-status-badge.upcoming {
    background: rgba(255, 255, 255, 0.18);
    font-size: 10px;
}

.lw-status-badge.ended {
    background: rgba(0, 0, 0, 0.2);
    font-size: 10px;
    letter-spacing: 1px;
}

/* Live pulsing dot */
.live-dot {
    width: 8px;
    height: 8px;
    background: #FF4D4D;
    border-radius: 50%;
    flex-shrink: 0;
    animation: lwPulse 1.2s ease-in-out infinite;
}

@keyframes lwPulse {
    0%   { opacity: 1; transform: scale(1);   }
    50%  { opacity: 0.4; transform: scale(1.4); }
    100% { opacity: 1; transform: scale(1);   }
}

@keyframes lwLiveGlow {
    0%   { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.4); }
    50%  { box-shadow: 0 0 0 5px rgba(255, 77, 77, 0);  }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);    }
}

/* --- CARD CONTENT (right column) --- */
.lw-card-content {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* Title */
.lw-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    transition: color 0.2s;
}

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

/* Test badge */
.lw-test-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

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

.lw-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;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

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

.lw-inst-desig {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

/* Time + duration row */
.lw-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lw-time-zones,
.lw-duration {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.lw-time-zones i,
.lw-duration i {
    font-size: 12px;
}

.lw-sep {
    color: var(--border);
    font-size: 14px;
}

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

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

.lw-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;
}

.lw-enroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    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;
}

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

/* "Join Live" variant — accent colour */
.lw-btn-live {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    animation: lwLiveBtnPulse 2s ease-in-out infinite;
}

.lw-btn-live:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
}

@keyframes lwLiveBtnPulse {
    0%   { box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
    50%  { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6); }
    100% { box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
}

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

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

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

/* ============================================================
   COUNTDOWN (rendered by live-webinars.js)
   ============================================================ */
.countdown {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    text-align: center;
}

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

/* 2-col grid → 1-col */
@media (max-width: 768px) {
    .lw-grid {
        grid-template-columns: 1fr;
    }
}

/* Card: horizontal → vertical on small screens */
@media (max-width: 500px) {
    .lw-card {
        flex-direction: column;
    }

    .lw-date-box {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 12px 16px;
    }

    .lw-date-num {
        font-size: 28px;
    }

    .lw-date-month {
        font-size: 12px;
        margin-bottom: 0;
    }

    .lw-status-badge {
        width: auto;
    }
}

/* Filter 3-col → 1-col */
@media (max-width: 680px) {
    .lw-filter-grid {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

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

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

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

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

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