/* =========================================
   BOOKING SYSTEM & PACKAGES - STYLES
   ========================================= */

/* Appointment CTA Section */
.appointment-section {
    padding: 80px 0;
}

.appt-cta-cards {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
    padding: 1rem 0.25rem 1.5rem;
    /* Snap to cards when scrolling */
    scroll-snap-type: x mandatory;
    /* Center cards when they fit in one row */
    justify-content: center;
}
.appt-cta-cards::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}
/* When there are more cards than fit, switch to left-align so scroll works */
.appt-cta-cards.has-overflow {
    justify-content: flex-start;
}

.appt-cta-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
    /* Fixed width so cards sit side by side */
    flex: 0 0 300px;
    min-width: 300px;
    scroll-snap-align: start;
}

.appt-cta-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--cat-color, var(--primary-color));
}

.appt-cta-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.appt-cta-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.appt-cta-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Appointment CTA — scroll wrapper + nav arrows */
.appointment-cta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

/* The mask that clips the scrollable track */
.appt-cta-cards-wrapper {
    flex: 1;
    overflow: hidden;
    /* Soft fade on left/right edges when more cards exist */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-image:         linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}
/* When only 1-2 cards: no fade needed */
.appt-cta-cards-wrapper.no-overflow {
    -webkit-mask-image: none;
    mask-image: none;
}

/* Navigation arrow buttons */
.appt-scroll-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}
.appt-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
.appt-scroll-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}
.appt-scroll-left  { margin-right: 0.75rem; }
.appt-scroll-right { margin-left:  0.75rem; }

/* Responsive: mobile appointment CTA cards */
@media (max-width: 640px) {
    /* On mobile: 2 cards per row in a grid, NOT scrollable */
    .appt-cta-cards-wrapper {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .appt-cta-cards {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible !important;
        scroll-snap-type: none;
        gap: 0.75rem;
        padding: 0.5rem 0 1rem;
        justify-content: unset;
    }
    .appt-cta-cards.has-overflow {
        justify-content: unset;
    }
    .appt-cta-card {
        flex: unset;
        min-width: unset;
        width: 100%;
        padding: 1.2rem 0.85rem;
    }
    .appt-cta-icon {
        font-size: 2.2rem;
        margin-bottom: 0.4rem;
    }
    .appt-cta-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    .appt-cta-card p {
        font-size: 0.75rem;
        margin-bottom: 0.85rem;
    }
    .appt-cta-card .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.85rem;
    }
    .appt-scroll-btn {
        display: none; /* no arrows needed in grid mode */
    }
}

/* Google Sign-In Button */
.btn-google {
    background: #ffffff;
    border: 1px solid #dadce0;
    color: #3c4043;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.3);
}

/* Booking Modal */
.booking-modal {
    z-index: 3000;
}

.booking-modal-content {
    max-width: 1000px !important;
    padding: 2.5rem !important;
    max-height: 90vh;
    overflow-y: auto;
}

.booking-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.booking-close-btn:hover {
    color: var(--text-dark);
}

/* Progress Bar */
.booking-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.booking-progress-step {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    position: relative;
    font-size: 1.2rem;
    transition: var(--transition);
}

.booking-progress-step::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    font-size: 0.75rem;
    white-space: nowrap;
    color: var(--text-light);
}

.booking-progress-step.active {
    background: var(--primary-color);
    color: var(--white);
}

.booking-progress-step.completed {
    background: #4caf50;
    color: var(--white);
}

.booking-progress-line {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
}

/* Packages Grid — horizontal scroll on desktop when more than 2 */
.packages-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
    /* Center when few cards fit without scrolling */
    justify-content: center;
}
/* Switch to left-align when there's real overflow */
.packages-grid.has-overflow {
    justify-content: flex-start;
}

.packages-grid::-webkit-scrollbar {
    height: 6px;
}

