:root {
    --ms-navy:        #043259;
    --ms-blue-gray:   #4d6F8C;
    --ms-teal:        #60A699;
    --ms-teal-light:  #B0D9CD;
    --ms-teal-dark:   #036A6F;
    --ms-gray-blue:   #80A4AE;
    --ms-orange:      #F7911C;
    --ms-coral:       #E56163;
    --ms-teal-bg:     rgba(176, 217, 205, 0.35);
    --ms-orange-bg:   rgba(247, 145, 28, 0.14);
    --ms-white:       #ffffff;
    --ms-off-white:   #f8fafb;
    --ms-border:      #dde8ec;
}


#scheduling-section {
    margin-top: 32px;
    padding-top: 24px;
}

.scheduling-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ms-orange-bg);
    border: 1px solid var(--ms-orange);
    color: var(--ms-orange);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.scheduling-box {
    background: var(--ms-teal-bg);
    border: 1px solid var(--ms-teal);
    border-radius: 14px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 40px;
}

.scheduling-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ms-navy);
    text-align: center;
    margin: 0 0 4px;
}

.scheduling-subtitle {
    font-size: 14px;
    color: var(--ms-teal-dark);
    text-align: center;
    margin: 0 0 20px;
}


.scheduling-selectors {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .scheduling-selectors {
        grid-template-columns: 1fr;
    }
}

.sched-field label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-teal-dark);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px;
}

.sched-field select {
    width: 100%;
    padding: 9px 32px 9px 12px;
    border: 1px solid var(--ms-teal);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--ms-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23036A6F' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: var(--ms-navy);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 40px;
    transition: border-color .15s, box-shadow .15s;
}

.sched-field select:focus {
    outline: none;
    border-color: var(--ms-teal-dark);
    box-shadow: 0 0 0 3px rgba(96, 166, 153, 0.15);
}
.sched-field select:hover {
    border-color: var(--ms-teal-dark);
}

.sched-field select:disabled {
    background-color: var(--ms-off-white);
    color: var(--ms-gray-blue);
    cursor: not-allowed;
}

/* ── Next available strip ────────────────────────────────────── */
.next-available-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ms-white);
    border: 1px solid var(--ms-teal);
    border-radius: 9px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.next-available-strip .na-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-teal-dark);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.next-available-strip .na-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-navy);
    margin-top: 2px;
}

.na-loading {
    font-size: 12px;
    color: var(--ms-gray-blue);
    font-style: italic;
}

.waitlist-btn {
    background: none;
    border: 1px solid var(--ms-teal);
    border-radius: 5px;
    color: var(--ms-teal-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.waitlist-btn:hover {
    background: var(--ms-teal);
    color: var(--ms-white);
}

/* ── Waitlist inline panel ───────────────────────────────────── */
.waitlist-panel {
    background: var(--ms-white);
    border: 1px solid var(--ms-teal);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: none;
}

.waitlist-panel.show { display: block; }

.waitlist-panel h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-navy);
    margin: 0 0 4px;
}

.waitlist-panel p {
    font-size: 12px;
    color: var(--ms-blue-gray);
    margin: 0 0 10px;
    line-height: 1.5;
}

.waitlist-panel input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ms-teal);
    border-radius: 7px;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--ms-navy);
    background: var(--ms-white);
}

.waitlist-panel input:focus {
    outline: none;
    border-color: var(--ms-teal-dark);
}

.waitlist-submit-btn {
    width: 100%;
    padding: 9px;
    background: var(--ms-teal-dark);
    color: var(--ms-white);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.waitlist-submit-btn:hover { background: var(--ms-navy); }

/* ── Calendar ────────────────────────────────────────────────── */
.cal-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cal-month {
    font-size: 18px;
    font-weight: 600;
    color: var(--ms-navy);
}

.cal-arrow {
    background: var(--ms-white);
    border: 1px solid var(--ms-teal);
    border-radius: 7px;
    color: var(--ms-teal-dark);
    padding: 5px 11px;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}

.cal-arrow:hover {
    background: var(--ms-teal);
    color: var(--ms-white);
}

.cal-arrow:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* Days header */
.cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    text-align: center;
}

