/* Upsell Drawer Component - Mobile-First Design */
/* Displays fare family options (Saver, Standard, Flex) when flight card is clicked */

.flight-card {
    position: relative;
    transition: all 0.3s ease;
}

.flight-card.expanded {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Upsell Drawer Container */
.upsell-drawer {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-in-out;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 2px solid #e9ecef;
    padding: 0;
}

.upsell-drawer.active {
    display: block;
    max-height: 2000px;
    padding: 1.5rem 1rem;
}

/* Drawer Header */
.upsell-drawer-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.upsell-drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.upsell-drawer-header p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* Fare Options Grid - Mobile First (Stacked) */
.fare-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual Fare Column */
.fare-column {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.fare-column:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.fare-column.recommended {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.fare-column.recommended::before {
    content: "BEST VALUE";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Fare Header */
.fare-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.fare-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.fare-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
}

.fare-price-delta {
    font-size: 1.5rem;
    font-weight: 700;
}

.fare-price-delta.positive {
    color: #dc3545;
}

.fare-price-delta.zero {
    color: #28a745;
}

.fare-price-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Amenities List */
.fare-amenities {
    margin-bottom: 1.25rem;
}

.amenity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.amenity-item i {
    margin-top: 2px;
    flex-shrink: 0;
}

.amenity-item.included {
    color: #28a745;
}

.amenity-item.included i {
    color: #28a745;
}

.amenity-item.not-included {
    color: #6c757d;
}

.amenity-item.not-included i {
    color: #dc3545;
}

.amenity-item.extra-charge {
    color: #fd7e14;
}

.amenity-item.extra-charge i {
    color: #fd7e14;
}

/* Select Button */
.fare-select-btn {
    width: 100%;
    padding: 0.875rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px; /* Touch-friendly */
}

.fare-select-btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.fare-select-btn:active {
    transform: translateY(0);
}

.fare-column.recommended .fare-select-btn {
    background: #28a745;
}

.fare-column.recommended .fare-select-btn:hover {
    background: #218838;
}

/* Loading State */
.upsell-drawer.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.upsell-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.upsell-error {
    text-align: center;
    padding: 2rem 1rem;
    color: #dc3545;
}

.upsell-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Tablet (768px and up) - 2 columns */
@media (min-width: 768px) {
    .fare-options-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .fare-column {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

/* Desktop (1024px and up) - 3 columns */
@media (min-width: 1024px) {
    .upsell-drawer.active {
        padding: 2rem 1.5rem;
    }
    
    .fare-options-grid {
        flex-wrap: nowrap;
    }
    
    .fare-column {
        flex: 1;
    }
    
    .upsell-drawer-header h3 {
        font-size: 1.5rem;
    }
}

/* Accessibility */
.fare-column:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.fare-select-btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: -3px;
}

/* Print Styles */
@media print {
    .upsell-drawer {
        display: none !important;
    }
}
