/* Udaan Stress Awareness Test - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #e0e7ff;
    --secondary: #0ea5e9;
    --accent-red: #e11d48;
    --accent-gold: #f59e0b;
    --success: #10b981;
    --dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Poppins', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
}

/* Header & Branding */
.brand-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: #ffffff;
    border-bottom: 4px solid #f59e0b;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.brand-logo-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.udaan-brand-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, #ffffff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.marathi-text {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

/* Card Styling */
.custom-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-card-header {
    background-color: #ffffff;
    border-bottom: 2px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Assessment Matrix Table with Frozen / Sticky Symptoms Column */
.matrix-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    position: relative;
    max-width: 100%;
}

.matrix-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table thead th {
    background: #1e293b;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    border-top: 1px solid #334155;
    border-bottom: 2px solid #334155;
    border-right: 1px solid #334155;
}

/* Sticky Column 1: Header */
.matrix-table thead th.symptom-header,
.matrix-table thead th.symptom-col,
.matrix-table thead th:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 10;
    text-align: left;
    min-width: 250px;
    max-width: 280px;
    background: #0f172a !important;
    color: #ffffff;
    border-right: 3px solid #f59e0b !important;
    box-shadow: 4px 0 10px -2px rgba(0, 0, 0, 0.25);
}

.matrix-table tbody td {
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 10px 8px;
    vertical-align: middle;
    font-size: 0.9rem;
    background-color: #ffffff;
}

/* Sticky Column 1: Body Cells */
.matrix-table tbody td.symptom-col,
.matrix-table tbody td:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: #ffffff;
    min-width: 250px;
    max-width: 280px;
    border-right: 3px solid #cbd5e1;
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.1);
}

.matrix-table tbody tr:nth-child(even) td {
    background-color: #f8fafc;
}

.matrix-table tbody tr:nth-child(even) td.symptom-col,
.matrix-table tbody tr:nth-child(even) td:first-child {
    background-color: #f8fafc;
}

.matrix-table tbody tr:hover td {
    background-color: #eff6ff;
}

.matrix-table tbody tr:hover td.symptom-col,
.matrix-table tbody tr:hover td:first-child {
    background-color: #eff6ff;
}

.matrix-table tbody tr.row-completed td {
    background-color: #f0fdf4;
}

.matrix-table tbody tr.row-completed td.symptom-col,
.matrix-table tbody tr.row-completed td:first-child {
    background-color: #f0fdf4;
    border-right-color: #86efac;
}

.matrix-table tbody tr.row-completed:hover td,
.matrix-table tbody tr.row-completed:hover td.symptom-col,
.matrix-table tbody tr.row-completed:hover td:first-child {
    background-color: #dcfce7;
}

.matrix-table .radio-cell {
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.matrix-table .radio-cell:hover {
    background-color: #dbeafe !important;
}

.matrix-table .form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0 auto;
}

.matrix-table .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Mobile Scroll Indicator Badge */
.mobile-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* =========================================================
   Mobile Symptom Interactive Cards
   ========================================================= */
.symptom-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    position: relative;
}

.symptom-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.symptom-card.card-completed {
    border-color: #10b981;
    background: #fcfdfc;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
}

.symptom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.symptom-card-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.symptom-card.card-completed .symptom-card-number {
    background: #d1fae5;
    color: #065f46;
}

.symptom-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 3px;
}

.symptom-card-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.symptom-status-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

/* Frequency Option Buttons in Mobile Card */
.symptom-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

.mobile-option-item:active {
    transform: scale(0.98);
}

.mobile-option-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mobile-option-item.selected {
    background: #eef2ff !important;
    border-color: #4f46e5 !important;
    color: #1e1b4b !important;
    box-shadow: 0 0 0 1.5px #4f46e5;
}

.mobile-option-item.selected .mobile-option-radio-circle {
    border-color: #4f46e5;
    background: #4f46e5;
}

.mobile-option-item.selected .mobile-option-radio-circle::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.mobile-option-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-right: 10px;
}

.mobile-option-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
}

.mobile-option-item.selected .mobile-option-title {
    color: #312e81;
}

.mobile-option-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.25;
    margin-top: 2px;
}

.mobile-option-item.selected .mobile-option-subtitle {
    color: #4338ca;
}

.mobile-option-radio-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #ffffff;
}

/* View Switcher Tabs */
.view-switcher-pill {
    background: #f1f5f9;
    border-radius: 25px;
    padding: 3px;
    display: inline-flex;
    border: 1px solid #e2e8f0;
}

.view-switcher-pill .btn {
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
}

.view-switcher-pill .btn.active {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* Quote and Counselling Info Boxes */
.quote-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #d97706;
    border-radius: 12px;
    padding: 18px 24px;
    color: #78350f;
    font-weight: 600;
}

.confidential-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 5px solid #059669;
    border-radius: 12px;
    padding: 18px 24px;
    color: #065f46;
}

.mentor-contact-badge {
    background: #ffffff;
    border: 2px dashed #4f46e5;
    border-radius: 14px;
    padding: 16px 20px;
}

/* Mobile responsive view for questionnaire with Frozen Column */
@media (max-width: 768px) {
    .matrix-table thead th.symptom-header,
    .matrix-table thead th.symptom-col,
    .matrix-table thead th:first-child,
    .matrix-table tbody td.symptom-col,
    .matrix-table tbody td:first-child {
        min-width: 145px !important;
        max-width: 155px !important;
        width: 145px !important;
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }

    .matrix-table thead th {
        font-size: 0.72rem;
        padding: 8px 4px;
        min-width: 88px;
    }

    .matrix-table tbody td {
        padding: 8px 4px;
    }

    .udaan-brand-title {
        font-size: 1.6rem;
    }

    /* Scroll shadow indicator for mobile */
    .matrix-table-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08));
        pointer-events: none;
    }
}

/* Print Styling for reports matching original sheet */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }
    .no-print {
        display: none !important;
    }
    .matrix-table thead th {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    .matrix-table td {
        border: 1px solid #000 !important;
    }
    .custom-card {
        border: none !important;
        box-shadow: none !important;
    }
    .print-only {
        display: block !important;
    }
}
