/* Base Container Styles */
.airport-quote-form-wrapper,
.airport-quote-dashboard {
    max-width: 800px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Layout */
.airport-form .form-group {
    margin-bottom: 1.5em;
}

.airport-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

/* Form Controls */
.airport-form select,
.airport-form input[type="text"],
.airport-form input[type="number"],
.airport-form input[type="date"],
.airport-form input[type="email"],
.airport-form textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
}

.airport-form select:focus,
.airport-form input:focus,
.airport-form textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Radio Buttons Group */
.airport-form .radio-group {
    display: flex;
    gap: 1.5em;
    margin-top: 0.5em;
}

.airport-form .radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.airport-form .radio-group input[type="radio"] {
    margin-right: 8px;
}

/* Passenger Management */
.airport-form .passenger-row {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    align-items: center;
}

.airport-form .passenger-row input[type="text"] {
    flex: 2;
}

.airport-form .passenger-row input[type="number"] {
    flex: 1;
    max-width: 100px;
}

.airport-form .remove-passenger {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.airport-form .remove-passenger:hover {
    background: #c82333;
}

/* Buttons */
.airport-form button {
    all: unset;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 3em;
}

.airport-form button{
    background-color: transparent;
}

/* Clear Date Button */
.airport-form button.clear-date {
    position: absolute;
    top: calc(50% + 0.7em);
    right: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    transition: color 0.2s;
    transform: translateY(-50%);
}

.date-field:not(:placeholder-shown) + .clear-date {
    display: block;
}

.airport-form button.passengers-toggle {
    width: 100%;
    height: 3em;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
}

.airport-form button.passengers-toggle:hover{
    color: #333;
}

.airport-form button.button-primary {
    background: #2271b1;
    color: white;
    border: none;
}

.airport-form button.passengers-toggle .field-icon{
    top: 50%;
    right: 10px;
    left: unset;
}

.airport-form button.passenger-button{
    padding: 8px;
    height: fit-content;
}

.airport-form button.submit-button {
    padding: 0.75rem 2rem;
    background: var(--e-global-color-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
}

.airport-form button.submit-button:hover {
    background: var(--e-global-color-eda4626);
}

.airport-form button.button-primary:hover {
    background: #135e96;
}

.airport-form button.button-secondary {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
}

.airport-form button.button-secondary:hover {
    background: #e9ecef;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2271b1;
}

.select2-dropdown {
    border-color: #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quote Dashboard Styles */
.airport-quote-dashboard .quote-list {
    margin-top: 2em;
}

.airport-quote-dashboard .quote-item {
    padding: 1.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1em;
    background: #f8f9fa;
}

.airport-quote-dashboard .quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

.airport-quote-dashboard .quote-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-quote-sent {
    background-color: #d4edda;
    color: #155724;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.status-accepted {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background-color: #f8d7da;
    color: #842029;
}

/* Login Required Message */
.airport-form-login-required {
    text-align: center;
    padding: 2em;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2em auto;
    max-width: 400px;
}

.airport-form-login-required p {
    margin-bottom: 1em;
}

/* Loading States */
.airport-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.airport-form button[type="submit"].loading {
    position: relative;
    color: transparent;
}

.airport-form button[type="submit"].loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-loading-spinner 0.75s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Error States */
.airport-form .error-message {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25em;
}

.airport-form input.error,
.airport-form select.error {
    border-color: #dc3545;
}

/* Success Message */
.airport-form .success-message {
    padding: 1em;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin-bottom: 1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .airport-quote-form-wrapper,
    .airport-quote-dashboard {
        padding: 1em;
        margin: 1em;
    }

    .airport-form .passenger-row {
        flex-direction: column;
        gap: 0.5em;
    }

    .airport-form .passenger-row input[type="number"] {
        max-width: 100%;
    }

    .airport-form .radio-group {
        flex-direction: column;
        gap: 0.5em;
    }

    .airport-quote-dashboard .quote-header {
        flex-direction: column;
        gap: 1em;
        text-align: center;
    }

    .airport-quote-dashboard .quote-details {
        grid-template-columns: 1fr;
    }
}

/* Accessibility Improvements */
.airport-form input:focus-visible,
.airport-form select:focus-visible,
.airport-form button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Main Form Container */
.airport-quote-form-wrapper {
    max-width: 1200px;
    margin: 2em auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.airport-form {
    width: 100%;
    font-size: 0.8rem;
}

/* Horizontal Form Layout */
.form-main-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.form-field {
    flex: 1;
    min-width: 200px;
    position: relative;
}

/* Trip Type Radio Buttons */
.trip-type-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.trip-type-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Form Controls */

.airport-modal-body .registration-form{
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.form-field label {
    display: block;
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.select2-container--default .select2-selection--single {
    width: 100%;
    height: 3em;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1em
}

/* Icons in Form Fields */
.form-field .field-icon {
    position: absolute;
    left: 10px;
    top: calc(50% + 0.7em);
    width: 20px;
    height: 20px;
    color: #718096;
    pointer-events: none;
    z-index: 1000;
    transform: translateY(-50%);
}

/* Passengers Dropdown */
.passengers-dropdown {
    position: relative;
}

.passengers-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    z-index: 1000;
    padding: 1rem;
}   

.passengers-menu.active {
    display: block;
}

.passenger-category {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.passenger-category:last-child {
    border-bottom: none;
}

.passenger-category-header {
    margin-bottom: 0.5rem;
}

.passenger-category-title {
    font-weight: 500;
    color: #111827;
}

.passenger-category-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.passenger-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.passenger-count-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.passenger-button {
    width: 2rem;
    height: 2rem;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.passenger-button:hover {
    background: #f3f4f6;
}

.passenger-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Main form container */
.airport-quote-form {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Trip type selector */
.trip-type {
    margin-bottom: 1.5rem;
}

.trip-type label {
    margin-right: 1.5rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.trip-type input[type="radio"] {
    margin-right: 0.5rem;
}

/* Form grid layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Form fields */
.form-field {
    position: relative;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
    font-size: 1em;
}

/* Select2 customization */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 3em !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 30px 0px 40px;
    font-size: 1em;
    line-height: 1.5;
    background-color: #fff;
    transition: all 0.2s;
}

.select2-container .select2-selection--single:hover {
    border-color: #cbd5e0;
}

.select2-container .select2-selection--single:focus,
.select2-container--focus .select2-selection--single {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    outline: none;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: #2d3748;
    line-height: 28px;
}

.select2-container .select2-selection--single .select2-selection__placeholder {
    color: #a0aec0;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 44px;
    width: 30px;
}

.select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #718096 transparent transparent transparent;
    border-width: 5px 5px 0 5px;
}

/* Select2 dropdown */
.select2-dropdown {
    border-color: #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: none !important;
    border-radius: 4px;
    padding: 8px;
    padding-left: 35px;
    margin-top: -6px;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: 1em;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4299e1;
}

/* Date inputs */
.date-input {
    width: 100%;
    height: 44px;
    padding: 8px 36px 8px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #fff;
    transition: all 0.2s;
}

.date-input:hover {
    border-color: #cbd5e0;
}

.date-input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    outline: none;
}

/* Passenger dropdown */
.passenger-select {
    width: 100%;
    height: 44px;
    padding: 8px 36px 8px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.passenger-select:hover {
    border-color: #cbd5e0;
}

/* Search button */
.search-button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 6px;
    background-color: #e53e3e;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-button:hover {
    background-color: #c53030;
}

.search-button svg {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .airport-quote-form {
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .search-button {
        width: 100%;
        margin-top: 1rem;
    }

    .trip-type-group{
        justify-content: center;
    }

    .form-main-row{
        flex-direction: column;
    }

    #airport-quote-form .form-field{
        width: 100%;
    }

    .select2-container--open ~ svg.field-icon{
        display: none;
    }

    .passengers-menu{
        transform: translateY(-90%);
    }
}

/* Fix for Select2 rendering issues */
.select2-container {
    z-index: 100;
    font-size: 0.8rem;
}

.select2-container--open .select2-dropdown {
    z-index: 99991;
}

/* Passenger dropdown panel */
.passenger-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 101;
    display: none;
}

.passenger-dropdown.active {
    display: block;
}

.passenger-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.passenger-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.passenger-count button {
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.passenger-count button:hover {
    background: #f7fafc;
}

.passenger-count button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.passenger-count span {
    min-width: 20px;
    text-align: center;
}

#airport-quote-form .form-field{
    min-width: unset !important;
}

/* Clear date button */
.clear-date {
    position: absolute;
    right: 10px;
    top: 60%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    transition: color 0.2s;
}

.clear-date:hover {
    color: #e53e3e;
    background: transparent !important;
}

.select2-selection{
    height: fit-content !important;
}

button.airport-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

button.airport-modal-close:hover {
    background: transparent;
    color: #000;
}

.airport-modal-header h2 {
    margin: 0 0 10px;
    font-size: 1.5em;
}

.airport-modal-content{
    padding: 40px !important;
    font-size: 0.8rem !important;
}

.airport-modal-content button.submit-button{
    padding: 0.75rem 2rem;
    background: var(--e-global-color-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    min-height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
    width: fit-content;
    margin: auto !important;
    text-wrap: wrap;
}

.airport-modal-content button.submit-button:hover {
    background: var(--e-global-color-eda4626);
}