/* flight-selection.css - Professional Flight Selection Design with Fixed Heights */

/* Date selectors - Consistent styling */
.date-selectors {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    align-items: center;
}

.date-selector {
    flex: 1;
    max-width: 300px;
}

.date-selector label {
    display: block;
    margin-bottom: 8px;
    color: #091924;
    font-family: 'Barlow' !important;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* Mobile Flight Progressive Loading Styles */

.mobile-show-more-container {
    padding: 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(240, 249, 255, 0.5) 100%);
    border-top: 1px solid rgba(8, 96, 95, 0.1);
}

.mobile-show-more-flights {
    background: linear-gradient(135deg, #08605F 0%, #0a7573 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(8, 96, 95, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.mobile-show-more-flights:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 96, 95, 0.3);
    background: linear-gradient(135deg, #0a7573 0%, #08605F 100%);
}

.mobile-show-more-flights:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(8, 96, 95, 0.3);
}

.mobile-show-more-flights.showing-all {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

.mobile-show-more-flights.showing-all:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

/* Animation effect */
.mobile-show-more-flights::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.mobile-show-more-flights:hover::before {
    left: 100%;
}

/* Desktop Progressive Loading Styles */
.vis-flere-fly {
    background: linear-gradient(135deg, #08605F 0%, #0a7573 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(8, 96, 95, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.vis-flere-fly:hover {
    background: linear-gradient(135deg, #0a7573 0%, #08605F 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 96, 95, 0.3);
}

.vis-flere-fly:active {
    transform: translateY(0);
}

.vis-flere-fly.showing-all {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.vis-flere-fly.showing-all:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Animation effect for desktop */
.vis-flere-fly::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.vis-flere-fly:hover::before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vis-flere-fly {
        display: none; /* Hide desktop version on mobile */
    }
    
    .mobile-show-more-container {
        padding: 15px;
    }
    
    .mobile-show-more-flights {
        width: 100%;
        max-width: 280px;
        padding: 16px 20px;
        font-size: 15px;
    }
}

@media (min-width: 769px) {
    .mobile-show-more-container {
        display: none; /* Hide mobile version on desktop */
    }
}

/* Loading state for progressive buttons */
.mobile-show-more-flights.loading {
    pointer-events: none;
    opacity: 0.7;
}

.mobile-show-more-flights.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: mobile-button-spin 1s linear infinite;
}

@keyframes mobile-button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced flight card selection feedback */
.mobile-flight-card.selected {
    border-color: #08605F;
    box-shadow: 0 4px 16px rgba(8, 96, 95, 0.2);
    transform: scale(1.02);
}

.mobile-flight-card {
    transition: all 0.3s ease;
}

/* Smooth fade in for new flights */
.mobile-flight-card.new-flight {
    animation: mobile-flight-fade-in 0.5s ease-out;
}

@keyframes mobile-flight-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.date-selector select,
.departure-date select,
.return-date select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 8px;
    border: 2px solid #e8ecef;
    background-color: #ffffff;
    color: #091924;
    appearance: none;
    cursor: pointer;
    font-family: 'Barlow' !important;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23091924' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.date-selector select:hover,
.departure-date select:hover,
.return-date select:hover {
    border-color: #08605F;
}

.date-selector select:focus,
.departure-date select:focus,
.return-date select:focus {
    outline: none;
    border-color: #08605F;
    box-shadow: 0 0 0 3px rgba(8, 96, 95, 0.1);
}

/* Date to selector - Centered divider */
.date-to-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    margin-top: 28px;
}

.date-to-selector .to-text {
    color: #6b7280;
    font-family: 'Barlow' !important;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Flight info header - Clean professional design */
.flight-info {
    background: #08605F;
    color: #ffffff;
    padding: 16px 24px;
    font-family: 'Barlow' !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    position: relative;
}

.flight-info::after {
    content: '✈';
    font-size: 18px;
    opacity: 0.3;
}

/* Flight direction container */
.flight-direction {
    background-color: #ffffff;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    border: 1px solid #e8ecef;
    border-top: none;
}

/* Airport selector - Modern tab design */
.airport-selector {
    margin-bottom: 40px;
    margin-top: 20px;
}

.airport-selector h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #ffffff;
    font-family: 'Barlow' !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.airport-options {
    display: flex;
    gap: 4px;
    background-color: #f8fafb;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #e8ecef;
}

.airport-options h3 {
    display: none;
}

.airport-option {
    flex: 1;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Barlow' !important;
    color: #6b7280;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    background-color: transparent;
}

.airport-option:hover {
    color: #091924;
    background-color: rgba(8, 96, 95, 0.05);
}

.airport-option.active {
    color: #ffffff;
    background-color: #08605F;
    box-shadow: 0 2px 8px rgba(8, 96, 95, 0.2);
}

/* Flight option - Fixed height container with consistent grid */
.flight-option {
    display: grid;
    grid-template-columns: 180px 1fr 220px; /* Fixed widths for consistency */
    gap: 24px;
    align-items: center;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    font-family: 'Barlow' !important;
    min-height: 140px; /* Fixed minimum height */
    height: 140px; /* Fixed height for all flight options */
    padding: 20px; /* Consistent padding */
}

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

.flight-option:hover {
    background-color: #fafbfc;
}

.flight-option.selected {
    background-color: #f0f9f9;
    padding-left: 20px;
}

.flight-option.included {
    background-color: none !important;
}

/* Airline section - Fixed dimensions */
.airline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Reduced gap for consistency */
    width: 180px; /* Fixed width */
    height: 100px; /* Fixed height container */
}

.airline-logo {
    width: 95%; /* Fixed width */
    height: 95%; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    padding: 5px;
    overflow: hidden; /* Prevent overflow */
}

.airline-logo img {
    max-width: 95%; 
    max-height: 95%; /* Maximum height */
    width: auto;
    height: auto;
    object-fit: contain; /* Keep aspect ratio */
}

.airline-name {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    height: 20px; /* Fixed height for text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flight details - Consistent layout */
.flight-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; /* Use full height of container */
    gap: 8px; /* Consistent gap */
}

/* Flight times - Fixed layout */
.flight-times {
    display: grid;
    grid-template-columns: 120px 1fr 120px; /* Fixed widths */
    align-items: center;
    gap: 20px;
    height: 40px; /* Fixed height for times row */
}

.departure-time,
.arrival-time {
    color: #091924;
    font-family: 'Barlow' !important;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap; /* Prevent wrapping */
}

/* Flight duration - Fixed height container */
.flight-duration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    height: 40px; /* Fixed height */
    min-width: 200px; /* Minimum width */
}

/* Duration line - Consistent positioning */
.duration-line {
    width: 100%;
    height: 1px;
    background: #000000;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    overflow: visible;
}

.duration-line::after {
    content: '✈';
    position: absolute;
    top: 50%;
    right: -8px;
    font-size: 16px;
    color: #000000;
    transform: translateY(-50%);
    line-height: 1;
    margin-right: -10px;
    margin-left: 
}

/* Stopover flights - Fixed height with consistent layout */
.flight-duration.with-stopover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    height: 40px; /* Same fixed height as regular */
}

