/* Enhanced Flight Search Styles - Wakanow-Style Layout */
/* JumboBookings Flight System - December 2025 */
/* Note: Header/footer/body styles handled by shared header.php and footer.php */

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e3a8a;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-header p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Form Styles */
.search-form-container {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    transform: translateY(-1px);
}

.form-group small {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.search-btn {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.3);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Search Summary */
.search-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.route-summary h3 {
    color: #1e3a8a;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.route-summary p {
    color: #6c757d;
    font-size: 0.95rem;
}

.results-count {
    background: #e3f2fd;
    padding: 10px 20px;
    border-radius: 8px;
    color: #1565c0;
    font-weight: 600;
}

/* Results Container with Sidebar */
.results-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-sidebar h3 {
    color: #1e3a8a;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 12px;
}

.time-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
}

.time-filters input[type="checkbox"] {
    cursor: pointer;
}

/* Flight Results Grid */
.flights-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Flight Result Card - Wakanow Style */
.flight-result-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.flight-result-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #1e3a8a;
    transform: translateY(-2px);
}

/* Flight Card Header */
.flight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.airline-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.airline-logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.airline-icon {
    font-size: 1.5rem;
}

.airline-details h4 {
    color: #1e3a8a;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.airline-code {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.flight-type {
    display: flex;
    gap: 10px;
}

.stops-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stops-badge.non-stop {
    background: #d4edda;
    color: #155724;
}

.stops-badge.with-stops {
    background: #fff3cd;
    color: #856404;
}

/* Flight Route Details */
.flight-route-details {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
}

.departure-info,
.arrival-info {
    display: flex;
    flex-direction: column;
}

.departure-info {
    align-items: flex-start;
}

.arrival-info {
    align-items: flex-end;
}

.departure-info .time,
.arrival-info .time {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.departure-info .airport-code,
.arrival-info .airport-code {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.departure-info .date,
.arrival-info .date {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Flight Path */
.flight-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.duration-info {
    text-align: center;
}

.duration {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.flight-line {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line {
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #1e3a8a);
    width: 100%;
    position: relative;
}

.stop-dots {
    position: absolute;
    display: flex;
    justify-content: space-evenly;
    width: 80%;
    left: 10%;
}

.dot {
    width: 10px;
    height: 10px;
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: help;
}

.stops-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Cabin Classes Section */
.cabin-classes-section {
    padding: 0 25px 25px 25px;
    border-top: 1px solid #e9ecef;
}

.cabin-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Cabin Class Option Card */
.cabin-class-option {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid #ccc;
}

.cabin-class-option.available {
    background: white;
    border-left-width: 4px;
}

.cabin-class-option.available:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.cabin-class-option.estimated {
    opacity: 0.7;
    background: #f8f9fa;
}

.cabin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cabin-icon {
    font-size: 1.5rem;
}

.cabin-name-section h5 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.cabin-class-code {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.cabin-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #495057;
}

.feature-icon {
    font-size: 0.9rem;
    color: #28a745;
}

.cabin-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.price-display {
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
}

.estimated-label {
    font-size: 0.75rem;
    color: #856404;
    font-style: italic;
}

.select-cabin-btn {
    background: #1e3a8a;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-cabin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.select-cabin-btn.unavailable {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

/* View Details Button */
.view-details-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #dee2e6;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e3a8a;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: #f8f9fa;
    border-color: #1e3a8a;
}

.toggle-icon {
    font-size: 0.8rem;
}

/* Flight Details Panel */
.flight-details-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.details-content h4 {
    color: #1e3a8a;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.segment-detail {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #3b82f6;
}

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

.segment-header strong {
    color: #2c3e50;
    font-size: 0.95rem;
}

.aircraft {
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #495057;
}

.segment-route {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.segment-duration {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.loading-spinner-large {
    font-size: 3rem;
    animation: bounce 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Error Styles */
.error-container {
    margin-bottom: 30px;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-message h3 {
    color: #dc3545;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.error-message p {
    color: #721c24;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.no-results h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 10px;
}

/* Benefits Section */
.benefits-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.benefits-section h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 700;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.benefit-item {
    background: rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
}

.benefit-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 15px;
}

.benefit-item h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.benefit-item p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
}

/* Contact Section */
.contact-section {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.contact-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
}

.contact-section p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-btn:hover {
    background: linear-gradient(135deg, #218838, #1eb383);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .cabin-classes-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 20px 15px;
    }

    .search-header h1 {
        font-size: 2rem;
    }

    .search-header p {
        font-size: 1.1rem;
    }

    .search-form-container {
        padding: 25px 20px;
    }

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

    .search-btn {
        width: 100%;
        padding: 16px;
    }

    .search-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .flight-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .flight-route-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .departure-info,
    .arrival-info {
        align-items: center;
        text-align: center;
    }

    .flight-path {
        transform: rotate(90deg);
        margin: 20px 0;
    }

    .cabin-classes-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
    }

    .contact-btn {
        width: 200px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-header h1 {
        font-size: 1.8rem;
    }

    .search-form-container {
        padding: 20px 15px;
    }

    .flight-result-card {
        padding: 0;
    }

    .flight-card-header {
        padding: 15px;
    }

    .flight-route-details {
        padding: 15px;
    }

    .cabin-classes-section {
        padding: 0 15px 15px 15px;
    }

    .departure-info .time,
    .arrival-info .time {
        font-size: 1.5rem;
    }

    .cabin-classes-grid {
        gap: 12px;
    }

    .cabin-class-option {
        padding: 15px;
    }

    .benefits-section,
    .contact-section {
        padding: 25px 20px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1400px) {
    .search-header h1 {
        font-size: 3rem;
    }

    .search-header p {
        font-size: 1.3rem;
    }

    .flight-result-card {
        padding: 0;
    }

    .benefits-section {
        padding: 50px;
    }

    .contact-section {
        padding: 40px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States for Accessibility */
.search-btn:focus,
.select-cabin-btn:focus,
.contact-btn:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .flight-result-card {
        border: 2px solid #2c3e50;
    }
    
    .search-btn,
    .select-cabin-btn,
    .contact-btn {
        border: 2px solid transparent;
    }
    
    .search-btn:focus,
    .select-cabin-btn:focus,
    .contact-btn:focus {
        border-color: #ffffff;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .loading-spinner,
    .loading-spinner-large {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .benefits-section,
    .contact-section,
    .filters-sidebar {
        display: none;
    }
    
    .flight-result-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .search-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
        color: black;
    }
}