/**
 * SkyTeam Travel - Premium Design System
 * A modern CSS foundation inspired by Google Flights, Kayak & Skyscanner
 * v1.0.0
 */

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Primary Colors */
    --st-primary: #1E243A;
    --st-primary-light: #2A3352;
    --st-primary-dark: #141827;

    /* Accent Colors - Blue/Red Theme */
    --st-accent: #3554D1;
    --st-accent-light: #5B75D9;
    --st-accent-dark: #2A45B0;
    --st-accent-gradient: linear-gradient(135deg, #3554D1 0%, #5B75D9 100%);

    /* Secondary Accent - Red for CTAs */
    --st-cta: #E53935;
    --st-cta-light: #EF5350;
    --st-cta-dark: #C62828;
    --st-cta-gradient: linear-gradient(135deg, #E53935 0%, #EF5350 100%);

    /* Semantic Colors */
    --st-success: #10B981;
    --st-success-light: #D1FAE5;
    --st-warning: #F59E0B;
    --st-warning-light: #FEF3C7;
    --st-error: #EF4444;
    --st-error-light: #FEE2E2;
    --st-info: #3B82F6;
    --st-info-light: #DBEAFE;

    /* Text Colors */
    --st-text-primary: #1F2937;
    --st-text-secondary: #6B7280;
    --st-text-muted: #9CA3AF;
    --st-text-inverse: #FFFFFF;

    /* Background Colors */
    --st-bg-body: #F3F4F6;
    --st-bg-card: #FFFFFF;
    --st-bg-elevated: #FFFFFF;
    --st-bg-hover: #F9FAFB;

    /* Border Colors */
    --st-border-light: #E5E7EB;
    --st-border-medium: #D1D5DB;

    /* Shadows (Material Design Inspired) */
    --st-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --st-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --st-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --st-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --st-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    --st-shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --st-radius-sm: 4px;
    --st-radius-md: 8px;
    --st-radius-lg: 12px;
    --st-radius-xl: 16px;
    --st-radius-full: 9999px;

    /* Spacing (8px Grid System) */
    --st-space-1: 4px;
    --st-space-2: 8px;
    --st-space-3: 12px;
    --st-space-4: 16px;
    --st-space-5: 20px;
    --st-space-6: 24px;
    --st-space-8: 32px;
    --st-space-10: 40px;
    --st-space-12: 48px;

    /* Typography - Inter (Body) + Plus Jakarta Sans (Display) - Like BFHD */
    --st-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --st-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --st-font-sans: var(--st-font-body);
    --st-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Font Sizes */
    --st-text-xs: 0.75rem;
    /* 12px */
    --st-text-sm: 0.875rem;
    /* 14px */
    --st-text-base: 1rem;
    /* 16px */
    --st-text-lg: 1.125rem;
    /* 18px */
    --st-text-xl: 1.25rem;
    /* 20px */
    --st-text-2xl: 1.5rem;
    /* 24px */
    --st-text-3xl: 1.875rem;
    /* 30px */
    --st-text-4xl: 2.25rem;
    /* 36px */

    /* Font Weights */
    --st-font-normal: 400;
    --st-font-medium: 500;
    --st-font-semibold: 600;
    --st-font-bold: 700;

    /* Line Heights */
    --st-leading-tight: 1.25;
    --st-leading-normal: 1.5;
    --st-leading-relaxed: 1.625;

    /* Transitions */
    --st-transition-fast: 150ms ease;
    --st-transition-base: 250ms ease;
    --st-transition-slow: 350ms ease;
    --st-transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index Scale */
    --st-z-dropdown: 100;
    --st-z-sticky: 200;
    --st-z-modal: 300;
    --st-z-toast: 400;
}

/* Global Body Font & Smoothing - Like BFHD */
body {
    font-family: var(--st-font-body, 'Inter', sans-serif) !important;
    font-weight: 400;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Display Font for Headings */
h1,
h2,
h3,
h4,
h5,
h6,
.st-heading,
.st-flight-time,
.st-flight-price-amount {
    font-family: var(--st-font-display, 'Plus Jakarta Sans', sans-serif) !important;
    letter-spacing: -0.025em;
}

/* ==========================================================================
   2. Base Typography
   ========================================================================== */

.st-font-sans {
    font-family: var(--st-font-sans);
}

.st-font-mono {
    font-family: var(--st-font-mono);
}

/* Price Display - Large, Bold, Tabular */
.st-price {
    font-family: var(--st-font-sans);
    font-size: var(--st-text-2xl);
    font-weight: var(--st-font-bold);
    font-feature-settings: 'tnum' 1;
    color: var(--st-text-primary);
    letter-spacing: -0.02em;
}

.st-price-lg {
    font-size: var(--st-text-3xl);
}

.st-price-sm {
    font-size: var(--st-text-lg);
}

.st-price-accent {
    color: var(--st-accent);
}

/* Time Display */
.st-time {
    font-family: var(--st-font-sans);
    font-size: var(--st-text-lg);
    font-weight: var(--st-font-semibold);
    font-feature-settings: 'tnum' 1;
    color: var(--st-text-primary);
}

.st-time-lg {
    font-size: var(--st-text-xl);
}

/* Airport Code */
.st-airport-code {
    font-size: var(--st-text-sm);
    font-weight: var(--st-font-medium);
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   3. Premium Card Component
   ========================================================================== */

.st-card {
    background: var(--st-bg-card);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-card);
    padding: var(--st-space-6);
    transition:
        box-shadow var(--st-transition-base),
        transform var(--st-transition-base);
}

.st-card:hover {
    box-shadow: var(--st-shadow-card-hover);
    transform: translateY(-2px);
}

.st-card-flat {
    box-shadow: none;
    border: 1px solid var(--st-border-light);
}

.st-card-flat:hover {
    box-shadow: var(--st-shadow-md);
    border-color: transparent;
}

/* ==========================================================================
   4. Flight Card Component
   ========================================================================== */

.st-flight-card {
    background: var(--st-bg-card);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-card);
    padding: var(--st-space-5);
    transition: all var(--st-transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.st-flight-card:hover {
    box-shadow: var(--st-shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--st-accent);
}

.st-flight-card-selected {
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 15, 0.15);
}

/* Flight Timeline */
.st-flight-timeline {
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    padding: var(--st-space-3) 0;
}

.st-flight-timeline-line {
    flex: 1;
    height: 2px;
    background: var(--st-border-medium);
    position: relative;
}

.st-flight-timeline-line::before,
.st-flight-timeline-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--st-accent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.st-flight-timeline-line::before {
    left: 0;
}

.st-flight-timeline-line::after {
    right: 0;
}

/* Stop Indicator on Timeline */
.st-flight-stop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--st-warning);
    border: 2px solid white;
    border-radius: 50%;
}

