/* Flight Inquiry Form Widget Styles - Clean, Responsive & Mobile-Optimized */

.fi-widget-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}

.fi-widget-wrapper *,
.fi-widget-wrapper *::before,
.fi-widget-wrapper *::after {
    box-sizing: border-box;
}

/* --- TABS / TRIP TYPE SWITCHER --- */
.fi-tabs-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
}

.fi-tab-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 8px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    outline: none;
}

.fi-tab-btn:not(.active):hover {
    color: #0e2a47;
}

.fi-tab-btn.active {
    background: #ffffff;
    color: #0e2a47;
    font-weight: 700;
    border: 2px solid #0e2a47;
    box-shadow: 0 2px 8px rgba(14, 42, 71, 0.08);
}

.fi-tab-btn.has-curve:not(.active) {
    border-top: 3px solid #c59d3f;
    border-radius: 16px 16px 0 0;
    padding-top: 6px;
}

/* --- ROW 1: FLIGHT ROUTE & DETAILS (5 Columns) --- */
.fi-flight-row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
    align-items: flex-start !important;
}

/* When Return is active, adjust to 6 columns */
.fi-trip-return .fi-flight-row {
    grid-template-columns: repeat(6, 1fr) !important;
}

/* --- ROW 2: CONTACT DETAILS & BUTTON (4 Columns) --- */
.fi-contact-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 14px !important;
    align-items: flex-start !important;
    margin-bottom: 16px !important;
}

/* --- 2-STEP MODAL MODE (DESKTOP SINGLE ROW SEARCH BAR >= 1025px) --- */
.fi-widget-wrapper .fi-layout-modal .fi-flight-row {
    display: grid !important;
    grid-template-columns: 1.15fr 1.15fr 1fr 0.9fr 1.15fr 1.1fr !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    align-items: flex-start !important;
}

.fi-widget-wrapper .fi-layout-modal.fi-trip-return .fi-flight-row {
    display: grid !important;
    grid-template-columns: 1.05fr 1.05fr 0.95fr 0.95fr 0.85fr 1.05fr 1.1fr !important;
    gap: 8px !important;
}

.fi-widget-wrapper .fi-layout-modal.fi-trip-multicity .fi-flight-row {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr 1fr !important;
    gap: 12px !important;
}

.fi-step1-btn-group {
    display: flex;
    flex-direction: column;
}

.fi-field-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.fi-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #718096 !important;
    margin: 0 0 6px 0 !important;
    height: 18px !important;
    line-height: 18px !important;
    display: block !important;
    white-space: nowrap !important;
}

.fi-input-wrapper {
    position: relative;
    width: 100%;
    height: 44px;
}

/* Strict uniform styling for inputs and selects to eliminate theme overrides */
.fi-widget-wrapper .fi-input,
.fi-widget-wrapper .fi-select,
.fi-widget-wrapper select.fi-select,
.fi-widget-wrapper input.fi-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    line-height: 42px !important;
    padding: 0 14px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.fi-widget-wrapper .fi-input:focus,
.fi-widget-wrapper .fi-select:focus,
.fi-widget-wrapper .fi-passengers-inline-box:focus-within {
    border-color: #c59d3f !important;
    box-shadow: 0 0 0 3px rgba(197, 157, 63, 0.15) !important;
}

.fi-widget-wrapper select.fi-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 32px !important;
    cursor: pointer !important;
}

.fi-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    font-size: 10px;
}

/* Custom Airport Search Autocomplete */
.fi-airport-input {
    padding-right: 30px !important;
    cursor: text;
    text-overflow: ellipsis;
}

.fi-airport-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    font-size: 11px;
    transition: transform 0.2s ease;
}

.fi-input-wrapper.open .fi-airport-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.fi-airport-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    max-height: 250px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
}

.fi-airport-dropdown.show {
    display: block !important;
}

.fi-dropdown-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.fi-airport-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.fi-airport-option:last-child {
    border-bottom: none;
}

.fi-airport-option:hover,
.fi-airport-option.selected {
    background-color: #f1f5f9;
    color: #0e2a47;
}

.fi-airport-option .fi-ap-city {
    font-weight: 600;
}

.fi-airport-option .fi-ap-code {
    display: inline-block;
    background: #e2e8f0;
    color: #0e2a47;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 6px;
}

