/* Quick Hangar Design System - Matching iPad App Aesthetic */

/* ===== 1. COLOR PALETTE & GRADIENTS ===== */
:root {
    /* Primary Colors */
    --qh-primary-blue: #3B82F6;
    --qh-success-green: #10B981;
    --qh-purple-accent: #A855F7;
    --qh-orange-accent: #FB923C;
    --qh-pink-accent: #EC4899;
    --qh-green-accent: #22C55E;
    
    /* Glass-morphism values */
    --qh-glass-white: rgba(255, 255, 255, 0.95);
    --qh-glass-white-light: rgba(255, 255, 255, 0.6);
    --qh-glass-dark: rgba(17, 24, 39, 0.95);
    --qh-glass-dark-light: rgba(31, 41, 55, 0.6);
    --qh-border-light: rgba(229, 231, 235, 0.5);
    --qh-border-dark: rgba(55, 65, 81, 0.5);
}

/* Main Background Gradient */
body {
    background: linear-gradient(to bottom right, 
        rgb(239, 246, 255) 0%,    /* blue-50 */
        rgb(255, 255, 255) 50%,    /* white */
        rgb(250, 245, 255) 100%) !important;  /* purple-50 */
    min-height: 100vh;
    position: relative;
    color: black !important;  /* Changed from #333 to black */
}

/* Mesh Gradient Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.25) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(236, 72, 153, 0.25) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(34, 197, 94, 0.25) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(168, 85, 247, 0.25) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(251, 146, 60, 0.25) 0px, transparent 50%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

/* Noise Texture for subtle depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 2;
}

/* ===== 2. WATERMARK ===== */
.watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
    overflow: hidden;
    z-index: 0;
}

.watermark-container img {
    width: 180%;
    height: 180%;
    max-width: none;
    object-fit: contain;
    filter: contrast(1.2);
}

/* ===== 3. GLASS-MORPHISM CONTAINERS ===== */
.glass-card {
    background: var(--qh-glass-white);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--qh-border-light);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 0.375rem;
}

.glass-card-light {
    background: var(--qh-glass-white-light);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--qh-border-light);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 0.375rem;
    padding: 1.5rem;
}

/* Update existing cards - ALWAYS WHITE BACKGROUND WITH ROUNDED EDGES */
.card, div.card {
    background: white !important;
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    border-radius: 0.75rem !important;  /* Nice rounded corners */
    transition: transform 0.2s ease;
    overflow: hidden;  /* Ensure content respects rounded corners */
}

.card-body, div.card-body {
    background: white !important;
    background-color: white !important;
    color: black !important;
}

/* Force ALL text to be black */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card p, .card span, .card label, .card div,
.card-body h1, .card-body h2, .card-body h3, .card-body h4, .card-body h5, .card-body h6,
.card-body p, .card-body span, .card-body label, .card-body div {
    color: black !important;
}

/* Force ALL form inputs to be clearly visible */
.form-control, input.form-control, textarea.form-control, select.form-control {
    background-color: white !important;
    color: black !important;
    border: 1px solid #ced4da !important;
}

