/* ============================================================
   UPGRADE MODAL – COMPLETE STYLES (FIXED SLIDER & ARROWS)
   ============================================================ */

/* ----- Overlay (full screen, centered) ----- */
#upgrade-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

/* ----- Main container ----- */
.fare-options-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
    position: relative;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

/* ----- Header & info ----- */
.fare-header-1 {
    margin-bottom: 20px;
}

.header-upgrade {
    color: #023368;
    margin: 0 0 10px;
    font-size: 1em;
    background-color: #96ffce29;
    padding: 10px 10px;
    border-radius: 5px;
    border: 1px solid #477f475c;
}

.trip-info-upgrade {
    font-size: 1em;
    margin-bottom: 8px;
}

.note-upgrade {
    background: #fef6e4;
    border: 1px solid #fcd581;
    padding: 8px 12px;
    font-size: 1em;
    border-radius: 5px;
    color: #333;
    margin-bottom: 20px;
}

/* ----- Slider wrapper (arrows inside) ----- */
.slider {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 10px;      /* slight padding so cards don't touch arrows */
}

/* ----- Cards container (scrollable) ----- */
#cardContainer {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    padding: 10px 5px;
    flex: 1;
}

#cardContainer::-webkit-scrollbar {
    display: none;                 /* Chrome/Safari */
}

/* ----- Individual fare card ----- */
.fare-card {
    flex: 0 0 300px !important;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    background: #fff;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    scroll-snap-align: start;
    transition: transform 0.2s ease;
}

/* ----- Card header ----- */
.fare-card-header {
    background: #0056b3;
    color: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 10px 10px 0 0;
}

.fare-card-header img {
    width: 40px;
    margin-bottom: 8px;
}

.fare-card-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #fff;
}

.fare-card-header p {
    font-size: 0.9em;
    margin: 4px 0 0;
}

.price-upgrade {
    color: #023368;
    margin: 12px 15px 4px;
}

.sub-info-upgrade {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 15px 8px;
    font-size: 1.2em;
    font-weight: bold;
}

.sub-info-upgrade input[type="radio"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.divider {
    border-bottom: 1px solid #ddd;
    margin: 0 15px 12px;
}

.section-title-up {
    font-size: 1.1em;
    font-weight: bold;
    color: #023368;
    margin: 0 15px 8px;
}

.fare-details,
.fare-flexibility {
    list-style: none;
    margin: 0 15px 12px;
    padding: 0;
}

.fare-details li,
.fare-flexibility li {
    display: flex;
    align-items: center;
    font-size: 1em;
    margin-bottom: 8px;
}

/* ----- Icon circles (check, cross, dollar) ----- */
.fare-details li::before {
    content: "✔";
    color: #fff;
    background: #00b894;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 10px;
    flex-shrink: 0;
}

.fare-flexibility li.refund::before {
    content: "✖";
    color: #fff;
    background: #dc3545;
    border-radius: 50%;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.fare-flexibility li.change::before {
    content: "$";
    color: #fff;
    background: #007bff;
    border-radius: 50%;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ----- Action buttons at bottom ----- */
.fare-actions {
    margin: auto 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fare-actions button {
    padding: 8px;
    border: 1px solid #aed5ff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: 0.3s;
}

.btn-upgrade {
    background: #eaf4ff;
    color: #01346b;
}

.btn-upgrade:hover {
    background: #007bff;
    color: #fff;
}

.btn-basic {
    background: #0056b3;
    color: #fff;
}

.btn-basic:hover {
    background: #007bff;
}

/* ----- Close button (absolute) ----- */
.close-upgrade {
    position: absolute;
    top: 50px;
    right: 50px;
    font-size: 30px;
    color: rgb(1, 110, 38);
    font-weight: 600;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 241, 226, 0.384);
    border-radius: 50%;
    z-index: 101;
    border-color: green;
    cursor: pointer;
}

/* ============================================================
   SLIDER ARROWS – POSITIONED INSIDE THE SLIDER
   ============================================================ */
.fare-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0056b3;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    transition: all 0.2s ease;
}

.fare-nav-btn:hover {
    background: #004494;
    transform: translateY(-50%) scale(1.1);
}

.fare-prev {
    left: 5px;    /* inside the container */
}

.fare-next {
    right: 5px;   /* inside the container */
}

.fare-nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ============================================================
   MOBILE RESPONSIVE (≤ 767px)
   ============================================================ */
@media (max-width: 767px) {
    #upgrade-modal-overlay {
        background: rgba(0, 0, 0, 0.85) !important;
        display: block !important;          /* we position the modal manually */
        padding: 0 !important;
        margin: 0 !important;
        align-items: unset;
        justify-content: unset;
    }

    .fare-options-container {
        position: fixed !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        max-height: 92vh !important;
        padding: 20px 15px 15px !important;
        margin: 0 !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        box-shadow: none !important;
        overflow-y: auto !important;
    }

    .header-upgrade,
    .note-upgrade {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .close-upgrade {
        right: 15px !important;
        top: 10px !important;
        margin-top: 0 !important;
        font-size: 28px !important;
        color: #198754;
        width: 28px !important;
        height: 28px !important;
        background: #ffffff;
        border: 1px solid #477f475c;
    }

    .slider {
        padding: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    #cardContainer {
        gap: 0 !important;
        padding: 5px 0 !important;
        flex: unset !important;
    }

    .fare-card {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 12px 10px !important;
        margin: 0 !important;
    }

    .fare-card-header {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px !important;
    }
    .fare-card-header img {
        width: 30px !important;
        height: 30px !important;
    }
    .fare-card-header h3 {
        font-size: 15px !important;
        margin: 0 !important;
    }

    .price-upgrade {
        font-size: 24px !important;
        margin: 6px 0 !important;
    }
    .price-upgrade span {
        font-size: 15px !important;
    }

    .sub-info-upgrade {
        font-size: 15px !important;
        margin: 4px 0 !important;
    }
    .sub-info-upgrade input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
    }

    .divider {
        margin: 6px 0 !important;
    }
    .section-title-up {
        font-size: 13px !important;
        margin: 6px 0 2px 0 !important;
    }
    .fare-details li,
    .fare-flexibility li {
        font-size: 16px !important;
        padding: 1px 0 !important;
        line-height: 1.5 !important;
    }

    .fare-actions {
        margin-top: 8px !important;
        gap: 5px !important;
    }
    .btn-upgrade,
    .btn-basic {
        padding: 10px 8px !important;
        font-size: 14px !important;
        width: 100% !important;
        text-align: center !important;
        border-radius: 8px !important;
        white-space: normal !important;
    }

    .fare-nav-btn {
        width: 36px !important;
        height: 36px !important;
        background: rgb(210 210 210 / 90%) !important;
        border: 1px solid #ddd !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        font-size: 20px !important;
        color: #013e80 !important;
    }

    .fare-prev {
        left: 5px !important;
    }
    .fare-next {
        right: 5px !important;
    }

    /* Adjust icon sizes on mobile */
    .fare-details li::before,
    .fare-flexibility li.refund::before,
    .fare-flexibility li.change::before {
        width: 20px !important;
        height: 20px !important;
        font-size: 14px !important;
    }
}