/* =========================================
   1. FONTS & BASE SETUP
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-orange: #f97316;
    --brand-slate: #0f172a;
    --brand-blue: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
}

body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8fafc; /* Slate-50 */
    color: #1e293b; /* Slate-800 */
}

/* =========================================
   2. REUSABLE COMPONENTS
   ========================================= */

/* Modern Buttons */
.btn-modern {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(249, 115, 22, 0.5);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

/* Input Fields */
.input-field {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.input-field:focus {
    background-color: #ffffff;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    outline: none;
}

/* Required Field Indicator */
.required-star::after {
    content: " *";
    color: #ef4444;
}

/* Custom Sidebar Scrollbar (For History Panel) */
.history-scroll::-webkit-scrollbar {
    width: 4px;
}
.history-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.history-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.history-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================
   3. ANIMATIONS
   ========================================= */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

/* =========================================
   4. TICKET PORTAL STYLES (App Dashboard)
   ========================================= */

/* Tab Switching Logic */
.tab-active {
    background-color: #ffffff;
    color: var(--brand-orange);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tab-inactive {
    color: #64748b; /* Slate-500 */
    background-color: transparent;
}

.tab-inactive:hover {
    color: var(--brand-slate);
    background-color: rgba(255, 255, 255, 0.5);
}

/* Ticket Container (The Visual Ticket) */
.ticket-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Ticket Airline Accents */
.airline-accent {
    /* Default fallback, overridden by JS based on airline */
    background-color: var(--brand-slate); 
    color: white;
}

/* text-mode class is used when the airline color should apply to text, not background */
.airline-accent.text-mode {
    background-color: transparent !important;
    /* Color is set inline by JS */
}

/* Plan Selection Cards (Login/Register) */
.plan-card {
    position: relative;
    overflow: hidden;
}

.plan-card.selected {
    border-color: var(--brand-orange);
    background-color: #fff7ed; /* Orange-50 */
    ring: 2px solid #fed7aa;
}

/* =========================================
   5. PRINT STYLES (Crucial for PDF Generation)
   ========================================= */
@media print {
    /* Hide everything that isn't the ticket */
    body * {
        visibility: hidden;
    }

    /* Show the ticket container */
    #ticket-display, 
    #ticket-display * {
        visibility: visible;
    }

    /* Position the ticket at the top of the page */
    #ticket-display {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        background: white; /* Ensure background prints white */
    }

    .ticket-container {
        box-shadow: none; /* Remove shadow for print */
        border: none;
        width: 100%;
        max-width: 100%;
    }

    /* Hide the "Print/Back" buttons inside the ticket display */
    .no-print {
        display: none !important;
    }

    /* Force background colors to print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}