.form-control:focus, input.form-control:focus, textarea.form-control:focus, select.form-control:focus {
    background-color: white !important;
    color: black !important;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Force labels to be black */
label, .form-label {
    color: black !important;
}

/* Force override Bootstrap card defaults */
.card.bg-dark, .card.bg-secondary, .card.bg-light {
    background: white !important;
    background-color: white !important;
    border: 1px solid #000 !important;
}

.card:hover {
    transform: translateY(-2px);
}

/* ===== 4. NAVIGATION BAR ===== */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--qh-border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.navbar-dark, .bg-dark {
    background: linear-gradient(135deg, var(--qh-primary-blue) 0%, var(--qh-purple-accent) 100%) !important;
}

/* ===== 5. BUTTONS - Flat Modern Design ===== */
.btn {
    min-height: 44px;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    padding: 0.625rem 1.25rem;
}

.btn-primary {
    background: var(--qh-primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--qh-success-green);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-light {
    background: white;
    color: var(--qh-primary-blue);
    border: 1px solid var(--qh-border-light);
}

.btn-light:hover {
    background: #F9FAFB;
    border-color: var(--qh-primary-blue);
}

/* ===== 6. FORMS ===== */
/* Text inputs and selects only - explicitly exclude checkboxes */
textarea,
select:not(.form-check-input),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
.form-control:not(.form-check-input):not([type="checkbox"]),
.form-select {
    min-height: 44px;
    background: white !important;
    border: 1px solid var(--qh-border-light);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: black !important;
}

/* Focus states for text inputs */
textarea:focus,
select:not(.form-check-input):focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
.form-control:not(.form-check-input):not([type="checkbox"]):focus,
.form-select:focus {
    background: white !important;
    border-color: var(--qh-primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: black !important;
}

/* Modal text inputs - white backgrounds */
.modal textarea,
.modal select:not(.form-check-input),
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"],
.modal input[type="number"],
.modal input[type="tel"],
.modal .form-control:not(.form-check-input):not([type="checkbox"]),
.modal .form-select {
    background: white !important;
    color: black !important;
}

/* CRITICAL: Restore Bootstrap toggle switches with custom colors */
.form-check-input[type="checkbox"] {
    width: 2em !important;
    height: 1em !important;
    background-color: #dc3545 !important;  /* Red when OFF */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    border: 1px solid #dc3545 !important;  /* Red border when OFF */
    border-radius: 2em !important;
    transition: background-position 0.15s ease-in-out !important;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #28a745 !important;  /* Green when ON */
    background-position: right center !important;
    border-color: #28a745 !important;  /* Green border when ON */
}

.form-switch .form-check-input {
    width: 2em !important;
    height: 1em !important;
    margin-left: -2.5em !important;
    background-color: #dc3545 !important;  /* Red when OFF */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    border-radius: 2em !important;
    border: 1px solid #dc3545 !important;  /* Red border when OFF */
}

.form-switch .form-check-input:checked {
    background-position: right center !important;
    background-color: #28a745 !important;  /* Green when ON */
    border-color: #28a745 !important;  /* Green border when ON */
}

/* ===== 7. HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, 
        var(--qh-primary-blue) 0%, 
        var(--qh-purple-accent) 50%,
        var(--qh-orange-accent) 100%);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(at 20% 80%, rgba(255, 255, 255, 0.2) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(255, 255, 255, 0.15) 0px, transparent 50%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* ===== 8. FEATURE ICONS ===== */
.feature-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-icon:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
}

/* Update feature icon background colors */
.bg-primary {
    background: linear-gradient(135deg, var(--qh-primary-blue), #2563EB) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--qh-orange-accent), #F59E0B) !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--qh-purple-accent), #9333EA) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--qh-success-green), #059669) !important;
}

/* ===== 9. ANIMATIONS ===== */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* ===== 10. LAYOUT ADJUSTMENTS ===== */
main, .container-fluid, .container {
    position: relative;
    z-index: 10;
}

/* Content should be above watermark but below navigation */
.content-wrapper {
    position: relative;
    z-index: 20;
}

/* Maximum width container */
.container {
    max-width: 1280px;
}

/* Page minimum height */
.min-h-screen {
    min-height: 100vh;
}

/* ===== 11. FOOTER ===== */
footer {
    background: var(--qh-glass-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--qh-border-light);
    position: relative;
    z-index: 10;
    margin-top: auto;
}

/* ===== 12. MOBILE OPTIMIZATIONS ===== */
/* Hide watermark on screens where "How It Works" cards stack vertically */
@media (max-width: 767px) {
    .watermark-container {
        display: none !important;
    }
    
    .glass-card, .glass-card-light {
        padding: 1rem;
    }
    
    .hero-section {
        border-radius: 0 0 1rem 1rem;
    }
}

/* Show watermark only on medium screens and up (768px+) where cards are horizontal */
@media (min-width: 768px) {
    .watermark-container {
        display: flex;
    }
}

/* ===== 13. DARK MODE SUPPORT (Future Implementation - Currently Disabled) ===== */
/* Commenting out dark mode until explicitly enabled by user
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(to bottom right, 
            rgb(17, 24, 39) 0%,     /* gray-900 */
            rgb(30, 41, 59) 50%,    /* slate-800 */
            rgb(30, 58, 138) 100%) !important;  /* blue-950 */
        color: #E5E7EB !important;
    }
    
    body::before {
        opacity: 0.4;
    }
    
    body::after {
        opacity: 0.04;
    }
    
    .glass-card {
        background: var(--qh-glass-dark);
        border-color: var(--qh-border-dark);
    }
    
    .glass-card-light {
        background: var(--qh-glass-dark-light);
        border-color: var(--qh-border-dark);
    }
    
    .card {
        background: var(--qh-glass-dark) !important;
        border-color: var(--qh-border-dark) !important;
        color: #E5E7EB;
    }
    
    .navbar {
        background: var(--qh-glass-dark) !important;
        border-color: var(--qh-border-dark);
    }
    
    /* Keep form inputs white even in dark mode for consistency */
    .form-control, .form-select, input, select, textarea {
        background: white !important;
        border-color: var(--qh-border-dark);
        color: black !important;
    }
    
    .form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
        background: white !important;
        border-color: var(--qh-primary-blue);
        color: black !important;
    }
    
    footer {
        background: var(--qh-glass-dark);
        border-color: var(--qh-border-dark);
        color: #E5E7EB;
    }
}
*/

/* ===== 14. UTILITY CLASSES ===== */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.rounded-2xl {
    border-radius: 0.375rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--qh-primary-blue), var(--qh-purple-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* ===== 15. MODAL Z-INDEX FIXES - GLOBAL SOLUTION ===== */
/* FIXED: Force modals to appear ABOVE everything */
.navbar, .sticky-top {
    z-index: 1030 !important;
}

/* Force backdrop above navbar with much higher value */
.modal-backdrop {
    z-index: 10040 !important;
    opacity: 0.5 !important;
}

.modal-backdrop.show {
    z-index: 10040 !important;
    opacity: 0.5 !important;
    display: block !important;
}

/* Force modal above backdrop with much higher value */
.modal {
    z-index: 10050 !important;
}

.modal.show {
    z-index: 10050 !important;
    display: block !important;
}

/* Force modal dialog and content */
.modal-dialog {
    position: relative !important;
    z-index: 10060 !important;
}

.modal-content {
    position: relative !important;
    z-index: 10070 !important;
    background: white !important;
}

/* Override any inline styles */
body .modal {
    z-index: 10050 !important;
}

body .modal-backdrop {
    z-index: 10040 !important;
}