.fi-airport-option .fi-ap-details {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.fi-airport-loading,
.fi-airport-empty {
    padding: 14px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

/* Return Date field */
.fi-return-field {
    display: none !important;
}

.fi-trip-return .fi-return-field {
    display: flex !important;
}

/* --- DIRECT COMPACT PASSENGERS STEPPER (Adult, Child, Infant 3-in-1 Box) --- */
.fi-passengers-inline-box {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 2px 6px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.fi-p-seg {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    flex: 1 !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 0 4px !important;
}

.fi-p-seg:last-child {
    border-right: none !important;
}

.fi-p-tag {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    white-space: nowrap !important;
}

.fi-p-btn {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0e2a47 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.15s ease !important;
    user-select: none !important;
}

.fi-p-btn:hover:not(:disabled) {
    background: #0e2a47 !important;
    color: #ffffff !important;
    border-color: #0e2a47 !important;
}

.fi-p-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    background: #f8fafc !important;
}

.fi-p-num {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0e2a47 !important;
    min-width: 14px !important;
    text-align: center !important;
}

/* Visibility toggles between desktop and mobile */
.fi-hide-on-mobile {
    display: flex !important;
}
.fi-show-on-mobile {
    display: none !important;
}

/* --- MOBILE PASSENGER TRIGGER & POPOVER STYLES --- */
.fi-passengers-mobile-box {
    position: relative;
    width: 100%;
}

.fi-passengers-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    user-select: none;
    box-sizing: border-box;
}

.fi-passengers-trigger .fi-passengers-icon {
    font-size: 15px;
    margin-right: 8px;
    color: #64748b;
}

.fi-passengers-trigger .fi-passengers-summary {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    flex: 1;
    text-align: left;
}

.fi-passengers-trigger .fi-passengers-arrow {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.fi-passengers-mobile-box.open .fi-passengers-arrow {
    transform: rotate(180deg);
}

.fi-passengers-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    padding: 16px;
    z-index: 99999;
}

.fi-passengers-mobile-box.open .fi-passengers-popover {
    display: block !important;
}

.fi-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 700;
    color: #0e2a47;
}

.fi-popover-close {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
}

.fi-popover-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.fi-popover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fi-popover-row .fi-p-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.fi-popover-row .fi-p-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.fi-popover-row .fi-p-sub {
    font-size: 12px;
    color: #64748b;
}

.fi-popover-row .fi-p-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fi-popover-row .fi-p-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0e2a47 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.fi-popover-row .fi-p-btn:hover:not(:disabled) {
    background: #0e2a47 !important;
    color: #ffffff !important;
    border-color: #0e2a47 !important;
}

.fi-popover-row .fi-p-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.fi-popover-row .fi-p-num {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0e2a47 !important;
    min-width: 22px !important;
    text-align: center !important;
}

.fi-popover-done-btn {
    width: 100%;
    height: 42px;
    background: #0e2a47;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.fi-popover-done-btn:hover {
    background: #1b3d64;
}

/* --- MULTI-CITY SPECIFIC STYLES --- */
.fi-multicity-section {
    display: none !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px !important;
    box-shadow: 0 2px 8px rgba(14, 42, 71, 0.03);
}

.fi-trip-multicity .fi-multicity-section {
    display: block !important;
}

.fi-trip-multicity .fi-standard-route {
    display: none !important;
}

.fi-trip-multicity .fi-flight-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
}

.fi-legs-list {
    display: flex;
    flex-direction: column;
}

.fi-leg-row {
    background: transparent;
    border: none;
    padding: 0 0 14px 0;
    margin-bottom: 14px;
    border-bottom: 1px dashed #cbd5e1;
    position: relative;
}

.fi-leg-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 0;
}

.fi-leg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.fi-leg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0e2a47;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
}

.fi-leg-icon {
    color: #c59d3f;
    font-size: 11px;
}

.fi-leg-remove-btn {
    background: #fee2e2;
    border: none;
    color: #ef4444;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.fi-leg-remove-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
}

.fi-leg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.fi-multicity-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.fi-add-leg-btn {
    background: #ffffff;
    border: 1px solid #c59d3f;
    color: #0e2a47;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fi-add-leg-btn .fi-add-icon {
    font-size: 15px;
    font-weight: 700;
    color: #c59d3f;
    line-height: 1;
}

.fi-add-leg-btn:hover {
    border-color: #c59d3f;
    color: #ffffff;
    background: #c59d3f;
}

.fi-add-leg-btn:hover .fi-add-icon {
    color: #ffffff;
}

.fi-add-leg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #cbd5e1;
    color: #94a3b8;
    background: #f1f5f9;
}