.st-flight-stop-text {
    font-size: var(--st-text-xs);
    color: var(--st-text-muted);
    text-align: center;
    margin-top: var(--st-space-2);
}

/* ==========================================================================
   5. Button Components
   ========================================================================== */

.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--st-space-2);
    font-family: var(--st-font-sans);
    font-size: var(--st-text-base);
    font-weight: var(--st-font-semibold);
    padding: var(--st-space-3) var(--st-space-6);
    border-radius: var(--st-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--st-transition-fast);
    min-height: 44px;
    /* Touch target */
    text-decoration: none;
}

.st-btn:focus {
    outline: 2px solid var(--st-accent);
    outline-offset: 2px;
}

/* Primary Button */
.st-btn-primary {
    background: var(--st-cta-gradient, linear-gradient(135deg, #E53935 0%, #EF5350 100%));
    color: var(--st-text-inverse);
    box-shadow: var(--st-shadow-sm);
}

.st-btn-primary:hover {
    background: var(--st-cta-dark, #C62828);
    box-shadow: var(--st-shadow-md);
    transform: translateY(-1px);
    color: var(--st-text-inverse);
}

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

/* Secondary Button */
.st-btn-secondary {
    background: var(--st-bg-card);
    color: var(--st-primary);
    border: 2px solid var(--st-border-medium);
}

.st-btn-secondary:hover {
    border-color: var(--st-primary);
    background: var(--st-bg-hover);
    color: var(--st-primary);
}

/* Ghost Button */
.st-btn-ghost {
    background: transparent;
    color: var(--st-accent);
}

.st-btn-ghost:hover {
    background: rgba(255, 105, 15, 0.1);
    color: var(--st-accent);
}

/* Button Sizes */
.st-btn-sm {
    font-size: var(--st-text-sm);
    padding: var(--st-space-2) var(--st-space-4);
    min-height: 36px;
}

.st-btn-lg {
    font-size: var(--st-text-lg);
    padding: var(--st-space-4) var(--st-space-8);
    min-height: 52px;
}

.st-btn-block {
    width: 100%;
}

/* ==========================================================================
   6. Form Components
   ========================================================================== */

.st-input {
    width: 100%;
    font-family: var(--st-font-sans);
    font-size: var(--st-text-base);
    padding: var(--st-space-3) var(--st-space-4);
    background: var(--st-bg-card);
    border: 2px solid var(--st-border-light);
    border-radius: var(--st-radius-md);
    transition: all var(--st-transition-fast);
    min-height: 48px;
}

.st-input:focus {
    outline: none;
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 15, 0.15);
}

.st-input:hover:not(:focus) {
    border-color: var(--st-border-medium);
}

.st-input::placeholder {
    color: var(--st-text-muted);
}

.st-input-error {
    border-color: var(--st-error);
}

.st-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.st-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.st-error-text {
    font-size: var(--st-text-xs);
    color: var(--st-error);
    margin-top: var(--st-space-1);
}

/* ==========================================================================
   7. Badge Components
   ========================================================================== */

.st-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-1);
    font-size: var(--st-text-xs);
    font-weight: var(--st-font-semibold);
    padding: var(--st-space-1) var(--st-space-2);
    border-radius: var(--st-radius-sm);
}

