/* =========================================
   LCM Front-End: MODERN ACADEMIC LIST VIEW
   ========================================= */

/* Removed external font imports to allow theme inheritance */

:root {
    /* --- Palette: Academic Trust & Clarity --- */
    --lcm-primary: #0f172a;
    /* Midnight Navy (Text/Headers) */

    /* Educational Accent (Bright Royal Blue -> Cyan) */
    --lcm-accent: #2563eb;
    --lcm-accent-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);

    --lcm-surface-glass: #ffffff;
    --lcm-bg-gradient: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    /* Light Sky tint */
    --lcm-border-soft: #e2e8f0;

    /* Fonts: Inherit from theme */
    --lcm-font-main: inherit;
    --lcm-font-serif: inherit;

    /* Effects */
    --lcm-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --lcm-shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --lcm-radius: 16px;
}

.lcm-portal-divider {
    border: none;
    border-top: 2px dashed #e2e8f0;
    margin: 50px auto;
    max-width: 300px;
}

.lcm-container {
    font-family: var(--lcm-font-main);
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    color: var(--lcm-primary);
}

/* =========================================
      1. Layout: Vertical Stack (List View)
      ========================================= */
/* Grid layout removed in favor of Table view */

/* =========================================
      3. Modern Buttons
      ========================================= */
.lcm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

/* Request Button: Educational Blue Gradient */
.lcm-button.request-button {
    background: var(--lcm-accent-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.lcm-button.request-button:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.3);
}

/* Download: Outline Style */
.lcm-button.download-button {
    background: white;
    border: 1px solid var(--lcm-accent);
    color: var(--lcm-accent);
}

.lcm-button.download-button:hover {
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* PDF: Simple Link Style */
.lcm-button.download-button-pdf {
    background: transparent;
    color: #94a3b8;
    padding: 10px;
}

.lcm-button.download-button-pdf:hover {
    color: var(--lcm-accent);
}

.lcm-download-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Email Button: Purple tint */
.lcm-button.email-button {
    background: #f5f3ff;
    border: 1px solid #7c3aed;
    color: #7c3aed;
}

.lcm-button.email-button:hover {
    background: #ede9fe;
}

/* WhatsApp Button: Green tint */
.lcm-button.whatsapp-button {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    color: #16a34a;
}

.lcm-button.whatsapp-button:hover {
    background: #dcfce7;
}

.lcm-button.email-button.success,
.lcm-button.whatsapp-button.success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #10b981;
}

