/* Light, warm fare-search surface for clarity against the darker booking page. */
.flight-tools {
    margin-top: 1.25rem;
    padding: clamp(1rem, 2.5vw, 1.6rem);
    color: #28251d;
    background: linear-gradient(145deg, #fffdf7 0%, #fff8e8 100%);
    border: 1px solid rgba(184, 148, 31, .34);
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(12, 12, 12, .24), inset 0 1px #fff;
}

.flight-tools-heading,
.fare-calendar-header,
.flight-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flight-tools-heading { margin-bottom: 1.15rem; }
.flight-tools-heading h3 { margin: .2rem 0 0; color: #27231a; font: 700 1.4rem/1.25 'Playfair Display', serif; }
.flight-tools-kicker { color: #9b7411; font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 800; }
.flight-indicative-note { display: inline-flex; align-items: center; gap: .4rem; color: #635d50; font-size: .72rem; white-space: nowrap; }
.flight-indicative-note i { color: #b38b19; }

.flight-search-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.flight-search-controls label { display: flex; flex-direction: column; gap: .4rem; color: #625c50; font-size: .72rem; font-weight: 600; }
.flight-search-controls select {
    width: 100%; min-height: 46px; padding: .6rem .7rem;
    border: 1px solid #e3d8bc; border-radius: 9px;
    color: #302d26; background-color: #fff; font: 600 .83rem 'Inter', sans-serif;
    box-shadow: 0 1px 2px rgba(54, 42, 11, .04);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.flight-search-controls select:hover { border-color: #c49a25; }
.flight-search-controls select:focus-visible,
.flight-tools button:focus-visible { outline: 2px solid #bc941e; outline-offset: 3px; }

.flight-tool-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.flight-tools button { font: 700 .82rem 'Inter', sans-serif; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.flight-action-primary,
.flight-action-secondary { min-height: 45px; padding: .68rem 1rem; border-radius: 9px; }
.flight-action-primary { border: 1px solid #b78a10; background: linear-gradient(135deg, #eac94f, #d4a922); color: #251e0c; box-shadow: 0 5px 14px rgba(181, 137, 19, .2); }
.flight-action-secondary { border: 1px solid #c7a642; background: #fff; color: #6e5310; }
.flight-tools button:hover:not(:disabled) { transform: translateY(-1px); }
.flight-action-primary:hover:not(:disabled) { background: linear-gradient(135deg, #f1d96c, #dfb839); box-shadow: 0 7px 18px rgba(181, 137, 19, .27); }
.flight-action-secondary:hover:not(:disabled) { background: #fff8e8; }
.flight-tools button:disabled { opacity: .65; cursor: wait; }

.flight-status { margin-top: .85rem; padding: .75rem .9rem; border: 1px solid #e7d7a5; border-radius: 9px; color: #4c432f; background: #fff8df; font-size: .8rem; }
.flight-status.error { border-color: #e4b7a8; border-left: 3px solid #c35d47; color: #6d3025; background: #fff1eb; }
.flight-status a { color: #73540b; font-weight: 700; text-underline-offset: 2px; }

.fare-calendar-panel,
.flight-results-panel { margin-top: 1rem; padding: 1rem; border: 1px solid #e9dfc9; border-radius: 11px; background: rgba(255, 255, 255, .82); }
.fare-calendar-header h4,
.flight-results-header h4 { margin: 0; color: #40351b; font: 700 1.02rem 'Playfair Display', serif; }
.fare-calendar-header p,
.flight-results-header p { margin: .25rem 0 0; color: #746d60; font-size: .74rem; }
.calendar-navigation { display: flex; align-items: center; gap: .65rem; color: #383226; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.calendar-navigation button { width: 36px; height: 36px; border: 1px solid #e0d5bb; border-radius: 50%; color: #72550e; background: #fff; }
.calendar-navigation button:hover:not(:disabled) { border-color: #bd951f; background: #fff7df; }

.fare-calendar-weekdays,
.fare-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .38rem; }
.fare-calendar-weekdays { margin-top: .9rem; color: #827a6b; text-align: center; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fare-calendar-grid { margin-top: .4rem; }
.fare-day { min-width: 0; min-height: 64px; padding: .4rem .15rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .22rem; border: 1px solid #eee7d9; border-radius: 8px; color: #383329; background: #fff; font: 600 .75rem 'Inter', sans-serif; }
.fare-day:hover:not(:disabled) { border-color: #c49a25; background: #fff9e9; }
.fare-day.selected { border-color: #b58b1c; color: #2d250f; background: #f8e9b3; box-shadow: inset 0 0 0 1px rgba(181, 139, 28, .16); }
.fare-day:disabled { border-color: transparent; color: #c9c2b4; background: transparent; }
.fare-day.has-price { border-color: #ddc778; }
.fare-day-price { color: #79600f; font-size: .63rem; font-weight: 800; white-space: nowrap; }
.cheapest-date-note { margin: .75rem 0 0; color: #615940; font-size: .75rem; }

.flight-results-count { color: #70695d; font-size: .73rem; }
.flight-results-list { display: grid; gap: .65rem; margin-top: .8rem; }
.flight-option { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(210px, 2fr) auto; align-items: center; gap: .9rem; padding: .9rem; border: 1px solid #e8dfce; border-radius: 10px; background: #fff; box-shadow: 0 2px 7px rgba(48, 39, 19, .045); }
.flight-option:hover { border-color: #d1b24d; box-shadow: 0 5px 14px rgba(48, 39, 19, .08); }
.flight-airline { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.flight-airline img { width: 38px; height: 38px; padding: 3px; object-fit: contain; border-radius: 7px; background: #fff; border: 1px solid #eee8dc; }
.flight-airline-name { color: #302c24; font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.flight-number { margin-top: .15rem; color: #80796d; font-size: .68rem; }
.flight-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; text-align: center; }
.flight-route-point strong { display: block; color: #302c24; font-size: .85rem; }
.flight-route-point small { display: block; margin-top: .15rem; color: #787164; font-size: .66rem; }
.flight-route-mid { color: #8a6a14; font-size: .68rem; line-height: 1.5; white-space: nowrap; }
.flight-option-footer { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.flight-price { color: #76580c; font: 700 1.1rem 'Playfair Display', serif; white-space: nowrap; }
.flight-select-button { min-height: 36px; padding: .48rem .8rem; border: 1px solid #c5a33d; border-radius: 7px; color: #60490d; background: #fff8e4; }
.flight-select-button:hover { border-color: #a77e0c; background: #f8e9b3; }
.flight-layovers { grid-column: 1 / -1; padding-top: .55rem; border-top: 1px solid #eee7d9; color: #746d60; font-size: .69rem; }
.flight-leg-heading { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid #e9dfc9; color: #70550f; }
.flight-leg-heading h5 { margin: 0; font: 700 .95rem 'Playfair Display', serif; }
.flight-empty-state { margin: 0; padding: 1rem; border: 1px dashed #d9c98e; border-radius: 9px; color: #6d6248; background: #fffdf7; text-align: center; font-size: .8rem; }
.flight-loading-dot { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: #b18a1c; animation: flightPulse 1s infinite alternate; }
@keyframes flightPulse { to { opacity: .3; transform: scale(.75); } }

@media (max-width: 760px) {
    .flight-tools { padding: 1rem; border-radius: 13px; }
    .flight-tools-heading { align-items: flex-start; flex-direction: column; gap: .35rem; }
    .flight-tools-heading h3 { font-size: 1.2rem; }
    .flight-indicative-note { margin-top: .1rem; }
    .flight-search-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .flight-search-controls label:last-child { grid-column: 1 / -1; }
    .flight-tool-actions { display: grid; grid-template-columns: 1fr; }
    .flight-action-primary, .flight-action-secondary { width: 100%; }
    .fare-calendar-panel, .flight-results-panel { padding: .7rem; }
    .fare-calendar-header { align-items: flex-start; flex-direction: column; }
    .fare-calendar-weekdays, .fare-calendar-grid { gap: .22rem; }
    .fare-day { min-height: 54px; border-radius: 6px; font-size: .68rem; }
    .fare-day-price { font-size: .55rem; }
    .flight-option { grid-template-columns: 1fr auto; gap: .65rem; padding: .75rem; }
    .flight-airline { grid-column: 1; }
    .flight-route { grid-column: 1 / -1; grid-row: 2; }
    .flight-option-footer { grid-column: 2; grid-row: 1; }
    .flight-layovers { grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .flight-loading-dot { animation: none; }
    .flight-tools button, .flight-search-controls select { transition: none; }
}