.st-badge-success {
    background: var(--st-success-light);
    color: var(--st-success);
}

.st-badge-warning {
    background: var(--st-warning-light);
    color: #92400E;
}

.st-badge-info {
    background: var(--st-info-light);
    color: var(--st-info);
}

.st-badge-best {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.st-badge-cheapest {
    background: var(--st-success);
    color: white;
}

/* ==========================================================================
   8. Skeleton Loaders
   ========================================================================== */

.st-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: st-shimmer 1.5s infinite;
    border-radius: var(--st-radius-sm);
}

@keyframes st-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.st-skeleton-text {
    height: 1em;
    width: 100%;
}

.st-skeleton-text-sm {
    width: 60%;
}

.st-skeleton-text-lg {
    width: 80%;
}

.st-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--st-radius-md);
}

.st-skeleton-card {
    height: 120px;
    border-radius: var(--st-radius-lg);
}

/* ==========================================================================
   9. Utility Classes
   ========================================================================== */

/* Spacing */
.st-p-0 {
    padding: 0;
}

.st-p-1 {
    padding: var(--st-space-1);
}

.st-p-2 {
    padding: var(--st-space-2);
}

.st-p-3 {
    padding: var(--st-space-3);
}

.st-p-4 {
    padding: var(--st-space-4);
}

.st-p-5 {
    padding: var(--st-space-5);
}

.st-p-6 {
    padding: var(--st-space-6);
}

.st-m-0 {
    margin: 0;
}

.st-m-1 {
    margin: var(--st-space-1);
}

.st-m-2 {
    margin: var(--st-space-2);
}

.st-m-3 {
    margin: var(--st-space-3);
}

.st-m-4 {
    margin: var(--st-space-4);
}

.st-m-5 {
    margin: var(--st-space-5);
}

.st-m-6 {
    margin: var(--st-space-6);
}

.st-mb-0 {
    margin-bottom: 0;
}

.st-mb-2 {
    margin-bottom: var(--st-space-2);
}

.st-mb-4 {
    margin-bottom: var(--st-space-4);
}

.st-mb-6 {
    margin-bottom: var(--st-space-6);
}

.st-mt-0 {
    margin-top: 0;
}

.st-mt-2 {
    margin-top: var(--st-space-2);
}

.st-mt-4 {
    margin-top: var(--st-space-4);
}

.st-mt-6 {
    margin-top: var(--st-space-6);
}

.st-gap-2 {
    gap: var(--st-space-2);
}

.st-gap-3 {
    gap: var(--st-space-3);
}