/* Tablet & Desktop: Compact buttons in table */
@media (min-width: 769px) {
    .lcm-download-actions .lcm-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* =========================================
      4. Verification Portal: Polished & Seamless
      ========================================= */
.lcm-verify-container {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 50px 30px !important;
    /* Force padding */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f1f5f9 !important;
    margin-bottom: 60px !important;
    text-align: center !important;
    max-width: 750px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
}

.lcm-verify-title {
    font-family: var(--lcm-font-serif) !important;
    font-size: 2.2rem !important;
    margin-bottom: 15px !important;
    color: var(--lcm-primary) !important;
}

.lcm-verify-subtitle {
    font-size: 1rem !important;
    color: #64748b !important;
    margin-bottom: 40px !important;
}

/* Seamless Pill Design */
/* Seamless Pill Design */
.lcm-verify-input-group {
    display: flex !important;
    align-items: stretch !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    background: #fff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 100px !important;
    padding: 5px !important;
    /* Slightly increased padding */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
}

.lcm-verify-input-group:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.lcm-verify-input {
    flex: 1 !important;
    padding: 15px 25px !important;
    /* Increased padding */
    border: none !important;
    background: transparent !important;
    font-size: 1.1rem !important;
    color: var(--lcm-primary) !important;
    outline: none !important;
    border-radius: 100px !important;
    margin: 0 !important;
}

/* Button inside the pill */
.lcm-verify-btn {
    padding: 12px 40px !important;
    /* Increased padding */
    background: var(--lcm-accent-gradient) !important;
    color: white !important;
    border-radius: 100px !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    transition: transform 0.2s !important;
    margin: 0 !important;
}

.lcm-verify-btn:hover {
    transform: scale(1.02);
    filter: brightness(105%);
}

/* ========================
      RESULT CARD: Official Document Style
      ======================== */
.lcm-result-card {
    margin-top: 30px !important;
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    text-align: start !important;
    /* Direction aware */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
    animation: fadeInUp 0.5s ease !important;
    max-width: 650px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 30px !important;
}

/* Status Header Banner */
.lcm-result-header {
    padding: 20px 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Valid State */
.lcm-result-valid .lcm-result-header {
    background: #f0fdf4;
    color: #166534;
}

.lcm-result-valid .lcm-result-header::before {
    content: '✓';
    /* Checkmark */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
}

/* Invalid State */
.lcm-result-invalid .lcm-result-header {
    background: #fef2f2;
    color: #991b1b;
}

.lcm-result-invalid .lcm-result-header::before {
    content: '!';
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
}

.lcm-result-status-text {
    font-weight: 800;
    font-size: 1.3rem;
    font-family: var(--lcm-font-serif);
}

.lcm-result-body {
    padding: 30px;
}

.lcm-result-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.05rem;
}

.lcm-result-row:last-child {
    border-bottom: none;
}

.lcm-result-label {
    color: #64748b;
    font-weight: 500;
}

.lcm-result-value {
    color: var(--lcm-primary);
    font-weight: 700;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lcm-lectures-table-wrapper table {
    border: none !important;
    box-shadow: none !important;
}

/* =========================================
      5. Mobile Responsive (Stack back to cards)
      ========================================= */
@media (max-width: 768px) {
    .lcm-card {
        grid-template-columns: 1fr;
        /* Stack vertically on phone */
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
    }

    .lcm-card::before {
        width: 100%;
        height: 4px;
        bottom: 0;
        top: auto;
        right: 0;
        background: var(--lcm-accent-gradient);
    }

    .lcm-card-header {
        text-align: center;
    }

    .lcm-card-body {
        border: none;
        border-top: 1px solid #f1f5f9;
        border-bottom: 1px solid #f1f5f9;
        padding: 20px 0;
        width: 100%;
    }

    .lcm-card-actions {
        justify-content: center;
        width: 100%;
    }

    .lcm-download-actions {
        flex-direction: column;
        width: 100%;
    }

    .lcm-button {
        width: 100%;
    }

    /* Verify Section Mobile */
    .lcm-verify-container {
        padding: 30px 20px !important;
        margin-bottom: 40px !important;
    }

    .lcm-verify-title {
        font-size: 1.8rem !important;
    }

    /* Break the Pill */
    .lcm-verify-input-group {
        flex-direction: column;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        gap: 15px;
        background: transparent !important;
    }

    .lcm-verify-input {
        background: #fff !important;
        border: 2px solid #e2e8f0 !important;
        border-radius: 15px !important;
        padding: 15px 20px !important;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
    }

    .lcm-verify-input:focus {
        border-color: #3b82f6 !important;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15) !important;
    }

    .lcm-verify-btn {
        width: 100% !important;
        border-radius: 15px !important;
        padding: 16px !important;
        font-size: 1.1rem !important;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
    }
}

/* =========================================
      6. Premium Table View (Responsive Card Transformation)
      ========================================= */
.lcm-lectures-table-wrapper {
    margin-top: 40px;
    background: transparent;
    border: none !important;
    /* User requested removal */
    box-shadow: none !important;
}

.lcm-lectures-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    /* Floating rows effect */
}

/* --- Desktop Header --- */
.lcm-lectures-table thead th {
    background: var(--lcm-accent);
    /* Distinctive Educational Blue */
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 25px;
    border: none;
    text-align: center;
    font-family: var(--lcm-font-main);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* --- Desktop Rows (Floating Cards) --- */
.lcm-lectures-table tbody tr {
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lcm-lectures-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    /* Blue accent glo */
}

.lcm-lectures-table td {
    padding: 20px 25px;
    border: none;
    vertical-align: middle;
    color: var(--lcm-primary);
    background: #fff;
    /* Ensure bg covers spacing */
    text-align: center;
}

/* Rounded Corners for Rows - Pure CSS Trick for separate-border tables not needed if display block, but good for table */
.lcm-lectures-table td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.lcm-lectures-table td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* RTL Flipped */

.lcm-lectures-table td:nth-child(1) {
    font-weight: 600;
    color: #64748b;
}

/* Date */
.lcm-lectures-table td:nth-child(2) {
    font-weight: 800;
    font-size: 1.1rem;
}

/* Subject */
.lcm-lectures-table td:nth-child(3) {
    font-weight: 700;
    color: var(--lcm-accent);
}

/* Fees */

/* --- Mobile "Premium Ticket" Card View --- */
@media (max-width: 768px) {
    .lcm-lectures-table-wrapper {
        margin-top: 20px;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .lcm-lectures-table thead {
        display: none;
    }

    .lcm-lectures-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        margin-bottom: 25px;
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        /* Deep Shadow */
        overflow: hidden;
        border: 1px solid #f1f5f9;
        transition: transform 0.2s;
    }

    .lcm-lectures-table tbody tr:active {
        transform: scale(0.98);
    }

    /* 1. Header: Subject (2nd column usually) */
    .lcm-lectures-table td:nth-child(2) {
        order: -1;
        background: var(--lcm-bg-gradient);
        /* Light blue bg */
        padding: 25px 20px;
        text-align: center;
        border-bottom: 1px solid #e1e8f0;
    }

    .lcm-lectures-table td:nth-child(2)::before {
        display: none;
    }

    /* Subject Text */
    .lcm-lectures-table td:nth-child(2) {
        font-family: var(--lcm-font-serif);
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--lcm-primary);
        display: block;
        /* ensure block layout for text */
    }

    /* 2. Meta Grid: Date (1) & Fees (3) */
    .lcm-lectures-table td:nth-child(1),
    .lcm-lectures-table td:nth-child(3) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 25px;
        border-bottom: 1px dashed #e2e8f0;
        font-size: 1rem;
        color: #475569;
    }

    .lcm-lectures-table td:nth-child(1)::before,
    .lcm-lectures-table td:nth-child(3)::before {
        content: attr(data-label);
        font-weight: 600;
        color: #94a3b8;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Fees Value Color */
    .lcm-lectures-table td:nth-child(3) {
        color: var(--lcm-accent);
        font-weight: 700;
    }

    /* 3. Footer: Status & Action (4) */
    .lcm-lectures-table td:nth-child(4) {
        padding: 25px;
        background: #fcfcfc;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        justify-content: center;
    }

    .lcm-lectures-table td:nth-child(4)::before {
        display: none;
    }

    /* Full Width Button in Mobile List */
    .lcm-lectures-table .lcm-button {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 1rem;
    }
}

/* =========================================
      7. Eligibility Checker & Global Alert
      ========================================= */

/* Global Alert */
.lcm-global-alert {
    background: #fff9e6;
    border-right: 5px solid #ffcc00;
    padding: 15px 20px;
    border-radius: 10px;
    color: #856404;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.1);
}

.lcm-alert-icon {
    font-size: 24px;
}

/* Eligibility Checker Styles */
.lcm-eligibility-checker {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    margin: 40px auto;
    text-align: center;
}

.lcm-eligibility-form {
    margin: 25px 0;
}

.lcm-form-group {
    display: flex;
    gap: 10px;
}

.lcm-form-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.lcm-form-group input:focus {
    border-color: #2563eb;
    outline: none;
}

.lcm-results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: right;
}

