/* Car Selection Component Styles */
.car-selection-section {
    background: #f8f9fa;
    padding: 40px 20px;
    min-height: 400px;
}

.car-selection-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Routes Container */
.routes-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Route Section Styles */
.route-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Route Info Styles */
.route-info {
    padding: 24px;
}

.route-header {
    margin-bottom: 20px;
}

.route-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ffc107;
}

.route-locations {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 20px;
}

.route-from,
.route-to {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.route-from {
    color: #0417934d;
}

.route-to {
    color: #041793;
}

.location-icon {
    height: 30px;
    width: 18px;
    flex-shrink: 0;
}

.location-name {
    font-weight: 600;
    font-size: 36px;
    line-height: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.route-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin: 0 20px;
    position: relative;
    width: 120px;
    height: 10px;
}

/* Circle at the start */
.route-arrow::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #041793;
    z-index: 1;
}

/* Dashed line */
.route-arrow::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #041793 0,
        #041793 8px,
        transparent 8px,
        transparent 16px
    );
}

/* Arrowhead chevron */
.route-arrow .arrow-head {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-top: 2px solid #041793;
    border-right: 2px solid #041793;
    border-bottom: none;
    border-left: none;
}

.arrow-icon {
    display: none;
}

.route-date {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6c757d;
    font-size: 16px;
    margin-top: 16px;
}

.date-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.date-text {
    color: #000000;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
}

/* Placeholder Route Styles */
.placeholder-route .route-info {
    border: 2px dashed #e9ecef;
    background: #f8f9fa;
}

.placeholder-route .route-title {
    color: #6c757d;
    border-bottom-color: #dee2e6;
}

.placeholder-route .location-name {
    color: #6c757d;
    font-style: italic;
}

/* Car List */
.car-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

/* Car Item Styles */
.car-item {
    box-shadow: 0 1px 20px 0 #8888884d;
    background: white;
    border-radius: 8px;
    padding: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: all 0.3s ease;
}

.car-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Car Image Section */
.car-image-section {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 480px;
    border-right: 1px solid #f3f3f4;
}

.car-image {
    width: 350px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.car-description {
    background: #f6f7f8;
    border-radius: 6px;
    font-weight: 400;
    font-size: 12px;
    vertical-align: middle;
    padding: 8px;
    margin-top: 16px;
    color: #6c7c8c;
}

/* Car Details Section */
.car-details-section {
    flex: 1;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.car-name {
    font-weight: 600;
    font-size: 16px;
    line-height: 100%;
    color: #373f47;
}

.car-capacity {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

/* Car Time Info */
.car-time-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f3f4;
}

.time-info-item {
    display: flex;
    align-items: center;
    line-height: 100%;
    font-weight: 600;
    font-size: 14px;
}

.time-label {
    color: #041793;
}

.time-value {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    padding-left: 4px;
}

.capacity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 100%;
    vertical-align: middle;
    color: #6f7f8f;
}

.capacity-icon {
    width: 16px;
    height: 16px;
}

.car-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.car-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 400;
    font-size: 12px;
    line-height: 12px;
    vertical-align: middle;
    color: #6f7f8f;
}

