/* SkyTeam UI Enhancements - FlightHub Style */
/* Premium visual design matching FlightHub aesthetics */

/* ============================================
   FLIGHTHUB-STYLE FONTS (Nunito Sans - cleaner look)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

/* Apply font to body and common elements, NOT * or div to avoid breaking grid */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
select,
textarea,
label,
li,
.sidebar,
.mainSearch,
.accordion__item,
.flight-matrix {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   SEARCH BOX SEPARATION
   ============================================ */
.search-form-box {
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 0 !important;
}

.trust-badges-section {
    margin-top: 25px !important;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

/* ============================================
   FLIGHT CARD BORDERS (FLIGHTHUB STYLE)
   ============================================ */
.accordion__item,
.bg-white.rounded-4 {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.accordion__item:hover,
.bg-white.rounded-4:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   1. SOFT SHADOWS ON CARDS (hover only)
   ============================================ */
.bg-white.rounded-4:hover,
.accordion__item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   2. MICRO-ANIMATIONS ON BUTTONS
   ============================================ */
.button,
button[type="submit"],
.mainSearch__submit {
    transition: all 0.3s ease;
}

.button:hover,
button[type="submit"]:hover,
.mainSearch__submit:hover {
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* ============================================
   3. FOCUS GLOW ON INPUTS
   ============================================ */
.mainSearch input:focus,
.mainSearch select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ============================================
   4. TYPOGRAPHY - HEADINGS ONLY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6,
.sectionTitle__title {
    letter-spacing: -0.02em;
}

/* ============================================
   5. FLIGHT HEADERS GRADIENT
   ============================================ */
.bg-blue-1.rounded-top-4 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* Return flight green header */
[style*="background: #059669"] {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* ============================================
   6. DOB FIELD CURSOR
   ============================================ */
.dob-field {
    cursor: pointer;
}

/* ============================================
   7. AIRLINE LOGO RESPONSIVE
   ============================================ */
.airline-logo {
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 768px) {
    .airline-logo {
        max-width: 60px !important;
    }
}

/* ============================================
   8. STICKY SIDEBAR FOR FARE SUMMARY
   ============================================ */
.sticky-right-div {
    position: sticky;
    top: 100px;
}

/* ============================================
   9. SEARCH RESULTS - REDUCED WHITE SPACE
   ============================================ */
.layout-pt-md {
    padding-top: 20px;
}

.layout-pb-md {
    padding-bottom: 20px;
}

/* Tighter flight cards */
.accordion__item {
    margin-top: 15px !important;
}

.accordion__item.py-30 {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* Reduced sidebar gap */
.sidebar.py-20 {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.sidebar__item {
    margin-bottom: 15px;
}

/* ============================================
   FIX: main.css y-gap-30 breaks Bootstrap grid
   ============================================ */
/* main.css adds gap:15px to .y-gap-30 which makes total row width exceed container:
   330px (sidebar) + 15px (gap) + 990px (results) = 1335px > 1320px (container)
   This triggers flex-wrap and drops results below sidebar */

/* Remove the gap that exceeds container width */
.row.y-gap-30 {
    gap: 0 !important;
}

/* Also remove the padding added to all children */
.row.y-gap-30>.col,
.row.y-gap-30>[class*="col-"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}



/* Compact flight details page */
.js-accordion.pt-20,
.js-accordion.pt-40 {
    padding-top: 10px !important;
}

/* Reduce margins on mobile */
@media (max-width: 768px) {
    .mt-30 {
        margin-top: 15px !important;
    }

    .py-30 {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }

    .px-30 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ============================================
   10. ROUNDED CARDS (12px radius)
   ============================================ */
.rounded-12 {
    border-radius: 12px !important;
}

.rounded-4,
.bg-white.rounded-4,
.accordion__item {
    border-radius: 12px !important;
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   11. RESULTS HEADER
   ============================================ */
.results-header {
    border: 1px solid #e5e7eb;
}

/* ============================================
   12. FLIGHT MATRIX (AIRLINE x STOPS) - IMPROVED SPACING
   ============================================ */
.flight-matrix {
    border: 1px solid #e5e7eb;
    margin-bottom: 20px !important;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.matrix-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px !important;
}

/* Explicit table display properties to prevent conflicts */
.matrix-table {
    display: table !important;
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    min-width: 600px;
    table-layout: auto;
}

.matrix-table thead {
    display: table-header-group !important;
}

.matrix-table tbody {
    display: table-row-group !important;
}

.matrix-table tr {
    display: table-row !important;
}

.matrix-table th,
.matrix-table td {
    display: table-cell !important;
}

.matrix-header-cell {
    padding: 20px 30px !important;
    background: #f8fafc !important;
    border-bottom: 2px solid #e5e7eb !important;
    min-width: 150px !important;
    vertical-align: middle;
}

.matrix-header-cell:first-child {
    border-right: 2px solid #e5e7eb !important;
    min-width: 110px !important;
}

.airline-col {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px !important;
}

.airline-matrix-logo {
    max-width: 80px !important;
    height: 40px !important;
    object-fit: contain;
}

.matrix-row-label {
    padding: 20px 25px !important;
    background: #f8fafc !important;
    border-right: 2px solid #e5e7eb !important;
    border-bottom: 1px solid #e5e7eb !important;
    white-space: nowrap;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #374151;
}

.matrix-price-cell {
    padding: 20px 30px !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-right: 1px solid #f1f5f9;
    text-align: center !important;
    vertical-align: middle;
}

.matrix-price-cell:last-child {
    border-right: none;
}

.matrix-price {
    display: inline-block !important;
    padding: 12px 20px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.matrix-price:hover {
    background: #2563eb !important;
    color: white !important;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.matrix-price:active {
    transform: scale(1.02);
}

/* ============================================
   13. FILTER SIDEBAR IMPROVEMENTS
   ============================================ */
.sidebar__item {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.sidebar__item.-no-border {
    border-bottom: none;
}

@media (max-width: 768px) {
    .flight-matrix {
        margin-bottom: 15px;
    }

    .results-header .d-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* ============================================
   14. SEGMENT LINE VISUALIZATION
   ============================================ */
.segment-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 50px;
}

.line-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.line {
    width: 2px;
    flex: 1;
    background: #e5e7eb;
    min-height: 20px;
}

.flight-details-toggle i {
    transition: transform 0.3s ease;
}

/* Expandable Flight Details */
.flight-details-content {
    display: none;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    margin-top: 15px;
    animation: slideDown 0.3s ease;
}

.flight-details-content.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rounded-8 {
    border-radius: 8px !important;
}

/* ============================================
   15. CUSTOM RANGE SLIDERS
   ============================================ */
.form-range.price-slider,
.form-range.time-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--value, 100%), #e5e7eb var(--value, 100%), #e5e7eb 100%);
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}
/* ============================================
   16. AESTHETIC SEARCH BOX UPGRADE
   ============================================ */
.mainSearch {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mainSearch:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

/* Separator lines between inputs */
.searchMenu-loc, .searchMenu-date {
    position: relative;
}

.searchMenu-loc::after, 
.searchMenu-date::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-color: #e5e7eb;
}

@media (max-width: 991px) {
    .searchMenu-loc::after, 
    .searchMenu-date::after {
        display: none;
    }
}

/* Input groups hover effect */
.searchMenu-loc, 
.searchMenu-date, 
.searchMenu-guests {
    transition: background-color 0.2s ease;
    border-radius: 12px;
}

.searchMenu-loc:hover, 
.searchMenu-date:hover, 
.searchMenu-guests:hover {
    background-color: rgba(59, 130, 246, 0.04);
}

/* Search Button aesthetic */
.mainSearch__submit {
    background: linear-gradient(135deg, #3554d1 0%, #1a2b4b 100%) !important;
    box-shadow: 0 4px 15px rgba(53, 84, 209, 0.3) !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 15px !important;
}

.mainSearch__submit:hover {
    box-shadow: 0 8px 25px rgba(53, 84, 209, 0.5) !important;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
}

/* Blue accent for icons inside search */
.mainSearch i[class^='icon-'] {
    color: #3554d1 !important;
    font-weight: 600;
}