.cal-day-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-teal-dark);
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 4px 0;
}

.cal-day-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-navy);
    padding: 2px 0 8px;
    text-align: center;
}

/* Time groups */
.cal-time-group {
    margin-bottom: 10px;
}

.cal-time-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ms-navy);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    padding-left: 2px;
}

.cal-slots-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.slot-btn {
    padding: 8px 16px;
    border: 1px solid var(--ms-teal);
    border-radius: 5px;
    background: var(--ms-white);
    color: var(--ms-teal-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-btn:hover {
    background: var(--ms-teal);
    color: var(--ms-white);
    border-color: var(--ms-teal);
    transform: translateY(-1px);
}

.slot-btn.selected {
    background: var(--ms-teal-dark);
    color: var(--ms-white);
    border-color: var(--ms-teal-dark);
    font-weight: 700;
}

.slot-btn.empty {
    border-color: transparent;
    cursor: default;
    pointer-events: none;
    color: transparent;
}

/* Loading state */
.cal-loading {
    text-align: center;
    padding: 32px;
    color: var(--ms-gray-blue);
    font-size: 14px;
}

.cal-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--ms-teal-light);
    border-top-color: var(--ms-teal-dark);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 10px;
}

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

/* No slots state */
.cal-empty {
    text-align: center;
    padding: 24px;
    color: var(--ms-blue-gray);
    font-size: 14px;
    background: var(--ms-white);
    border-radius: 9px;
    border: 1px dashed var(--ms-teal);
}

/* ── Reserve button ──────────────────────────────────────────── */
.reserve-btn {
    width: 100%;
    padding: 14px;
    background: var(--ms-navy);
    color: var(--ms-white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    letter-spacing: .3px;
    transition: all .15s;
}

.reserve-btn:hover:not(:disabled) {
    background: var(--ms-teal-dark);
    transform: translateY(-1px);
}

.reserve-btn:disabled {
    background: var(--ms-gray-blue);
    cursor: not-allowed;
    opacity: .7;
}

.reserve-btn.slot-selected {
    background: var(--ms-teal-dark);
}

/* ── Modal overlay ───────────────────────────────────────────── */
.sched-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 50, 89, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sched-modal-overlay.show {
    display: flex;
}

.sched-modal {
    background: var(--ms-white);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(4, 50, 89, .2);
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-top-bar {
    height: 5px;
    background: var(--ms-teal-dark);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ms-navy);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--ms-gray-blue);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color .12s;
}

.modal-close:hover { color: var(--ms-coral); }

/* Step progress pills */
.modal-steps {
    display: flex;
    gap: 6px;
    padding: 12px 18px 0;
}

.step-pill {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: var(--ms-teal-light);
    transition: background .2s;
}

.step-pill.active { background: var(--ms-teal-dark); }

.modal-step-label {
    font-size: 14px;
    color: var(--ms-gray-blue);
    padding: 4px 18px 12px;
    border-bottom: 1px solid var(--ms-border);
}

.modal-body {
    padding: 16px 18px;
}

/* Form fields inside modal */
.modal-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 11px;
}

.modal-field-row.full {
    grid-template-columns: 1fr;
}

.modal-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-teal-dark);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}

.modal-field label .required {
    color: #E7964F;
    font-weight: bold;
}

.modal-field input,
.modal-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--ms-teal-light);
    border-radius: 6px;
    font-size: 14px;
    color: var(--ms-navy);
    background: var(--ms-white);
    transition: border-color .12s;
    box-sizing: border-box;
}

.modal-field input:focus,
.modal-field select:focus {
    outline: none;
    border-color: var(--ms-teal-dark);
    box-shadow: 0 0 0 3px rgba(96, 166, 153, .12);
}