.packages-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.packages-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.packages-grid .package-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}
.package-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.package-card.popular {
    border-color: #ffc107;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ffc107;
    color: var(--text-dark);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.package-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.pkg-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pkg-price {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.pkg-full-price {
    display: block;
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-bottom: 0.15rem;
}

.price-main {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Savings badge on package cards */
.pkg-savings-badge {
    display: inline-block;
    margin-top: 0.6rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1px solid #a5d6a7;
    letter-spacing: 0.01em;
}

/* Inline per-field savings in the fee breakdown */
.fee-val-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fee-strike {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.82rem;
}

.fee-actual {
    font-weight: 600;
    color: var(--text-dark);
}

.fee-pct-tag {
    background: #fff3e0;
    color: #e65100;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    border: 1px solid #ffcc80;
    white-space: nowrap;
}

/* Total row at bottom of breakdown */
.fee-divider {
    border-top: 1px dashed #ddd;
    margin: 0.5rem 0 0.25rem;
}

.fee-total-row {
    font-weight: 700;
    color: var(--text-dark);
    padding-top: 0.4rem !important;
}

.fee-total-actual {
    color: var(--primary-color) !important;
    font-size: 1rem;
}

.fee-pct-green {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border-color: #a5d6a7 !important;
}

.pkg-includes ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.pkg-includes li {
    padding: 0.4rem 0;
    color: var(--text-light);
}

.pkg-fees-breakdown {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-size: 0.9rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    color: var(--text-dark);
}

.fee-row.free {
    color: var(--primary-color);
    font-weight: 600;
}

.fee-row.extra {
    color: #f44336;
}

.courier-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.free-text {
    color: var(--text-light);
    font-style: italic;
}

/* Booking Payment Layout */
.booking-payment-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-top: 2rem;
}

.booking-qr-side {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.booking-qr-side img {
    max-width: 220px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Dynamic UPI QR container */
.upi-qr-canvas {
    display: inline-block;
    margin: 0 auto 1rem;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    line-height: 0; /* removes bottom gap from inline img */
}

.upi-qr-canvas canvas,
.upi-qr-canvas img {
    display: block;
    border-radius: 4px;
}

.booking-amount-box {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
}

.booking-amount-box strong {
    display: block;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.booking-amount-box small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.booking-txn-side {
    padding: 1rem;
}

/* Navigation Buttons */
.booking-nav-btns {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Success Overlay */
.booking-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    animation: fadeIn 0.3s ease;
}

.booking-success-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.booking-summary {
    text-align: left;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.summary-row:last-child {
    border-bottom: none;
}

.confirm-note {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* Repeat Medicine Order */
.repeat-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.repeat-package-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.repeat-package-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.repeat-package-card.recommended {
    border-color: #2196f3;
}

.recommended-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #2196f3;
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.repeat-package-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.repeat-package-card .pkg-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

/* Price block */
.repeat-price-block {
    margin: 0.75rem 0;
}

.repeat-price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.repeat-medicine-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.repeat-full-slash {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.repeat-savings-badge {
    display: inline-block;
    margin-top: 0.35rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

/* Includes list */
.repeat-includes {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.repeat-includes li {
    padding: 0.25rem 0;
    color: var(--text-light);
}

.repeat-includes .extra-note {
    color: #e67e22;
    font-size: 0.78rem;
}

/* Fee breakdown in repeat cards */
.repeat-breakdown .fee-strikethrough {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.85rem;
}

.repeat-breakdown .fee-row.highlight span:last-child {
    color: var(--primary-color);
    font-weight: 600;
}

/* Savings note in payment step */
.repeat-savings-note {
    display: block;
    font-size: 0.8rem;
    color: #2e7d32;
    margin-top: 0.4rem;
}

.repeat-savings-note .fee-strikethrough {
    text-decoration: line-through;
    color: var(--text-light);
}

/* Responsive — Booking modal & packages */
@media (max-width: 768px) {
    .booking-modal-content {
        width: 96% !important;
        margin: 2% auto !important;
        padding: 1.2rem !important;
        max-height: 96vh;
        border-radius: 12px;
    }

    /* Compact progress bar */
    .booking-progress {
        padding: 0 0.5rem;
        margin-bottom: 2rem;
        gap: 0;
    }
    .booking-progress-step {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .booking-progress-step::after {
        font-size: 0.65rem;
        bottom: -20px;
    }
    .booking-progress-line {
        width: 28px;
        height: 2px;
    }

    /* Package cards in booking modal — 2-per-row grid on mobile */
    .packages-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible !important;
        scroll-snap-type: none;
        gap: 0.75rem;
        padding-bottom: 0;
        justify-content: unset;
    }
    .packages-grid.has-overflow {
        justify-content: unset;
    }
    .packages-grid .package-card {
        flex: unset;
        min-width: unset;
        width: 100%;
        max-width: 100%;
        padding: 0.85rem 0.7rem;
    }
    .package-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    .pkg-desc {
        font-size: 0.75rem;
        margin-bottom: 0.8rem;
    }
    .price-main {
        font-size: 1.5rem;
    }
    .price-label {
        font-size: 0.75rem;
    }
    .pkg-price {
        padding: 0.6rem;
        margin: 0.6rem 0;
    }
    .pkg-fees-breakdown {
        font-size: 0.72rem;
        padding: 0.6rem;
    }
    .pkg-includes {
        font-size: 0.75rem;
    }
    .pkg-includes li {
        font-size: 0.75rem;
        padding: 0.2rem 0;
    }
    .popular-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.55rem;
        top: -8px;
        right: 10px;
    }
    .pkg-savings-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    .pkg-fees-breakdown .fee-row {
        padding: 0.25rem 0;
    }

    /* Repeat medicine order packages — 2-per-row grid on mobile */
    #repeatPackagesList {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .repeat-package-card {
        padding: 0.85rem 0.7rem;
    }
    .repeat-package-card h4 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    .repeat-package-card .pkg-desc {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }
    .repeat-medicine-price {
        font-size: 1.3rem;
    }
    .repeat-full-slash {
        font-size: 0.85rem;
    }
    .repeat-savings-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    .repeat-includes {
        font-size: 0.72rem;
    }
    .repeat-includes li {
        padding: 0.15rem 0;
    }
    .recommended-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.55rem;
        top: -8px;
        right: 10px;
    }

    /* Patient details form */
    .booking-modal-content .form-group {
        margin-bottom: 0.85rem;
    }
    .booking-modal-content .form-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .booking-modal-content input,
    .booking-modal-content textarea,
    .booking-modal-content select {
        font-size: 0.9rem;
        padding: 0.65rem 0.85rem;
    }

    /* Payment step */
    .booking-payment-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .booking-qr-side {
        padding: 1.2rem;
    }
    .booking-qr-side img {
        max-width: 160px;
    }
    .upi-qr-canvas canvas,
    .upi-qr-canvas img {
        width: 150px !important;
        height: 150px !important;
    }
    .booking-amount-box strong {
        font-size: 1.4rem;
    }

    /* Nav buttons */
    .booking-nav-btns {
        flex-direction: column;
        gap: 0.75rem;
    }
    .booking-nav-btns .btn {
        width: 100%;
        text-align: center;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* =========================================
   RAZORPAY PAYMENT SECTION
   ========================================= */

/* Razorpay primary section at top of Step 3 */
.razorpay-payment-section {
    text-align: center;
    padding: 1.5rem 1rem 1rem;
}

.razorpay-amount-display {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.razorpay-amount-display strong {
    font-size: 1.4rem;
    color: #1a1a1a;
}

.razorpay-amount-display small {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.2rem;
}

/* Razorpay branded button */
.btn-razorpay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #528FF0;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-width: 260px;
}

.btn-razorpay:hover:not(:disabled) {
    background: #3a7bd5;
    transform: translateY(-1px);
}

.btn-razorpay:active:not(:disabled) {
    transform: translateY(0);
}

.btn-razorpay:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.razorpay-note {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.6rem;
}

/* Error message below Razorpay button */
.payment-error-msg {
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #c62828;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-align: left;
}

/* Divider between Razorpay and UPI */
.payment-method-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #bbb;
    font-size: 0.82rem;
}

.payment-method-divider::before,
.payment-method-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Savings note inside Razorpay repeat section */
.repeat-savings-note {
    display: inline-block;
    font-size: 0.85rem;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .btn-razorpay,
    .btn-cashfree {
        min-width: 100%;
    }
}

/* Cashfree branded button */
.btn-cashfree {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #1a5276;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-width: 260px;
}

.btn-cashfree:hover:not(:disabled) {
    background: #154360;
    transform: translateY(-1px);
}

.btn-cashfree:active:not(:disabled) {
    transform: translateY(0);
}

.btn-cashfree:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =========================================
   PAST ORDERS — REORDER FLOW
   ========================================= */

.repeat-past-loading {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 0;
    font-size: 0.95rem;
}

.repeat-past-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-bottom: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.repeat-past-orders-list::-webkit-scrollbar { width: 5px; }
.repeat-past-orders-list::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 10px; }
.repeat-past-orders-list::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; }

.repeat-past-order-card {
    background: var(--white);
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.repeat-past-order-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.1);
}

.repeat-past-order-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.repeat-past-order-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.repeat-past-order-title strong {
    font-size: 1rem;
    color: var(--text-dark);
}

.repeat-past-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.85rem;
}

.cons-fee-saved {
    color: #2e7d32;
    font-weight: 600;
}

.repeat-past-order-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reorder-this-btn {
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.15s;
}

.reorder-this-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.reorder-unavailable {
    font-size: 0.82rem;
    color: var(--text-light);
    font-style: italic;
}

.repeat-past-orders-footer {
    padding-top: 0.25rem;
}

.repeat-back-row {
    margin-bottom: 0.75rem;
}

.btn-link-subtle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-link-subtle:hover {
    color: var(--primary-dark, #388e3c);
}

/* =========================================
   BOOKING EXIT — "CALL CLINIC" PROMPT MODAL
   ========================================= */

.booking-exit-modal {
    display: none;       /* toggled to flex by JS */
    align-items: center;
    justify-content: center;
    z-index: 5000;       /* above bookingModal (z-index 3000) */
}

.booking-exit-content {
    position: relative;
    max-width: 480px !important;
    width: 92% !important;
    padding: 0 0 2.5rem !important;
    border-radius: 20px !important;
    overflow: hidden;
    text-align: center;
    animation: slideUp 0.28s ease;
}

/* Colourful top accent stripe */
.booking-exit-accent {
    height: 7px;
    background: linear-gradient(90deg, #43a047 0%, #66bb6a 50%, #29b6f6 100%);
}

/* Dismiss × button */
.booking-exit-dismiss {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: color 0.15s;
}

.booking-exit-dismiss:hover { color: #555; }

/* Big icon */
.booking-exit-icon {
    font-size: 3.2rem;
    margin: 1.6rem 0 0.5rem;
    line-height: 1;
}

/* Headline */
.booking-exit-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 2rem 0.85rem;
    line-height: 1.35;
}

/* Supporting copy */
.booking-exit-body {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.65;
    margin: 0 2rem 1.25rem;
}

/* Trust-signal pill row */
.booking-exit-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 1.5rem 1.6rem;
}

.booking-exit-trust span {
    background: #f1f8e9;
    color: #388e3c;
    border: 1px solid #c5e1a5;
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Primary CTA — green pulsing call button */
.booking-exit-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: #fff !important;
    text-decoration: none !important;
    padding: 0.95rem 2.4rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(67, 160, 71, 0.45);
    animation: pulseGreen 2.2s ease-in-out infinite;
    transition: transform 0.15s, box-shadow 0.15s;
    margin: 0 1.5rem;
    width: calc(100% - 3rem);
    box-sizing: border-box;
}

.booking-exit-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(67, 160, 71, 0.55);
    animation: none;
}

@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 4px 18px rgba(67, 160, 71, 0.45); }
    50%       { box-shadow: 0 4px 28px rgba(67, 160, 71, 0.75); }
}

/* Secondary — "take me back" link-style button */
.booking-exit-back-btn {
    display: block;
    width: calc(100% - 3rem);
    margin: 0.85rem 1.5rem 0;
    background: transparent;
    border: 1.5px solid #ddd;
    color: var(--text-light);
    font-size: 0.88rem;
    padding: 0.65rem;
    border-radius: 50px;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
}

.booking-exit-back-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .booking-exit-title { font-size: 1.15rem; margin: 0 1.25rem 0.75rem; }
    .booking-exit-body  { font-size: 0.86rem; margin: 0 1.25rem 1.1rem; }
    .booking-exit-trust { gap: 0.4rem; margin: 0 1rem 1.3rem; }
    .booking-exit-call-btn,
    .booking-exit-back-btn {
        width: calc(100% - 2.5rem);
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
    .booking-exit-icon { font-size: 2.5rem; }
}