.lcm-results-table th,
.lcm-results-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.lcm-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-issued {
    background: #d1fae5;
    color: #065f46;
}

.status-available {
    background: #dbeafe;
    color: #1e40af;
}

/* Eligibility Checker Polished Results */
.lcm-eligibility-results {
    animation: fadeInUp 0.5s ease;
}

.lcm-warning-box,
.lcm-info-box,
.lcm-success-box {
    padding: 20px !important;
    border-radius: 12px !important;
    margin: 25px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    font-size: 1.05rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid transparent !important;
    line-height: 1.5 !important;
}

.lcm-warning-box {
    background: #fff5f5 !important;
    border-color: #feb2b2 !important;
    color: #c53030 !important;
}

.lcm-info-box {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
    color: #0369a1 !important;
}

.lcm-success-box {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}

.lcm-warning-box .dashicons,
.lcm-info-box .dashicons,
.lcm-success-box .dashicons {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
}

.lcm-no-results {
    padding: 40px !important;
    background: #f8fafc !important;
    border-radius: 15px !important;
    color: #64748b !important;
    margin-top: 30px !important;
}

@media screen and (max-width: 600px) {
    .lcm-form-group {
        flex-direction: column;
    }

    .lcm-eligibility-checker {
        padding: 20px;
    }
}