.modal-field input.error {
    border-color: var(--ms-coral);
}

.field-error {
    font-size: 14px;
    color: var(--ms-coral);
    margin-top: 3px;
    display: none;
}

.field-error.show { display: block; }

/* Consent checkbox */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: var(--ms-teal-bg);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 12px 0;
}

.consent-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--ms-teal-dark);
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.consent-row label {
    font-size: 14px;
    color: var(--ms-blue-gray);
    line-height: 1.55;
    cursor: pointer;
}

.consent-row a {
    color: var(--ms-teal-dark);
    text-decoration: underline;
}

/* Modal action buttons */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 18px 18px;
}

.modal-btn-secondary {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--ms-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--ms-blue-gray);
    cursor: pointer;
    font-weight: 500;
    transition: all .12s;
}

.modal-btn-secondary:hover {
    background: var(--ms-off-white);
    border-color: var(--ms-gray-blue);
}

.modal-btn-primary {
    padding: 12px 24px;
    background: var(--ms-teal-dark);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ms-white);
    cursor: pointer;
    transition: background .12s;
}

.modal-btn-primary:hover { background: var(--ms-navy); }
.modal-btn-primary:disabled {
    background: var(--ms-gray-blue);
    cursor: not-allowed;
}

/* ── Resumen de cita card (step 2) ───────────────────────────── */
.appt-summary-card {
    background: var(--ms-teal-bg);
    border: 1px solid var(--ms-teal);
    border-radius: 11px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.appt-date-block {
    text-align: center;
    min-width: 48px;
}

.appt-day-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--ms-navy);
    line-height: 1;
}

.appt-month-str {
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-teal-dark);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.appt-summary-info .appt-provider {
    font-size: 14px;
    font-weight: 700;
    color: var(--ms-navy);
}

.appt-summary-info .appt-detail {
    font-size: 12px;
    color: var(--ms-blue-gray);
    margin-top: 2px;
}

.appt-summary-info .appt-time {
    font-size: 14px;
    font-weight: 700;
    color: var(--ms-teal-dark);
    margin-top: 5px;
}

.summary-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ms-gray-blue);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 12px 0 6px;
}

.summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--ms-border);
}

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

.summary-detail-row .sdk { color: var(--ms-blue-gray); }
.summary-detail-row .sdv {
    color: var(--ms-navy);
    font-weight: 600;
    text-align: right;
}

.summary-policy-note {
    font-size: 11px;
    color: var(--ms-gray-blue);
    line-height: 1.55;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--ms-border);
}

/* ── Success screen ──────────────────────────────────────────── */
.success-modal-body {
    padding: 28px 24px;
    text-align: center;
}

