/* =========================================
   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;
    /* Sticky at bottom of modal on all screen sizes */
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0.85rem 0 0.75rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border-top: 1px solid #f0f0f0;
    z-index: 10;
}

/* 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: flex-start;
    justify-content: center;
    z-index: 4000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.booking-success-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 560px;
    text-align: center;
    animation: slideUp 0.3s ease;
    margin: auto;
    box-sizing: border-box;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.booking-success-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

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

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
}

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

.summary-row span {
    color: var(--text-light);
    flex-shrink: 0;
}

.summary-row strong {
    text-align: right;
    word-break: break-word;
}

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

.confirm-note--success {
    color: #1b5e20;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: left;
}

/* Status badges used in booking confirmation (mirrors admin-styles) */
.booking-success-card .status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.booking-success-card .status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.booking-success-card .status-badge.confirmed {
    background: #d4edda;
    color: #155724;
}

/* Mobile — phones */
@media (max-width: 480px) {
    .booking-success-overlay {
        align-items: flex-start;
        padding: 0.75rem 0.5rem;
    }

    .booking-success-card {
        padding: 1.5rem 1.1rem;
        border-radius: 12px;
        margin: auto 0;
    }

    .success-icon {
        font-size: 3rem;
    }

    .booking-success-card h2 {
        font-size: 1.3rem;
    }

    .booking-success-card > p {
        font-size: 0.88rem;
    }

    .booking-summary {
        padding: 1rem 0.85rem;
    }

    .summary-row {
        font-size: 0.875rem;
        flex-wrap: wrap;
    }

    .summary-row strong {
        font-size: 0.875rem;
    }

    .confirm-note,
    .confirm-note--success {
        font-size: 0.85rem;
    }

    .booking-success-card .btn {
        width: 100%;
        font-size: 0.95rem;
    }
}

/* 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; }
}

/* =========================================
   PAYMENT GATEWAY — NEW COMPACT UI
   Amount hero + gateway icon strip
   ========================================= */

/* ── Amount hero ── */
.payment-amount-hero {
    text-align: center;
    padding: 1.25rem 1rem 1rem;
    background: var(--bg-light, #f8fafb);
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.payment-amount-label {
    display: block;
    font-size: 0.78rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}

.payment-amount-hero > strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #2e7d32);
    line-height: 1.2;
}

.payment-amount-hero > small {
    display: block;
    font-size: 0.82rem;
    color: #777;
    margin-top: 0.2rem;
}

/* ── Retry CTA (hidden until error) ── */
.payment-primary-cta {
    text-align: center;
    margin-bottom: 1rem;
}

.btn-pay-main {
    width: 100%;
    max-width: 320px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
}

.payment-secure-note {
    margin-top: 0.45rem;
    font-size: 0.76rem;
    color: #999;
}

/* ── Gateway strip wrapper ── */
.payment-gateway-strip {
    text-align: center;
    margin-bottom: 1.25rem;
}

.gateway-strip-label {
    display: block;
    font-size: 0.72rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.65rem;
}

/* ── Icon row — fills width, wraps cleanly ── */
.gateway-icons-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    width: 100%;
}

/* ── Individual gateway card ── */
.gateway-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1 1 90px;
    max-width: 130px;
    min-width: 80px;
    min-height: 72px;
    padding: 10px 8px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* image inside button */
.gateway-icon-btn img {
    width: auto;
    max-width: 80px;
    max-height: 30px;
    object-fit: contain;
    pointer-events: none;
    display: block;
    border-radius: 4px;
}

/* inline SVG logo (PayU, UPI) */
.gw-svg-logo {
    width: 52px;
    height: 24px;
    display: block;
    overflow: visible;
}

/* text fallback when img fails to load */
.gw-text-fallback {
    font-size: 0.72rem;
    font-weight: 700;
    color: #444;
    display: none;
    align-items: center;
    justify-content: center;
}