.st-gap-4 {
    gap: var(--st-space-4);
}

.st-gap-6 {
    gap: var(--st-space-6);
}

/* Flexbox */
.st-flex {
    display: flex;
}

.st-flex-col {
    flex-direction: column;
}

.st-flex-wrap {
    flex-wrap: wrap;
}

.st-items-center {
    align-items: center;
}

.st-items-start {
    align-items: flex-start;
}

.st-items-end {
    align-items: flex-end;
}

.st-justify-center {
    justify-content: center;
}

.st-justify-between {
    justify-content: space-between;
}

.st-justify-end {
    justify-content: flex-end;
}

.st-flex-1 {
    flex: 1;
}

/* Text */
.st-text-center {
    text-align: center;
}

.st-text-right {
    text-align: right;
}

.st-text-primary {
    color: var(--st-text-primary);
}

.st-text-secondary {
    color: var(--st-text-secondary);
}

.st-text-muted {
    color: var(--st-text-muted);
}

.st-text-accent {
    color: var(--st-accent);
}

.st-text-success {
    color: var(--st-success);
}

.st-text-error {
    color: var(--st-error);
}

.st-font-medium {
    font-weight: var(--st-font-medium);
}

.st-font-semibold {
    font-weight: var(--st-font-semibold);
}

.st-font-bold {
    font-weight: var(--st-font-bold);
}

/* Borders */
.st-border {
    border: 1px solid var(--st-border-light);
}

.st-border-t {
    border-top: 1px solid var(--st-border-light);
}

.st-border-b {
    border-bottom: 1px solid var(--st-border-light);
}

.st-rounded {
    border-radius: var(--st-radius-md);
}

.st-rounded-lg {
    border-radius: var(--st-radius-lg);
}

.st-rounded-full {
    border-radius: var(--st-radius-full);
}

/* Shadows */
.st-shadow {
    box-shadow: var(--st-shadow-md);
}

.st-shadow-lg {
    box-shadow: var(--st-shadow-lg);
}

/* ==========================================================================
   10. Mobile Sticky Bar
   ========================================================================== */

.st-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--st-bg-card);
    padding: var(--st-space-4);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: var(--st-z-sticky);
    display: none;
}

@media (max-width: 991px) {
    .st-sticky-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* ==========================================================================
   11. Progress Stepper
   ========================================================================== */

.st-stepper {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
}

.st-stepper-item {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
}

.st-stepper-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--st-text-sm);
    font-weight: var(--st-font-semibold);
    background: var(--st-border-light);
    color: var(--st-text-muted);
}

.st-stepper-item.active .st-stepper-number {
    background: var(--st-accent);
    color: white;
}

.st-stepper-item.completed .st-stepper-number {
    background: var(--st-success);
    color: white;
}

.st-stepper-label {
    font-size: var(--st-text-sm);
    color: var(--st-text-muted);
}

.st-stepper-item.active .st-stepper-label {
    color: var(--st-text-primary);
    font-weight: var(--st-font-medium);
}

.st-stepper-divider {
    flex: 1;
    height: 2px;
    background: var(--st-border-light);
}

.st-stepper-item.completed+.st-stepper-divider {
    background: var(--st-success);
}

/* ==========================================================================
   12. Trust Signals
   ========================================================================== */

.st-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: var(--st-space-3) var(--st-space-4);
    background: var(--st-success-light);
    border: 1px solid var(--st-success);
    border-radius: var(--st-radius-md);
    color: #047857;
    font-size: var(--st-text-sm);
}

.st-trust-badge i {
    font-size: var(--st-text-lg);
}

.st-payment-icons {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
}

.st-payment-icons img {
    height: 24px;
    opacity: 0.8;
}

/* ==========================================================================
   13. Responsive Helpers
   ========================================================================== */

@media (max-width: 575px) {
    .st-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .st-hide-tablet {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .st-hide-desktop {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .st-show-mobile-only {
        display: block;
    }
}

@media (min-width: 992px) {
    .st-show-mobile-only {
        display: none !important;
    }
}

/* Sticky Sidebar */
.st-sticky-sidebar {
    position: sticky;
    top: 120px;
    z-index: 10;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Font Utilities */
.font-jakarta {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}