/* =========================================
      8. Premium WhatsApp Modal
      ========================================= */

.lcm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    /* Use viewport width */
    height: 100vh;
    /* Use viewport height */
    background: transparent;
    /* No dark overlay */
    backdrop-filter: none;
    /* No blur */
    z-index: 999999;
    /* Very high z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    pointer-events: auto;
    /* Still block clicks to page */
}

.lcm-whatsapp-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 95%;
    /* Responsive width */
    max-width: 480px;
    /* Slightly wider */
    margin: 20px;
    /* Safety margin on mobile */
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(0);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
    /* Prevent clipping of shadows/focus rings */
    font-family: var(--lcm-font-main);
    text-align: center;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

/* Ensure all children inherit box-sizing */
.lcm-whatsapp-modal * {
    box-sizing: border-box;
}

.lcm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    /* RTL aware? In LTR it's right. For RTL maybe left. */
    background: transparent;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

/* RTL Adjustment for close button if needed */
body.rtl .lcm-modal-close {
    right: auto;
    left: 15px;
}

.lcm-modal-header {
    background: #f0fdf4;
    /* Light green bg */
    padding: 30px 20px;
    border-bottom: 1px solid #dcfce7;
}

.lcm-modal-header .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #16a34a;
    /* WhatsApp Green */
    margin-bottom: 15px;
}

.lcm-modal-header h3 {
    margin: 0;
    color: #166534;
    font-size: 1.5rem;
    font-weight: 700;
}

.lcm-modal-header p {
    margin: 10px 0 0;
    color: #15803d;
    font-size: 0.95rem;
}

.lcm-modal-body {
    padding: 30px;
}

/* Input Group: LTR forcefully for phone entry */
.lcm-input-group.ltr-input {
    display: flex;
    direction: ltr;
    /* Force LTR for phone numbers */
    gap: 12px;
    align-items: center;
    width: 100%;
    /* Full width */
}

.lcm-country-select {
    width: 130px;
    flex-shrink: 0;
    /* Prevent shrinking */
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    height: 50px;
    /* Fixed height for consistency */
    appearance: none;
}

.lcm-phone-input {
    flex: 1;
    min-width: 0;
    /* Allow shrinking if needed */
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s;
    font-family: monospace;
    height: 50px;
    /* Fixed height for consistency */
    width: 100%;
    /* Take remaining space */
}

.lcm-phone-input:focus,
.lcm-country-select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.lcm-modal-footer {
    padding: 0 30px 30px;
}

.lcm-button.full-width {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    /* Green Gradient */
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.lcm-button.full-width:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}