.success-icon-wrap {
    width: 56px;
    height: 56px;
    background: var(--ms-teal-bg);
    border: 2px solid var(--ms-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: popIn .3s ease;
}

@keyframes popIn {
    from { transform: scale(.7); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.success-icon-wrap svg {
    width: 26px;
    height: 26px;
    stroke: var(--ms-teal-dark);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.success-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ms-navy);
    margin: 0 0 6px;
}

.success-sub {
    font-size: 14px;
    color: var(--ms-blue-gray);
    line-height: 1.6;
    margin: 0 0 14px;
}

.success-ref {
    font-size: 12px;
    color: var(--ms-teal-dark);
    background: var(--ms-teal-bg);
    border: 1px solid var(--ms-teal);
    border-radius: 6px;
    padding: 5px 14px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 18px;
    font-family: monospace;
    letter-spacing: .5px;
}

.cal-add-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.cal-add-btn {
    padding: 9px;
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--ms-blue-gray);
    background: var(--ms-white);
    cursor: pointer;
    transition: all .12s;
    font-weight: 500;
}

.cal-add-btn:hover {
    border-color: var(--ms-teal);
    color: var(--ms-teal-dark);
    background: var(--ms-teal-bg);
}

.success-done-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--ms-navy);
    color: var(--ms-white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

.success-done-btn:hover { background: var(--ms-teal-dark); }

.slot-past {
    padding: 6px 2px;
    border: 1px dashed var(--ms-teal-light);
    border-radius: 7px;
    background: transparent;
    color: var(--ms-gray-blue);
    font-size: 11px;
    text-align: center;
    cursor: default;
    pointer-events: none; 
    user-select: none;
    opacity: 0.5;
}

.slot-dimmed {
    padding: 6px 2px;
    border: 1px dashed var(--ms-teal-light);
    border-radius: 7px;
    background: transparent;
    color: var(--ms-gray-blue);
    font-size: 11px;
    text-align: center;
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

.is-today-header {
    border-radius: 6px;
    padding: 4px 8px;
    background-color: #036A6F;
    
}

.is-today-header .cal-day-header {
    color: white;
    font-weight: 600;
}

.is-today-header .cal-day-date {
    color: white;
    font-weight: 600;
}


.cal-day-col-header {
    cursor: default;
    border-radius: 8px;
    padding: 4px 2px;
    transition: background .15s;
}

.sched-field select option {
    background-color: #ffffff;
    color: #043259;
    font-size: 13px;
}

.sched-field select:focus {
    outline: none;
    border-color: var(--ms-teal-dark);
    box-shadow: 0 0 0 3px rgba(96, 166, 153, 0.15);
    background-color: #ffffff;
}



/* ── Sticky booking bar ──────────────────────────────────────── */
.sched-sticky-bar {
    background: var(--ms-navy);
    border-bottom: 2px solid var(--ms-teal);
    padding: 10px 20px;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-left: 60px;
    margin-right: 60px;
    z-index: 100;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.sched-sticky-bar.show { display: flex; }

.sticky-provider-info .sticky-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.sticky-provider-info .sticky-next {
    font-size: 11px;
    color: var(--ms-teal-light);
    margin-top: 1px;
}

.sticky-reserve-btn {
    background: var(--ms-teal-dark);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.sticky-reserve-btn:hover { background: var(--ms-teal); }

/* ── Error state ─────────────────────────────────────────────── */
.sched-error {
    background: rgba(229, 97, 99, .08);
    border: 1px solid var(--ms-coral);
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--ms-coral);
    margin-bottom: 12px;
    display: none;
}

.sched-error.show { display: block; }

/* ── TABLET (≤ 768px) ─────────────────────────────────────── */
@media (max-width: 768px) {
 
    /* --- Section wrapper --- */
    #scheduling-section {
        margin-top: 20px;
        padding-top: 16px;
    }
 
    .scheduling-box {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 28px;
    }
 
    .scheduling-title {
        font-size: 17px;
    }
 
    .scheduling-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }
 
    /* --- Selectors: 2 cols on tablet --- */
    .scheduling-selectors {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
 
    /* Service selector spans full width */
    .scheduling-selectors .sched-field:first-child {
        grid-column: 1 / -1;
    }
 
    .sched-field label {
        font-size: 10px;
    }
 
    .sched-field select {
        font-size: 13px;
        height: 38px;
        padding: 8px 28px 8px 10px;
    }
 
    /* --- Next-available strip --- */
    .next-available-strip {
        padding: 8px 12px;
    }
 
    .next-available-strip .na-label {
        font-size: 12px;
    }
 
    .next-available-strip .na-date {
        font-size: 13px;
    }
 
    /* --- Calendar nav --- */
    .cal-nav-row {
        margin-bottom: 10px;
    }
 
    .cal-month {
        font-size: 16px;
    }
 
    .cal-arrow {
        padding: 5px 10px;
        font-size: 13px;
    }
 
    /* --- Day headers & date numbers --- */
    .cal-day-header {
        font-size: 11px;
        letter-spacing: 0;
    }
 
    .cal-day-date {
        font-size: 13px;
    }
 
    /* --- Time labels --- */
    .cal-time-label {
        font-size: 9px;
    }
 
    /* --- Slot buttons --- */
    .slot-btn {
        font-size: 11px;
        padding: 6px 4px;
    }
 
    /* --- Reserve button --- */
    .reserve-btn {
        font-size: 14px;
        padding: 12px;
    }
 
    /* --- Sticky bar --- */
    .sched-sticky-bar {
        margin-left: 20px;
        margin-right: 20px;
        padding: 8px 14px;
    }
 
    .sticky-provider-info .sticky-name {
        font-size: 12px;
    }
 
    .sticky-provider-info .sticky-next {
        font-size: 10px;
    }
 
    .sticky-reserve-btn {
        font-size: 12px;
        padding: 7px 14px;
    }
 
    /* --- Modal --- */
    .sched-modal {
        max-width: 95vw;
        border-radius: 12px;
    }
 
    .modal-field-row {
        gap: 8px;
        margin-bottom: 9px;
    }
 
    .modal-field label {
        font-size: 10px;
    }
 
    .modal-field input,
    .modal-field select {
        font-size: 13px;
        padding: 8px 10px;
    }
 
    /* --- Appointment summary card --- */
    .appt-summary-card {
        gap: 12px;
        padding: 12px;
    }
 
    .appt-day-num {
        font-size: 22px;
    }
 
    .appt-month-str {
        font-size: 11px;
    }
 
    .appt-summary-info .appt-provider {
        font-size: 13px;
    }
 
    .appt-summary-info .appt-detail {
        font-size: 11px;
    }
 
    .appt-summary-info .appt-time {
        font-size: 13px;
    }
 
    /* --- Success screen --- */
    .success-modal-body {
        padding: 20px 16px;
    }
 
    .success-title {
        font-size: 16px;
    }
 
    .success-sub {
        font-size: 13px;
    }
 
    .cal-add-row {
        gap: 6px;
    }
 
    .cal-add-btn {
        font-size: 11px;
        padding: 8px;
    }
}
 
 
/* ── MOBILE (≤ 480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
 
    /* --- Section wrapper --- */
    #scheduling-section {
        margin-top: 12px;
        padding-top: 12px;
    }
 
    .scheduling-box {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 20px;
        width: 80%;
    }
 
    .scheduling-title {
        font-size: 15px;
    }
 
    .scheduling-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
    }
 
    /* --- Selectors: stack single column on mobile --- */
    .scheduling-selectors {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }
 
    /* Reset span override from tablet */
    .scheduling-selectors .sched-field:first-child {
        grid-column: auto;
    }
 
    .sched-field label {
        font-size: 10px;
    }
 
    .sched-field select {
        font-size: 13px;
        height: 40px;
    }
 
    /* --- Premium badge --- */
    .scheduling-premium-badge {
        font-size: 10px;
        padding: 3px 10px;
        margin-bottom: 12px;
    }
 
    /* --- Next available strip --- */
    .next-available-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }
 
    .waitlist-btn {
        width: 100%;
        text-align: center;
    }
 
    /* --- Waitlist panel --- */
    .waitlist-panel {
        padding: 12px;
    }

    .waitlist-panel input {
        box-sizing: border-box;
        margin-bottom: 6px;
    }
 
    /* ============================================================
       3-DAY CALENDAR VIEW — MOBILE
       Replaces the 7-column grid with a 3-column layout.
       JS must expose a `data-mobile-days` attribute on the
       .cal-days-header and .cal-slots-grid elements so only
       3 visible columns are rendered.  Add helper class
       .cal-3day to the calendar wrapper via JS on mobile.
       ============================================================ */
 
    /* 3-column grid for day headers */
    .cal-3day .cal-days-header {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
 
    /* 3-column grid for each time slot row */
    .cal-3day .cal-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
 
 
    /* Bigger, easier-to-tap slots on touch screens */
    .cal-3day .slot-btn {
        white-space: normal;      
        overflow: visible;
        text-overflow: unset;
        font-size: 12px;
        padding: 8px 2px;
        min-height: 38px;
        line-height: 1.2;
    }

    .cal-3day .slot-dimmed {
        font-size: 11px;
        padding: 8px 2px;
        line-height: 1.2;
    }
 
    /* Day header text a bit bigger in 3-day view */
    .cal-3day .cal-day-header {
        font-size: 13px;
    }
 
    .cal-3day .cal-day-date {
        font-size: 14px;
    }
 
    /* --- Calendar nav arrows — wider tap target --- */
    .cal-arrow {
        padding: 7px 14px;
        font-size: 16px;
    }
 
    .cal-month {
        font-size: 14px;
    }
 
    /* --- Reserve button — full width, easy tap --- */
    .reserve-btn {
        font-size: 14px;
        padding: 8px 16px;
        border-radius: 8px;
        margin-top: 12px;
    }
 
    /* --- Sticky bar — flush to edges on mobile --- */
    .sched-sticky-bar {
        margin-left: 8px;
        margin-right: 8px;
        padding: 8px 12px;
        border-radius: 8px;
        flex-wrap: wrap;
        gap: 6px;
    }
 
    .sticky-provider-info {
        flex: 1;
    }
 
    .sticky-provider-info .sticky-name {
        font-size: 12px;
    }
 
    .sticky-provider-info .sticky-next {
        font-size: 10px;
    }
 
    .sticky-reserve-btn {
        font-size: 12px;
        padding: 8px 16px;
        width: 100%;
        text-align: center;
    }
 
    /* --- Modal — nearly full screen on mobile --- */
    .sched-modal-overlay {
        padding: 8px;
        align-items: flex-end; /* slides up from bottom */
    }
 
    .sched-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;  /* bottom-sheet feel */
        max-height: 92vh;
        overflow-y: auto;
    }
 
    .modal-header {
        padding: 14px 16px 0;
    }
 
    .modal-header h3 {
        font-size: 14px;
    }
 
    .modal-steps {
        padding: 10px 16px 0;
    }
 
    .modal-step-label {
        font-size: 12px;
        padding: 4px 16px 10px;
    }
 
    .modal-body {
        padding: 14px 16px;
    }
 
    /* Stack modal form to single column */
    .modal-field-row {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }
 
    .modal-field label {
        font-size: 10px;
    }
 
    .modal-field input,
    .modal-field select {
        font-size: 14px;
        padding: 8px 16px;
    }
 
    /* --- Consent row --- */
    .consent-row {
        padding: 8px 10px;
    }
 
    .consent-row label {
        font-size: 13px;
    }
 
    /* --- Modal action buttons — stack full width --- */
    .modal-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 16px 16px;
    }
 
    .modal-btn-secondary,
    .modal-btn-primary {
        padding: 8px 16px;
        font-size: 13px;
    }
 
    /* --- Appointment summary card — stack vertically --- */
    .appt-summary-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
 
    .appt-date-block {
        display: flex;
        align-items: baseline;
        gap: 6px;
        text-align: left;
    }
 
    .appt-day-num {
        font-size: 28px;
    }
 
    .appt-month-str {
        font-size: 13px;
    }
 
    .summary-detail-row {
        font-size: 13px;
    }
 
    .summary-policy-note {
        font-size: 10px;
    }
 
    /* --- Success screen --- */
    .success-modal-body {
        padding: 24px 16px;
    }
 
    .success-icon-wrap {
        width: 48px;
        height: 48px;
    }
 
    .success-title {
        font-size: 16px;
    }
 
    .success-sub {
        font-size: 13px;
    }
 
    .success-ref {
        font-size: 11px;
    }
 
    .cal-add-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
 
    .cal-add-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
 
    .success-done-btn {
        font-size: 13px;
    }
 
    /* --- Error banner --- */
    .sched-error {
        font-size: 12px;
        padding: 10px 12px;
    }

    .waitlist-submit-btn {
        margin-top: 6px;
    }
}