/* label below icon */
.gw-label {
    font-size: 0.68rem;
    color: #777;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* hover */
.gateway-icon-btn:hover {
    border-color: var(--primary-color, #2e7d32);
    box-shadow: 0 2px 10px rgba(46,125,50,.12);
    transform: translateY(-2px);
}

/* selected / active */
.gateway-icon-btn.active {
    border-color: var(--primary-color, #2e7d32);
    box-shadow: 0 0 0 3px rgba(46,125,50,.2);
    background: #f0faf0;
}

.gateway-icon-btn.active .gw-label {
    color: var(--primary-color, #2e7d32);
    font-weight: 600;
}

.gateway-icon-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* disabled during payment processing */
.gateway-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── PayU standalone button (fallback) ── */
.btn-payu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #00adef;
    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-payu:hover:not(:disabled) { background: #0096d4; transform: translateY(-1px); }
.btn-payu:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Mobile — ≤ 480px ── */
@media (max-width: 480px) {
    /* Amount */
    .payment-amount-hero {
        padding: 1rem 0.75rem 0.85rem;
    }
    .payment-amount-hero > strong {
        font-size: 1.65rem;
    }

    /* Gateway icons — 4 across on mobile */
    .gateway-icons-row {
        gap: 0.4rem;
        justify-content: space-between;
    }
    .gateway-icon-btn {
        flex: 1 1 60px;
        max-width: none;        /* let flex handle it */
        min-height: 64px;
        padding: 8px 4px 6px;
        border-radius: 8px;
    }
    .gateway-icon-btn img {
        max-width: 44px;
        max-height: 22px;
    }
    .gw-svg-logo {
        width: 42px;
        height: 20px;
    }
    .gw-label {
        font-size: 0.6rem;
    }

    /* Retry button full width */
    .btn-pay-main {
        max-width: 100%;
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }

    /* UPI QR section stacks vertically */
    .booking-payment-layout {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    .booking-qr-side {
        padding: 1rem 0.75rem;
    }
}

/* ── Very small phones — ≤ 360px ── */
@media (max-width: 360px) {
    .gateway-icon-btn {
        min-height: 58px;
        padding: 6px 3px 5px;
    }
    .gateway-icon-btn img,
    .gw-svg-logo {
        max-width: 38px;
        max-height: 18px;
        width: 38px;
        height: 18px;
    }
    .gw-label {
        font-size: 0.55rem;
    }
}


/* ============================================================
   MOBILE-FIRST IMPROVEMENTS — packages.css
   Tasks: booking modal bottom-sheet, close btn tap target,
   progress bar, slot step, payment buttons, reorder flow,
   nav buttons, 375px floor
   ============================================================ */

/* ── Booking close button — always 44×44px tap target ── */
.booking-close-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    /* Move slightly so it doesn't clip the title */
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.25rem;
}

/* ── All payment gateway buttons — proper touch targets ── */
.btn-razorpay,
.btn-cashfree,
.btn-payu {
    min-height: 50px;
    touch-action: manipulation;
}

/* ── Reorder button — 44px tap target ── */
.reorder-this-btn {
    min-height: 44px;
    touch-action: manipulation;
}

/* ── Booking nav buttons — 44px base ── */
.booking-nav-btns .btn {
    min-height: 44px;
    touch-action: manipulation;
}

/* ============================================================
   @media (max-width: 768px) — Booking modal as bottom sheet
   ============================================================ */
@media (max-width: 768px) {
    /* Slide up from bottom — feels native on iOS/Android */
    .booking-modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .booking-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 92vh;
        padding: 1.1rem 1.1rem 0 !important;
        /* Safe area for home-bar phones */
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem) !important;
        animation: bookingSheetUp 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
    }

    @keyframes bookingSheetUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* Drag-handle visual hint */
    .booking-modal-content::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 0 auto 0.85rem;
    }

    /* Progress bar — hide text labels, keep circles compact */
    .booking-progress {
        padding: 0 0.25rem;
        margin-bottom: 1.5rem;
        gap: 0;
    }

    .booking-progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Hide step labels on small screens — they overlap */
    .booking-progress-step::after {
        display: none;
    }

    .booking-progress-line {
        width: 22px;
        height: 2px;
    }

    /* Step headings */
    .booking-modal-content h2 {
        font-size: 1.15rem;
        margin-bottom: 0.85rem;
    }

    .booking-modal-content h3 {
        font-size: 1rem;
    }

    /* ── Step 4: Slot selection ── */
    /* Date + slot stack vertically (already done via .booking-modal-content .form-row,
       but this ensures it even when the admin-form class is used) */
    #slotSelectionForm .form-row,
    .booking-modal-content .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Date & time inputs — taller for easy tapping */
    #bAppointmentDate,
    #bAppointmentSlot {
        min-height: 48px;
        font-size: 16px;    /* Prevents iOS Safari zoom */
        padding: 0.7rem 0.85rem;
    }

    /* Report upload — full width */
    #bReportUpload {
        font-size: 15px;
    }

    /* Payment buttons — full width, taller */
    .btn-razorpay,
    .btn-cashfree,
    .btn-payu {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        font-size: 1rem;
    }

    /* Razorpay section centering helpers */
    .razorpay-payment-section {
        padding: 1rem 0 0.75rem;
    }

    /* Nav buttons in each step — always full-width stacked */
    .booking-nav-btns {
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 1.25rem;
        padding-bottom: 0.5rem;
    }

    .booking-nav-btns .btn {
        width: 100%;
        min-height: 50px;
        font-size: 0.98rem;
        text-align: center;
        justify-content: center;
    }

    /* Repeat order past-orders list — lower max-height so modal doesn't overflow */
    .repeat-past-orders-list {
        max-height: 38vh;
    }

    /* Reorder button — full width on mobile */
    .repeat-past-order-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .reorder-this-btn {
        width: 100%;
        min-height: 46px;
        text-align: center;
        justify-content: center;
    }

    /* Booking exit modal */
    .booking-exit-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
    }
}

