/**
 * Amadeus Modern Compact Flight Search Styles
 * Horizontal layout optimized for desktop & mobile
 */

/* ============================================
   WRAPPER & CONTAINER
   ============================================ */
.amadeus-modern-search-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.amadeus-search-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #1a1a1a;
}

/* ============================================
   TABS
   ============================================ */
.amadeus-search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.amadeus-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.amadeus-tab:hover {
    background: #f9fafb;
    color: #1a1a1a;
}

.amadeus-tab.active {
    background: white;
    color: #0d47a1;
    border-bottom-color: white;
    position: relative;
    z-index: 2;
}

.amadeus-tab svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   SEARCH CARD
   ============================================ */
.amadeus-search-card {
    background: white;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 30px;
    position: relative;
    z-index: 1;
}

/* ============================================
   TRIP TYPE ROW
   ============================================ */
.amadeus-trip-type-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.amadeus-radio-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: color 0.3s;
}

.amadeus-radio-btn input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.amadeus-radio-btn input[type="radio"]:checked {
    border-color: #0d47a1;
}

.amadeus-radio-btn input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #0d47a1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.amadeus-radio-btn:has(input:checked) {
    color: #0d47a1;
    font-weight: 500;
}

.amadeus-passenger-class {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.amadeus-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
}

.amadeus-dropdown-trigger:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.amadeus-dropdown-trigger svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SEARCH GRID (Horizontal Layout)
   ============================================ */
.amadeus-modern-form {
    position: relative;
}

.amadeus-search-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr 180px 180px auto;
    gap: 15px;
    align-items: end;
}

/* ============================================
   INPUT GROUPS
   ============================================ */
.amadeus-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amadeus-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.amadeus-input-wrapper {
    position: relative;
}

.amadeus-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.amadeus-input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #1a1a1a;
    transition: all 0.3s;
    background: white;
}

.amadeus-input-wrapper input:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.amadeus-input-wrapper input::placeholder {
    color: #9ca3af;
}

/* ============================================
   SWAP BUTTON
   ============================================ */
.amadeus-swap-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
}

.amadeus-swap-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #6b7280;
}

.amadeus-swap-btn:hover {
    background: #0d47a1;
    border-color: #0d47a1;
    color: white;
    transform: rotate(180deg);
}

/* ============================================
   SEARCH BUTTON
   ============================================ */
.amadeus-search-btn-wrapper {
    display: flex;
    align-items: flex-end;
}

.amadeus-search-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.amadeus-search-btn:hover {
    background: linear-gradient(135deg, #0a3d8f 0%, #1565c0 100%);
    box-shadow: 0 6px 16px rgba(13, 71, 161, 0.4);
    transform: translateY(-2px);
}

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

/* ============================================
   DROPDOWN PANELS
   ============================================ */
.amadeus-dropdown-panel {
    position: absolute;
    top: 100%;
    right: 30px;
    margin-top: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 300px;
}

.amadeus-dropdown-content {
    padding: 20px;
}

.amadeus-counter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.amadeus-counter-row:last-child {
    border-bottom: none;
}

.amadeus-counter-row strong {
    display: block;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.amadeus-counter-row small {
    font-size: 13px;
    color: #9ca3af;
}

.amadeus-counter {
    display: flex;
    align-items: center;
    gap: 15px;
}

.amadeus-counter-btn {
    width: 32px;
    height: 32px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.amadeus-counter-btn:hover {
    background: #0d47a1;
    border-color: #0d47a1;
    color: white;
}

.amadeus-counter span {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    min-width: 20px;
    text-align: center;
}

.amadeus-class-option {
    display: block;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 6px;
}

.amadeus-class-option:hover {
    background: #f9fafb;
}

.amadeus-class-option input[type="radio"] {
    margin-right: 10px;
}

.amadeus-class-option:has(input:checked) {
    background: #eff6ff;
    color: #0d47a1;
    font-weight: 500;
}

/* ============================================
   SUGGESTIONS
   ============================================ */
.amadeus-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    margin-top: -1px;
}

.amadeus-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.amadeus-suggestion-item:hover {
    background: #f9fafb;
}

.amadeus-suggestion-item:last-child {
    border-bottom: none;
}

.amadeus-suggestion-item strong {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.amadeus-suggestion-item small {
    font-size: 12px;
    color: #6b7280;
}

/* ============================================
   LOADING
   ============================================ */
.amadeus-loading {
    text-align: center;
    padding: 60px 20px;
}

.amadeus-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #0d47a1;
    border-radius: 50%;
    animation: amadeus-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.amadeus-loading p {
    font-size: 16px;
    color: #6b7280;
}

/* ============================================
   RESULTS
   ============================================ */
.amadeus-results-container {
    margin-top: 40px;
}

.amadeus-results-header {
    margin-bottom: 20px;
}

.amadeus-results-header h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.flight-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.flight-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .amadeus-search-grid {
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }
    
    .amadeus-input-group:nth-child(4),
    .amadeus-input-group:nth-child(5) {
        grid-column: 1 / -1;
    }
    
    .amadeus-search-btn-wrapper {
        grid-column: 1 / -1;
    }
    
    .amadeus-swap-wrapper {
        grid-row: 2;
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    .amadeus-search-card {
        padding: 20px;
    }
    
    .amadeus-search-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .amadeus-swap-wrapper {
        grid-row: auto;
        grid-column: 1;
        justify-content: flex-end;
        padding: 0;
        margin: -8px 0;
    }
    
    .amadeus-trip-type-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .amadeus-passenger-class {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .amadeus-dropdown-panel {
        right: 20px;
        left: 20px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .amadeus-search-card {
        padding: 16px;
    }
    
    .amadeus-search-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .amadeus-input-wrapper input {
        padding: 12px 12px 12px 38px;
        font-size: 14px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
