/* 
  FOLDER/FILE PATH: public/survey/style.css
  VERSION NO: 3.0.0
  DATE: 2026-07-17
  PURPOSE OF THE FILE: Implements the exact official ICAO visual specification requirements. 
  Utilizes the Open Sans and Roboto font families alongside a high-contrast corporate navy 
  and aviation cyan color matrix to guarantee accessibility and regulatory visual compliance.
*/

:root {
    /* ── ICAO OFFICIAL COLOR PALETTE ── */
    --navy:    #002F6C;    /* Deep Corporate Blue */
    --blue:    #0056B3;    /* Secondary Navigation Blue */
    --sky:     #00A3E0;    /* Aviation Cyan / Focus Highlight */
    --accent:  #F0A500;    /* High-Visibility Warning Gold */
    
    /* ── SYSTEM MATRIX NEUTRALS ── */
    --light:   #F8FAFC;    
    --border:  #E2E8F0;    
    --text:    #1E293B;    
    --muted:   #64748B;    
    --white:   #FFFFFF;    
    
    /* ── STRUCTURAL ASSIGNMENTS ── */
    --radius:  6px;        
}

/* ── BASE TYPOGRAPHY & RESET ── */
body {
    font-family: 'Open Sans', -apple-system, sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: 'Roboto', -apple-system, sans-serif;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
}

/* ── FIXED NAVIGATION HEADER ── */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(10, 31, 53, 0.08);
    z-index: 1000;
    padding: 0.8rem 1.5rem;
    box-sizing: border-box;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.airline-logo-nav {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: #F1F5F9;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* ── LANGUAGE CONTROLS ── */
.lang-bar {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ── HERO BANNER COMPONENT ── */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 75px;
    margin-bottom: 2rem;
    background: var(--navy);
}

.hero-aircraft-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.hero-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 47, 108, 0.3) 0%, rgba(0, 47, 108, 0.85) 100%);
}

.hero-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    z-index: 2;
    box-sizing: border-box;
    text-align: center;
}

.hero-overlay-text h1,
.hero-overlay-text h2 {
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay-text .tenant-name {
    font-size: 3rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.hero-overlay-text .survey-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.25rem;
}

.hero-overlay-text .survey-subtitle {
    color: var(--sky);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    max-width: 700px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ── SURVEY INSTRUCTIONS BANNER ── */
.instructions-banner {
    background: var(--white);
    border-left: 6px solid var(--gold, #f2a900);
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.instructions-banner .instructions-inner h2,
.instructions-banner .instructions-inner h3,
.instructions-banner .instructions-inner h4,
.instructions-banner .instructions-inner h5,
.instructions-banner .instructions-inner h6 {
    margin: 0.4rem 0 0.4rem 0;
    color: var(--navy);
}

.instructions-banner .instructions-inner p {
    margin: 0.4rem 0;
}

.instructions-banner .instructions-inner ul {
    margin: 0.4rem 0;
    padding-left: 1.4rem;
}

.instructions-banner .instructions-inner code {
    background: var(--border);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ── PROGRESS BAR ── */
.progress-wrap {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--sky);
    width: 0%;
    transition: width 0.4s ease;
}

/* ── QUESTION NODES ── */
.section-header-card {
    background: var(--white);
    border-left: 6px solid var(--navy);
    padding: 1.2rem 1.5rem;
    margin: 2rem 0 1rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.question-node {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: border 0.3s ease;
}

.question-node.missing-input-warning {
    border: 2px solid var(--accent);
    background: #FFFBF0;
}

.question-body {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.idx-label {
    font-weight: 700;
    color: var(--navy);
    font-size: 1.2rem;
}

.txt-content {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* ── RADIO CONTROLS ── */
.input-binary-wrap {
    display: flex;
    gap: 2rem;
    padding-left: 2.2rem;
}

.input-likert-matrix {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-left: 2.2rem;
}

label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--sky);
}

/* ── DEMOGRAPHICS GRID ── */
.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
}

select, textarea {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select:focus, textarea:focus {
    outline: none;
    border-color: var(--sky);
}

/* ── SUBMISSION CONTROLS ── */
.submit-wrap {
    margin-top: 3rem;
    text-align: center;
}

.btn-submit {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--blue);
}

.btn-submit:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

.status-alert-box-loading {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #E0F2FE;
    color: var(--blue);
    font-weight: 600;
    border-radius: var(--radius);
}

.status-alert-box-error {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #FEE2E2;
    color: #991B1B;
    font-weight: 600;
    border-radius: var(--radius);
}

/* ── RESPONSIVE RULES ── */
@media (max-width: 768px) {
    .demo-grid { grid-template-columns: 1fr; }
    .hero-image-container { height: 220px; }
    .hero-overlay-text .tenant-name { font-size: 2.2rem; }
    .hero-overlay-text .survey-title { font-size: 1.4rem; }
    .hero-overlay-text .survey-subtitle { font-size: 0.9rem; }
    .status-tag { display: none; }
}

/* ── POPUP MODAL (visitors without tenant context) ── */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    box-sizing: border-box;
}

.popup-modal {
    background: var(--white);
    max-width: 600px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.popup-content {
    padding: 2rem;
}

.popup-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    text-align: center;
}

.popup-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.popup-content p strong {
    color: var(--blue);
}

.popup-timer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.popup-close-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

.popup-close-btn:hover {
    background: var(--blue);
}

/* ── CLOSED SURVEY MESSAGE ── */
.survey-closed-banner {
    display: none;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .popup-content {
        padding: 1.5rem;
    }
    .popup-content h2 {
        font-size: 1.2rem;
    }
    .popup-content p {
        font-size: 0.85rem;
    }
}