/* ============================================================
   @media (max-width: 480px) — Fine-tuning for smaller phones
   ============================================================ */
@media (max-width: 480px) {
    /* Modal content padding tighter */
    .booking-modal-content {
        padding: 0.9rem 0.85rem 0 !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem) !important;
    }

    /* Package cards — 1 column when screen is very narrow */
    .packages-grid {
        grid-template-columns: 1fr !important;
    }

    /* Appointment CTA cards — 1 column */
    .appt-cta-cards {
        grid-template-columns: 1fr !important;
    }

    .appt-cta-card {
        padding: 1rem 1rem;
    }

    .appt-cta-card h3 {
        font-size: 1rem;
    }

    .appt-cta-card p {
        font-size: 0.82rem;
    }

    /* Payment step form inputs */
    .booking-modal-content input,
    .booking-modal-content textarea,
    .booking-modal-content select {
        font-size: 16px;
        min-height: 46px;
        padding: 0.7rem 0.75rem;
    }

    /* Booking nav buttons */
    .booking-nav-btns .btn {
        min-height: 52px;
        font-size: 1rem;
    }

    /* Repeat order packages — 1 column at this size */
    #repeatPackagesList {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   @media (max-width: 375px) — iPhone SE, budget Androids
   ============================================================ */
@media (max-width: 375px) {
    .booking-modal-content {
        padding: 0.75rem 0.7rem 0 !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem) !important;
    }

    .booking-modal-content h2 {
        font-size: 1rem;
    }

    .booking-progress-step {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .booking-progress-line {
        width: 16px;
    }

    .package-card {
        padding: 0.75rem 0.6rem;
    }

    .price-main {
        font-size: 1.35rem;
    }

    .btn-razorpay,
    .btn-cashfree,
    .btn-payu {
        font-size: 0.95rem;
        min-height: 50px;
    }

    .booking-nav-btns .btn {
        font-size: 0.92rem;
        min-height: 50px;
    }

    /* Payment amount hero */
    .payment-amount-hero > strong {
        font-size: 1.45rem;
    }

    /* Repeat past orders */
    .repeat-past-orders-list {
        max-height: 32vh;
    }

    .repeat-past-order-title strong {
        font-size: 0.9rem;
    }

    .repeat-past-order-meta {
        font-size: 0.76rem;
        gap: 0.4rem 0.75rem;
    }
}


/* =========================================
   SHIPPING ADDRESS — BOOKING FORM (STEP 2)
   ========================================= */

.shipping-address-section {
    background: #f8fffe;
    border: 1.5px solid #b2dfdb;
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1rem;
    margin: 1.5rem 0 0.5rem;
}

.shipping-address-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.shipping-address-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.shipping-address-header strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.shipping-address-sub {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: auto;
}

/* =========================================
   SHIPPING ADDRESS — REPEAT ORDER VERIFY
   ========================================= */

/* Slightly different tint for the repeat/verify variant */
.shipping-address-verify {
    background: #f0f7ff;
    border-color: #90caf9;
    margin: 0 0 1.25rem;
}