.fi-multicity-limit-hint {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* --- INLINE "GET A QUOTE" BUTTON --- */
.fi-btn-group {
    display: flex;
    flex-direction: column;
}

.fi-submit-btn {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    line-height: 44px !important;
    background-color: #c59d3f !important;
    color: #1a202c !important;
    border: none !important;
    padding: 0 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(197, 157, 63, 0.25) !important;
    white-space: nowrap !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.fi-submit-btn:hover {
    background-color: #b58d31 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(197, 157, 63, 0.35) !important;
}

.fi-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.fi-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #1a202c;
    border-radius: 50%;
    animation: fi-spin 0.8s linear infinite;
}

.fi-submit-btn.loading .fi-spinner {
    display: inline-block;
}

@keyframes fi-spin {
    to { transform: rotate(360deg); }
}

/* Alert Notification Messages */
.fi-message-alert {
    display: none;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.fi-message-alert.success {
    display: block;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.fi-message-alert.error {
    display: block;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* --- STEP 2: MODAL POPUP & BACKDROP STYLES --- */
.fi-quote-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 25, 47, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.fi-quote-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.fi-quote-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
    padding: 28px 24px;
    position: relative;
    transform: scale(0.92) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
}

.fi-quote-modal-overlay.open .fi-quote-modal {
    transform: scale(1) translateY(0);
}

.fi-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fi-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0e2a47;
}

.fi-modal-badge {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fi-modal-title {
    font-size: 19px;
    font-weight: 700;
    color: #0e2a47;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.fi-modal-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.fi-modal-flight-summary {
    background: linear-gradient(135deg, #0e2a47 0%, #1a4269 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(14, 42, 71, 0.15);
}

.fi-summary-route {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.fi-sum-arrow {
    color: #c59d3f;
}

.fi-summary-meta {
    font-size: 12px;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fi-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.fi-has-icon {
    position: relative;
}

.fi-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.fi-has-icon input.fi-input {
    padding-left: 42px !important;
}

.fi-input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    animation: fi-shake 0.3s ease-in-out;
}

@keyframes fi-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.fi-modal-submit-btn {
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    background: #c59d3f !important;
    color: #0e2a47 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    text-transform: uppercase !important;
    cursor: pointer;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(197, 157, 63, 0.35);
    transition: all 0.2s ease;
}

.fi-modal-submit-btn:hover {
    background: #b58d31 !important;
    transform: translateY(-1px);
}

.fi-privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
}

body.fi-modal-lock {
    overflow: hidden !important;
}

/* --- TABLET BREAKPOINT (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .fi-widget-wrapper .fi-flight-row,
    .fi-widget-wrapper .fi-trip-return .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal.fi-trip-return .fi-flight-row {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .fi-widget-wrapper .fi-contact-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- MOBILE BREAKPOINT (<= 767px) - 100% RESPONSIVE & HIGH SPECIFICITY --- */
@media (max-width: 767px) {
    /* Segmented pill bar with equal width */
    .fi-tabs-container {
        display: flex !important;
        width: 100% !important;
        gap: 6px !important;
        margin-bottom: 14px !important;
    }
    .fi-tab-btn {
        flex: 1 1 0 !important;
        padding: 9px 4px !important;
        font-size: 13px !important;
        text-align: center !important;
        white-space: nowrap !important;
        border-radius: 25px !important;
    }

    /* High-specificity override for all trip modes */
    .fi-widget-wrapper .fi-flight-row,
    .fi-widget-wrapper .fi-trip-oneway .fi-flight-row,
    .fi-widget-wrapper .fi-trip-return .fi-flight-row,
    .fi-widget-wrapper .fi-trip-multicity .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal.fi-trip-oneway .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal.fi-trip-return .fi-flight-row,
    .fi-widget-wrapper .fi-layout-modal.fi-trip-multicity .fi-flight-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px 10px !important;
        margin-bottom: 14px !important;
    }

    /* By default, fields span full width (2 columns) */
    .fi-widget-wrapper .fi-flight-row .fi-field-group {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    /* When Return is active, Departure and Return sit side-by-side in 2 columns (50% / 50%) saving height! */
    .fi-widget-wrapper .fi-trip-return .fi-flight-row .fi-dep-field,
    .fi-widget-wrapper .fi-trip-return .fi-flight-row .fi-return-field {
        grid-column: span 1 !important;
    }

    .fi-widget-wrapper .fi-contact-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .fi-widget-wrapper .fi-multicity-section {
        padding: 14px 12px !important;
    }

    .fi-widget-wrapper .fi-multicity-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .fi-widget-wrapper .fi-add-leg-btn {
        width: 100% !important;
        justify-content: center !important;
        height: 44px !important;
    }

    .fi-widget-wrapper .fi-multicity-limit-hint {
        text-align: center !important;
    }

    .fi-widget-wrapper .fi-leg-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Mobile Inputs: 48px height and 16px font-size prevents iOS automatic zoom on focus */
    .fi-widget-wrapper .fi-input,
    .fi-widget-wrapper .fi-select,
    .fi-widget-wrapper select.fi-select,
    .fi-widget-wrapper input.fi-input,
    .fi-input-wrapper {
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        line-height: 46px !important;
        font-size: 16px !important;
    }

    /* Passenger Visibility: Show thumb-friendly card/popover, hide cramped inline bar */
    .fi-hide-on-mobile {
        display: none !important;
    }
    .fi-show-on-mobile {
        display: block !important;
    }

    /* Prominent Mobile Button */
    .fi-submit-btn {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        line-height: 50px !important;
        font-size: 15px !important;
        width: 100% !important;
        margin-top: 4px !important;
    }

    .fi-quote-modal {
        padding: 22px 18px;
        border-radius: 16px;
        max-height: 88vh;
    }
    .fi-modal-title { font-size: 17px; }
    .fi-summary-route { font-size: 15px; }
}