.flight-duration.with-stopover .stopover-lines-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
}

.flight-duration.with-stopover .duration-line {
    width: 40%;
    height: 1px;
    background: #000000;
    position: relative;
    display: inline-block;
    margin: 0 10px;
}



.flight-duration.with-stopover .duration-line:last-child::after {
    content: '✈';
    position: absolute;
    top: 50%;
    right: -8px;
    font-size: 16px;
    color: #000000;
    transform: translateY(-50%);
    line-height: 1;
    margin-left:10px;

}

/* Duration label - Fixed positioning */
.duration-label {
    color: #000000;
    font-family: 'Barlow' !important;
    font-size: 13px;
    font-weight: 600;
    position: absolute;
    bottom: 0;
    white-space: nowrap;
}

.direkte {
    color: #000000;
    font-family: 'Barlow' !important;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    letter-spacing: 0.5px;
    position: absolute;
    top: 0;
    white-space: nowrap;
}

/* Airport info - Fixed layout */
.flight-airports {
    display: grid;
    grid-template-columns: 120px 1fr 120px; /* Match flight-times grid */
    align-items: center;
    gap: 20px;
    height: 20px; /* Fixed height */
}

.departure-airport,
.arrival-airport {
    font-family: 'Barlow' !important;
    font-size: 13px;
    font-weight: 800 !important;
    color: #000000;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap; /* Prevent wrapping */
    text-overflow: ellipsis; /* Add ellipsis for very long names */
}

.departure-airport {
    grid-column: 1;
}

.arrival-airport {
    grid-column: 3;
}

/* Price section - Fixed width and positioning */
.flight-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px; /* Fixed width */
    height: 100px; /* Fixed height to match airline container */
    position: relative;
}

.price-tag {
    color: #091924 !important;
    font-size: 16px;
    font-weight: 900;
    font-family: 'Barlow' !important;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    text-align: center;
    background-color: transparent !important;
}

.included-tag {
    background-color: #08605F;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    font-family: 'Barlow' !important;
    white-space: nowrap;
    text-align: center;
}

/* Always show included tag for included flights */
.flight-option.included .included-tag {
    display: block;
}

/* Selected state special styling */
.flight-option.selected .price-tag {
    background-color: #08605F !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

/* Selection indicator - Clean radio button */
.flight-selection-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #e8ecef;
    border-radius: 50%;
    background-color: #ffffff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.flight-option:hover .flight-selection-radio {
    border-color: #08605F;
}

.flight-option.selected .flight-selection-radio {
    border-color: #08605F;
    background-color: #08605F;
    box-shadow: inset 0 0 0 4px #ffffff;
}

/* Remove the old ::after pseudo element */
.flight-option::after {
    display: none;
}
/* Via stopover indikator */
.via-stopover {
    color: #000000;
    font-family: 'Barlow' !important;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    letter-spacing: 0.5px;
    position: absolute;
    top: 0;
    white-space: nowrap;
}