.car-feature-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Car Pricing Section */
.car-pricing-section {
    flex: 0 0 300px;
    padding: 24px;
    background: linear-gradient(
        0deg,
        rgba(247, 208, 22, 0.2) 21%,
        rgba(254, 213, 19, 0.2) 21%,
        rgba(4, 23, 147, 0.2) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.price {
    font-weight: 600;
    font-size: 26px;
    line-height: 100%;
    text-align: center;
    margin: 0;
    color: #041793;
}

.select-button {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 180px;
}

.select-button:hover {
    background: #ffca2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.select-button:active {
    transform: translateY(0);
}

/* Payment Methods */
.payment-methods {
    margin-top: 16px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.payment-methods-image {
    width: 128px;
    height: 15px;
}

.payment-methods-image:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Change Button Styles */
.change-button {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 180px;
}

.change-button:hover {
    background: #ffca2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.change-button:active {
    transform: translateY(0);
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: #0056b3;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 10px;
}

/* Booking Continue Section */
.booking-continue-section {
    padding: 40px 20px;
    text-align: center;
}

.continue-booking-button {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 20px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    white-space: nowrap;
}

.continue-booking-button:hover {
    background: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.continue-booking-button:focus {
    outline: none;
    background: #ffca2c;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.5);
    transform: translateY(-1px);
}

.continue-booking-button:active {
    transform: translateY(0);
}

.continue-booking-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Continue booking button responsive improvements */
@media (max-width: 1024px) {
    .continue-booking-button {
        min-width: 280px;
        padding: 18px 36px;
        font-size: 17px;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .car-selection-section {
        padding: 30px 15px;
    }

    /* Mobile car card redesign */
    .car-item {
        flex-direction: column;
        padding: 0;
        position: relative;
    }

    .car-image-section {
        order: 2;
        padding: 16px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        border-right: none;
        border-bottom: none;
        min-width: auto;
        width: 100%;
    }

    .car-image {
        width: 160px;
        height: 100px;
        flex-shrink: 0;
    }

    .car-description {
        margin-top: 0;
        font-size: 14px;
        line-height: 1.4;
        background: transparent;
        padding: 0;
        color: #6c7c8c;
    }

    .car-details-section {
        order: 1;
        padding: 16px;
        border-bottom: none;
        min-width: auto;
    }

    .car-name {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 0;
        display: inline-block;
    }

    .car-capacity {
        position: absolute;
        top: 16px;
        right: 16px;
        gap: 16px;
        margin-bottom: 0;
    }

    .car-time-info {
        order: 3;
        margin-bottom: 0;
        padding: 16px;
        border-bottom: none;
        border-top: none;
    }

    .time-info-item {
        font-size: 16px;
    }

    .time-label {
        font-weight: 600;
    }

    .time-value {
        font-size: 16px;
    }

    .car-features {
        display: none;
    }

    .car-pricing-section {
        order: 4;
        flex: none;
        width: 100%;
        padding: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(
            90deg,
            rgba(254, 213, 19, 0.3) 0%,
            rgba(254, 213, 19, 0.1) 100%
        );
    }

    .payment-methods {
        display: none;
    }

    .price {
        font-size: 24px;
        text-align: left;
    }

    .select-button,
    .change-button {
        max-width: none;
        width: auto;
        padding: 14px 40px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .car-selection-section {
        padding: 20px 20px;
    }

    .booking-continue-section {
        padding: 30px 20px;
    }

    .continue-booking-button {
        min-width: auto;
        padding: 16px 32px;
        font-size: 16px;
    }

    .route-locations {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        position: relative;
        padding-left: 15px;
    }

    .route-from,
    .route-to {
        min-width: auto;
        width: 100%;
    }

    .route-from .location-icon,
    .route-to .location-icon {
        display: none;
    }

    .route-from {
        padding-bottom: 3px;
    }

    .route-to {
        padding-top: 3px;
    }

    .location-name {
        font-size: 24px;
        line-height: 100%;
    }

    .route-arrow {
        position: absolute;
        left: -12px;
        top: 8px;
        bottom: 8px;
        transform: none;
        margin: 0;
        width: 10px;
        height: auto;
    }

    /* Vertical circle at the top */
    .route-arrow::before {
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        width: 3px;
        height: 3px;
    }

    /* Vertical dashed line */
    .route-arrow::after {
        left: 50%;
        top: 10px;
        bottom: 10px;
        right: auto;
        transform: translateX(-50%);
        width: 1px;
        height: auto;
        background: repeating-linear-gradient(
            to bottom,
            #041793 0,
            #041793 4px,
            transparent 4px,
            transparent 8px
        );
    }

    /* Vertical circle at the bottom (same as top) */
    .route-arrow .arrow-head {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 0;
        transform: translateX(-50%);
        width: 3px;
        height: 3px;
        border: none;
        border-radius: 50%;
        background-color: #041793;
    }

    .arrow-icon {
        display: none;
    }

    .car-list {
        gap: 16px;
        margin-top: 16px;
    }

    .route-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .car-selection-section {
        padding: 15px 15px;
    }

    .route-info {
        padding: 20px;
    }

    .route-title {
        font-size: 18px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .routes-container {
        gap: 20px;
    }

    .car-image-section {
        padding: 12px;
    }

    .car-image {
        width: 180px;
        height: 110px;
    }

    .car-details-section {
        padding: 12px;
    }

    .car-name {
        font-size: 18px;
    }

    .car-capacity {
        gap: 12px;
    }

    .car-time-info {
        margin-bottom: 10px;
        gap: 6px;
    }

    .time-info-item {
        font-size: 11px;
    }

    .time-label,
    .time-value {
        font-size: 11px;
    }

    .car-feature-item {
        font-size: 13px;
    }

    .car-pricing-section {
        padding: 12px;
    }

    .payment-methods {
        margin-top: 8px;
    }

    .payment-methods-image {
        max-height: 20px;
    }

    .price {
        font-size: 22px;
    }

    .select-button,
    .change-button {
        padding: 12px 24px;
        font-size: 14px;
    }

    .continue-booking-button {
        width: 100%;
        max-width: 400px;
        min-width: auto;
        padding: 18px 32px;
        font-size: 16px;
    }

    .booking-continue-section {
        padding: 25px 15px;
    }
}

/* Mobile Car Card Styles */
.car-item--mobile {
    display: none;
}

.car-item--desktop {
    display: flex;
}

/* Hide car items when not selected (overrides all other display rules) */
.car-item.car-hidden {
    display: none !important;
}

@media (max-width: 992px) {
    .car-item--desktop {
        display: none !important;
    }

    .car-item--mobile {
        display: block !important;
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 20px 0 #8888884d;
        overflow: hidden;
    }

    .car-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        position: relative;
    }

    .car-mobile-header::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background-color: #e9ecef;
    }

    .car-item--mobile .car-name {
        font-size: 20px;
        font-weight: 600;
        color: #373f47;
        margin: 0;
    }

    .car-item--mobile .car-capacity {
        display: flex;
        gap: 16px;
        position: static;
        margin: 0;
    }

    .car-item--mobile .capacity-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
        font-size: 16px;
        color: #041793;
    }

    .car-mobile-image-section {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 20px;
        position: relative;
    }

    .car-mobile-image-section::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background-color: #e9ecef;
    }

    .car-item--mobile .car-image {
        width: 180px;
        height: auto;
        flex-shrink: 0;
    }

    .car-item--mobile .car-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .car-item--mobile .car-description {
        font-size: 14px;
        line-height: 1.5;
        color: #6c7c8c;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    .car-mobile-time-info {
        padding: 16px 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .car-item--mobile .time-info-item {
        font-size: 16px;
        line-height: 1.4;
    }

    .car-item--mobile .time-label {
        font-weight: 600;
        color: #041793;
    }

    .car-item--mobile .time-value {
        font-weight: 400;
    }

    .car-mobile-pricing {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background: linear-gradient(
            180deg,
            rgba(4, 23, 147, 0.15) 0%,
            rgba(254, 213, 19, 0.3) 100%
        );
    }

    .car-item--mobile .price {
        font-size: 24px;
        font-weight: 600;
        color: #041793;
        margin: 0;
    }

    .car-item--mobile .select-button,
    .car-item--mobile .change-button {
        padding: 12px 32px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        background: #ffc107;
        color: #212529;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .car-item--mobile .select-button:hover,
    .car-item--mobile .change-button:hover {
        background: #ffca2c;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    }
}