/* Saved address display row */
.repeat-address-display {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.repeat-address-text {
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.5;
    flex: 1;
}

/* "Edit Address" link-style button */
.btn-edit-address {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
}

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

/* "No saved address" notice */
.repeat-address-empty {
    font-size: 0.85rem;
    color: #e65100;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    padding: 0.55rem 0.85rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

/* Small confirm / cancel buttons inside the edit form */
.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* =========================================
   SHIPPING ADDRESS — MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .shipping-address-section {
        padding: 1rem 0.9rem 0.85rem;
        margin: 1.1rem 0 0.4rem;
    }

    .shipping-address-sub {
        margin-left: 0;
        width: 100%;
    }

    .repeat-address-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-edit-address {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .shipping-address-section {
        padding: 0.85rem 0.75rem 0.75rem;
    }

    .shipping-address-header strong {
        font-size: 0.88rem;
    }

    .repeat-address-text {
        font-size: 0.85rem;
    }
}

/* ============================================================
   BOOKING STEP 2 — ACCORDION SECTIONS
   ============================================================ */

/* Intro note */
.step2-intro-note {
    font-size: 0.88rem;
    color: #555;
    margin: -0.25rem 0 1.25rem;
    background: #f0f7ff;
    border-left: 3px solid #2196f3;
    padding: 0.6rem 0.9rem;
    border-radius: 4px;
    line-height: 1.5;
}

/* Google sign-in block */
#bookingGoogleSignInBlock {
    margin-bottom: 1.25rem;
}

.google-or-divider {
    text-align: center;
    margin: 1rem 0 0.25rem;
    position: relative;
}
.google-or-divider span {
    background: #fff;
    padding: 0 1rem;
    color: #888;
    font-size: 0.88rem;
    position: relative;
    z-index: 1;
}
.google-or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

/* ── Accordion wrapper ─────────────────────────────────────── */
.bk-accordion {
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #fff;
}

.bk-accordion:focus-within {
    border-color: #4caf50;
}

/* ── Collapsed summary row ─────────────────────────────────── */
.bk-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    gap: 0.75rem;
    background: #f9f9f9;
    cursor: default;
}

.bk-accordion-summary-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.bk-accordion-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bk-accordion-summary-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.bk-accordion-summary-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-accordion-edit-btn {
    background: none;
    border: 1.5px solid #4caf50;
    color: #4caf50;
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.bk-accordion-edit-btn:hover {
    background: #4caf50;
    color: #fff;
}

/* ── Expanded body ─────────────────────────────────────────── */
.bk-accordion-body {
    padding: 1.25rem 1.25rem 0.75rem;
}

.bk-accordion-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.bk-accordion-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bk-accordion-title {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.bk-accordion-subtitle {
    font-size: 0.82rem;
    color: #888;
    margin-left: 0.25rem;
}

/* Save & Continue row inside accordion */
.bk-accordion-save-row {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.75rem;
}

.bk-accordion-save-row .btn {
    min-width: 160px;
}

/* ── Locked state (address locked until patient details saved) */
.bk-accordion-locked {
    opacity: 0.55;
    pointer-events: none;
}
.bk-accordion-locked.bk-accordion-unlocked {
    opacity: 1;
    pointer-events: auto;
}

.bk-accordion-locked-msg {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    color: #aaa;
    font-size: 0.9rem;
    cursor: default;
    user-select: none;
}

.bk-accordion-locked-hint {
    font-size: 0.78rem;
    color: #bbb;
    font-style: italic;
}

/* ── Bottom Continue button — disabled until both sections done */
#bkStep2Continue:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ============================================================
   PHONE INPUT WITH COUNTRY CODE SELECTOR
   ============================================================ */

.phone-input-row {
    display: flex;
    gap: 0;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-input-row:focus-within {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.phone-cc-wrap {
    position: relative;
    flex-shrink: 0;
    border-right: 1.5px solid #e0e0e0;
    background: #f8f8f8;
}

.phone-cc-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.65rem 1.8rem 0.65rem 0.65rem;
    font-size: 0.88rem;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    min-width: 90px;
    font-weight: 500;
}

.phone-cc-wrap::after {
    content: '▾';
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.7rem;
    color: #888;
}

.phone-number-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    min-width: 0;
}

/* Override any .admin-form input border that might bleed in */
.phone-input-row input.phone-number-input {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* ── Mobile adjustments ─────────────────────────────────────── */
@media (max-width: 600px) {
    .bk-accordion-body {
        padding: 1rem 1rem 0.5rem;
    }
    .bk-accordion-summary {
        padding: 0.8rem 1rem;
    }
    .bk-accordion-summary-text {
        font-size: 0.85rem;
    }
    .phone-cc-select {
        min-width: 80px;
        font-size: 0.82rem;
        padding: 0.6rem 1.6rem 0.6rem 0.55rem;
    }
    .bk-accordion-save-row .btn {
        width: 100%;
    }
}