/* På mobile enheder */
@media (max-width: 768px) {
    .via-stopover {
        font-size: 9px;
        margin-top: 1px;
    }
}
/* Show more button - Consistent positioning */
body .vis-flere-fly {
    background-color: #08605F;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Barlow' !important;
    min-height: 40px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold !important;
    margin: 20px auto; /* Consistent margin */
}

.vis-flere-fly:hover {
    background-color: #08605F;
    color: #ffffff;
    transform: translateY(-1px);
}

.vis-flere-fly::after {
    content: '';
    font-size: 10px;
    letter-spacing: -2px;
    transition: transform 0.2s ease;
}

.vis-flere-fly.showing-all::after {
    content: '';
}

/* Loading states - Fixed heights */
.flight-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-family: 'Barlow' !important;
    position: relative;
    min-height: 200px; /* Fixed minimum height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flight-loading::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    border: 3px solid #e8ecef;
    border-top-color: #08605F;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

.flight-loading div {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.flight-loading small {
    font-size: 14px;
    color: #94a3b8;
}

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

/* Error state - Fixed height */
.flight-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    background-color: #fef2f2;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #fecaca;
    font-family: 'Barlow' !important;
    font-weight: 500;
    min-height: 100px; /* Fixed minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Progress indicators - Consistent styling */
.flight-sync-status,
.destination-progress,
.flight-polling {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5f3 100%);
    color: #08605F;
    padding: 16px 24px;
    text-align: center;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Barlow' !important;
    border: 1px solid rgba(8, 96, 95, 0.2);
    font-size: 14px;
}

/* Payment Selection Styling - Same as seat/guarantee styling */
.payment-selection-section {
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.payment-options {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 40px;
}

/* Unselected state */
.payment-option {
    border: 1px solid #08605F;
    background: #FFF;
    color: #000;
}

/* Selected state */
.payment-option.selected {
    background: #08605F;
    color: #FFF;
    border: 1px solid #08605F;
}

.payment-option:last-child {
    margin-bottom: 0;
}

/* Checkbox styling */
.payment-checkbox {
    position: relative;
    margin-right: 15px;
}

.payment-checkbox input[type="radio"] {
    display: none;
}

.payment-checkbox .checkbox-visual {
    width: 20px;
    height: 20px;
    border: 2px solid #08605F;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.payment-option.selected .payment-checkbox .checkbox-visual {
    background-color: #ffffff;
    border-color: #ffffff;
}

.payment-checkbox .checkmark {
    color: #08605F;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.payment-option.selected .payment-checkbox .checkmark {
    opacity: 1;
}

/* Label styling */
.payment-label {
    flex: 1;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    font-family: 'Barlow' !important;
}

.payment-option.selected .payment-label {
    color: #FFF;
}

/* Price styling */
.payment-price {
    font-size: 14px;
    font-weight: 600;
    margin-left: 15px;
    font-family: 'Barlow' !important;
}

.payment-option.selected .payment-price {
    color: #FFF;
}

/* Ensure content doesn't overflow */
.flight-option * {
    box-sizing: border-box;
}



/* Responsive design */
@media (max-width: 768px) {
    .flight-option {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px;
        height: auto; /* Allow height to expand on mobile */
        min-height: auto;
    }

    .airline-container {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f2f5;
        height: auto;
    }

    .airline-logo {
        width: 80px;
        height: 48px;
    }
    
    .airline-logo img {
        max-width: 70px;
        max-height: 40px;
    }

    .airline-name {
        display: block;
        text-align: left;
        font-size: 14px;
        color: #091924;
        font-weight: 600;
        height: auto;
    }

    .flight-details {
        width: 100%;
    }

    .flight-times {
        grid-template-columns: 1fr auto 1fr;
        gap: 16px;
        height: auto;
    }

    .departure-time,
    .arrival-time {
        font-size: 20px;
    }

    .flight-airports {
        display: flex;
        justify-content: space-between;
        margin-top: 8px;
        height: auto;
    }

    .flight-price {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 16px;
        border-top: 1px solid #f0f2f5;
        min-width: auto;
        height: auto;
    }

    .flight-selection-radio {
        order: 2;
    }

    .airport-options {
        flex-wrap: wrap;
        gap: 8px;
    }

    .airport-option {
        min-width: calc(50% - 4px);
        padding: 12px 16px;
        font-size: 13px;
    }

    .date-selectors {
        flex-direction: column;
        gap: 16px;
    }

    .date-to-selector {
        display: none;
    }

    .vis-flere-fly {
        width: calc(100% - 32px);
        margin: 16px;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .flight-option {
        border: 2px solid #091924;
    }

    .flight-option.selected {
        border-width: 3px;
    }

    .flight-option::after {
        border-width: 3px;
    }
}

/* Animation for smooth transitions */
.flight-option,
.flight-option::after,
.price-tag,
.included-tag,
.airport-option,
.vis-flere-fly {
    transition: all 0.2s ease;
}

@keyframes fly {
    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-40%, -50%);
    }
}

/* Print styles */
@media print {
    .vis-flere-fly,
    .airport-selector {
        display: none;
    }

    .flight-option {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}