/* webapp/static/style.css — Tailwind-inexpressible utilities only */

/* === Global === */
body {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    min-height: max(884px, 100dvh);
}

/* === Frosted Glass === */
.ios-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* === Material Symbols === */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.fonts-loaded .material-symbols-outlined {
    opacity: 1;
}

/* Active nav tab: filled icon */
.nav-active {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* === Toggle Switch (checkbox + label + dot pattern) ===
   Structure:
   <label class="relative inline-flex items-center cursor-pointer">
     <input type="checkbox" class="sr-only toggle-checkbox" onchange="this.form.submit()">
     <div class="toggle-label w-11 h-6 bg-slate-700 rounded-full transition-colors duration-200">
       <div class="toggle-dot absolute top-[2px] left-[2px] bg-white w-5 h-5 rounded-full transition-transform duration-200"></div>
     </div>
   </label>
*/
.toggle-checkbox:checked + .toggle-label {
    background-color: #3b82f6; /* primary */
}
.toggle-checkbox:checked + .toggle-label .toggle-dot {
    transform: translateX(1.25rem); /* translate-x-5 */
}

/* === Country Filter Chips (circular, radio/checkbox) ===
   Structure: <input type="checkbox" class="country-filter sr-only"> <label>
*/
.country-filter-label {
    background-color: #334155; /* slate-700 — inactive */
    color: #94a3b8;            /* slate-400 */
    border: 2px solid #475569; /* slate-600 */
}
.country-filter:checked + label {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* === Airport Autocomplete === */
.airport-input-wrapper {
    position: relative;
}
.airport-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.airport-chip {
    display: inline-flex;
    align-items: center;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}
.chip-remove {
    cursor: pointer;
    margin-left: 0.35rem;
    color: #64748b;
    font-weight: bold;
    transition: color 0.15s ease;
}
.chip-remove:hover {
    color: #f87171;
}
.airport-dropdown {
    display: none;
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.airport-dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.85rem;
}
.airport-dropdown-item:hover {
    background: #334155;
}

/* === Bottom Sheet === */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sheet-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1e293b;
    border-top: 1px solid #334155;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 0 1.25rem 5rem 1.25rem;
    z-index: 1050;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}
.bottom-sheet.active {
    transform: translateY(0);
}

/* === Refresh Spinner === */
.refresh-icon {
    display: inline-block;
    line-height: 1;
}
.refresh-icon.spinning {
    animation: spin-animation 1s infinite linear;
}
@keyframes spin-animation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === noUiSlider dark theme === */
.noUi-target {
    background: #334155;
    border: none;
    box-shadow: none;
    height: 4px;
    border-radius: 2px;
}
.noUi-connect {
    background: #3b82f6;
}
.noUi-handle {
    background: #3b82f6;
    border: 2px solid #0f172a;
    border-radius: 50%;
    box-shadow: none;
    width: 16px !important;
    height: 16px !important;
    right: -8px !important;
    top: -6px !important;
    cursor: pointer;
}
.noUi-handle::before,
.noUi-handle::after {
    display: none;
}
.noUi-horizontal .noUi-tooltip {
    display: none;
}
.nouislider-wrap {
    flex: 1;
    min-width: 120px;
    padding: 0 8px;
}
.strategy-time-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.strategy-day-label {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 3rem;
}
.range-value {
    color: #3b82f6;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 7rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* === Form Validation === */
.is-invalid {
    border-color: #f87171 !important;
}
.is-valid {
    border-color: #22c55e !important;
}

/* === Notification Bell === */
.bell-active {
    color: #3b82f6;
}
.bell-inactive {
    color: #64748b;
}

/* === Profile inactive dimming === */
.profile-inactive {
    opacity: 0.5;
}
.profile-inactive:hover {
    opacity: 0.75;
}
