/* ============================================================
   Door2Door Laundry — css/booking-modal.css
   SHARED styles for the booking modal (js/booking-modal.js).
   Used by BOTH home.html and services.html.

   Uses its own --bm-* variables (not --teal/--brand etc.) so
   it never collides with home.css or services.css :root vars.
   ============================================================ */

:root {
    --bm-teal: #42BABC;
    --bm-teal-dark: #2e9ea0;
    --bm-teal-light: #e8f9f9;
    --bm-teal-mid: #c8eeee;
    --bm-text-dark: #1a2530;
    --bm-text-body: #4a5568;
    --bm-text-light: #8898aa;
    --bm-bg-page: #f7fbfb;
    --bm-bg-white: #ffffff;
    --bm-border: #e2eef0;
    --bm-shadow-sm: 0 2px 8px rgba(66, 186, 188, .10);
    --bm-radius: 16px;
    --bm-radius-sm: 10px;
    --bm-transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

/* No body scroll when modal open */
body.bm-no-scroll {
    overflow: hidden;
}

/* Overlay with backdrop blur */
.bm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 25, 35, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.bm-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.bm-overlay.open .bm-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Modal box */
.bm-box {
    background: var(--bm-bg-white);
    border-radius: 22px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 28px 24px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22), 0 4px 16px rgba(66, 186, 188, .12);
    transform: translateY(24px) scale(.97);
    opacity: 0;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--bm-teal-mid) transparent;
    font-family: 'DM Sans', sans-serif;
}

.bm-box::-webkit-scrollbar {
    width: 4px;
}

.bm-box::-webkit-scrollbar-thumb {
    background: var(--bm-teal-mid);
    border-radius: 99px;
}

/* Shake animation for COD error */
@keyframes bmShake {

    0%,
    100% {
        transform: translateX(0) scale(1);
    }

    20% {
        transform: translateX(-6px) scale(1);
    }

    40% {
        transform: translateX(6px) scale(1);
    }

    60% {
        transform: translateX(-4px) scale(1);
    }

    80% {
        transform: translateX(4px) scale(1);
    }
}

.bm-shake {
    animation: bmShake .45s ease;
}

/* Close button */
.bm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--bm-border);
    background: var(--bm-bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-text-light);
    transition: var(--bm-transition);
}

.bm-close:hover {
    background: var(--bm-teal-light);
    border-color: var(--bm-teal);
    color: var(--bm-teal-dark);
    transform: rotate(90deg);
}

/* Step indicator */
.bm-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    justify-content: center;
}

.bm-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: .38;
    transition: opacity .25s;
}

.bm-step.active {
    opacity: 1;
}

.bm-step__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bm-teal-mid);
    color: var(--bm-teal-dark);
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bm-transition);
}

.bm-step.active .bm-step__num {
    background: var(--bm-teal);
    color: #fff;
    box-shadow: 0 3px 10px rgba(66, 186, 188, .4);
}

.bm-step__label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--bm-text-body);
}

.bm-step-line {
    flex: 1;
    height: 2px;
    background: var(--bm-border);
    margin: 0 12px;
    min-width: 40px;
}

/* Modal header */
.bm-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1.5px solid var(--bm-border);
}

.bm-header__emoji {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bm-teal-light), var(--bm-teal-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.bm-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bm-text-dark);
}

.bm-subtitle {
    font-size: .85rem;
    color: var(--bm-text-light);
    margin-top: 2px;
}

/* Form fields */
.bm-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bm-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bm-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--bm-text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bm-unit-hint {
    font-size: .75rem;
    color: var(--bm-text-light);
    font-weight: 400;
}

.bm-optional {
    font-size: .75rem;
    color: var(--bm-text-light);
    font-weight: 400;
}

/* Quantity row */
.bm-qty-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    overflow: hidden;
    width: fit-content;
}

.bm-qty-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--bm-teal-light);
    color: var(--bm-teal-dark);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--bm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-qty-btn:hover {
    background: var(--bm-teal);
    color: #fff;
}

.bm-qty-input {
    width: 64px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--bm-border);
    border-right: 1.5px solid var(--bm-border);
    padding: 10px 6px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bm-text-dark);
    background: var(--bm-bg-white);
    outline: none;
}

.bm-qty-input::-webkit-inner-spin-button,
.bm-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Textarea */
.bm-textarea {
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: .88rem;
    color: var(--bm-text-body);
    resize: vertical;
    outline: none;
    transition: border-color .2s;
    background: var(--bm-bg-white);
}

.bm-textarea:focus {
    border-color: var(--bm-teal);
    box-shadow: 0 0 0 3px rgba(66, 186, 188, .12);
}

/* Live total bar */
.bm-live-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bm-teal-light);
    border: 1.5px solid var(--bm-teal-mid);
    border-radius: var(--bm-radius-sm);
    padding: 12px 16px;
    font-size: .88rem;
    color: var(--bm-text-body);
}

.bm-live-total strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--bm-teal-dark);
}

/* Payment options */
.bm-payment-opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bm-pay-opt {
    cursor: pointer;
}

.bm-pay-opt input[type="radio"] {
    display: none;
}

.bm-pay-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    background: var(--bm-bg-white);
    transition: var(--bm-transition);
    font-size: .88rem;
    font-weight: 500;
    color: var(--bm-text-body);
}

.bm-pay-card svg {
    flex-shrink: 0;
    color: var(--bm-text-light);
    transition: color .2s;
}

.bm-pay-opt input:checked+.bm-pay-card {
    border-color: var(--bm-teal);
    background: var(--bm-teal-light);
    color: var(--bm-teal-dark);
    box-shadow: 0 0 0 2px rgba(66, 186, 188, .15);
}

.bm-pay-opt input:checked+.bm-pay-card svg {
    color: var(--bm-teal);
}

.bm-pay-opt:hover .bm-pay-card {
    border-color: var(--bm-teal-mid);
}

.bm-pay-badge {
    margin-left: auto;
    font-style: normal;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.bm-pay-badge--online {
    background: #e8f8f0;
    color: #1a8a50;
}

.bm-pay-badge--cod {
    background: #fff3e0;
    color: #d06000;
}

/* COD warning */
.bm-cod-warn {
    background: #fff8e1;
    border: 1.5px solid #ffd54f;
    border-radius: var(--bm-radius-sm);
    padding: 10px 14px;
    font-size: .83rem;
    color: #7a5000;
    line-height: 1.5;
}

/* Buttons */
.bm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--bm-teal), var(--bm-teal-dark));
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--bm-transition);
    box-shadow: 0 4px 14px rgba(66, 186, 188, .35);
    width: 100%;
}

.bm-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(66, 186, 188, .45);
}

.bm-btn-primary:disabled {
    opacity: .7;
    cursor: default;
    transform: none;
}

.bm-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    background: var(--bm-bg-white);
    color: var(--bm-text-body);
    border: 1.5px solid var(--bm-border);
    border-radius: 999px;
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--bm-transition);
    flex-shrink: 0;
}

.bm-btn-secondary:hover {
    border-color: var(--bm-teal);
    color: var(--bm-teal-dark);
}

/* Spinner */
.bm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bmSpin .7s linear infinite;
    flex-shrink: 0;
}

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

/* ── STEP 2: Summary ──────────────────────────────────────── */
.bm-summary-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bm-text-dark);
    margin-bottom: 18px;
}

.bm-summary-card {
    background: var(--bm-bg-page);
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.bm-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--bm-border);
}

.bm-summary-row:last-of-type {
    border-bottom: none;
}

.bm-sr-label {
    font-size: .8rem;
    color: var(--bm-text-light);
    font-weight: 500;
    flex-shrink: 0;
}

.bm-sr-val {
    font-size: .88rem;
    color: var(--bm-text-dark);
    font-weight: 600;
    text-align: right;
}

.bm-sr-val em {
    font-style: normal;
    font-weight: 400;
    color: var(--bm-text-light);
    font-size: .75rem;
}

.bm-sr-note {
    font-weight: 400;
    color: var(--bm-text-body);
    font-style: italic;
}

.bm-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(90deg, #1a3a4a, #1e5c5e);
    color: rgba(255, 255, 255, .75);
    font-size: .85rem;
    font-weight: 600;
    border-radius: 0 0 calc(var(--bm-radius) - 2px) calc(var(--bm-radius) - 2px);
}

.bm-summary-total strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
}

.bm-summary-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ── Success state ──────────────────────────────────────────── */
.bm-success {
    text-align: center;
    padding: 32px 20px;
}

.bm-success__icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.bm-success h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--bm-text-dark);
    margin-bottom: 10px;
}

.bm-success p {
    font-size: .9rem;
    color: var(--bm-text-body);
    margin-bottom: 6px;
}

.bm-success__total {
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--bm-teal-dark) !important;
}

.bm-success__note {
    color: var(--bm-text-light) !important;
    font-size: .85rem !important;
}

/* ── User auto-fill banner ────────────────────────────────── */
.bm-user-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f9f9;
    border: 1.5px solid var(--bm-teal-mid);
    border-radius: var(--bm-radius-sm);
    padding: 10px 14px;
    font-size: .85rem;
    color: var(--bm-teal-dark);
    font-weight: 500;
    line-height: 1.5;
}

/* ── Generic text input (date, pin code) ─────────────────── */
.bm-input {
    width: 100%;
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: var(--bm-text-dark);
    background: var(--bm-bg-white);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.bm-input:focus {
    border-color: var(--bm-teal);
    box-shadow: 0 0 0 3px rgba(66, 186, 188, .12);
}

.bm-input[type="date"] {
    cursor: pointer;
}

/* ── Time slot button grid ───────────────────────────────── */
.bm-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bm-time-btn {
    padding: 8px 14px;
    border: 1.5px solid var(--bm-border);
    border-radius: 999px;
    background: var(--bm-bg-white);
    color: var(--bm-text-body);
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--bm-transition);
    white-space: nowrap;
}

.bm-time-btn:hover {
    border-color: var(--bm-teal);
    color: var(--bm-teal-dark);
    background: var(--bm-teal-light);
    transform: translateY(-1px);
}

.bm-time-btn.active {
    background: var(--bm-teal);
    border-color: var(--bm-teal);
    color: #fff;
    box-shadow: 0 3px 10px rgba(66, 186, 188, .35);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════
     DELIVERY SPEED SELECTOR
  ══════════════════════════════════════════════════════════════ */
.bm-delivery-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bm-delivery-opt {
    cursor: pointer;
}

.bm-delivery-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bm-delivery-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius-sm);
    background: var(--bm-bg-white);
    transition: var(--bm-transition);
    cursor: pointer;
}

.bm-delivery-opt input:checked+.bm-delivery-card {
    border-color: var(--bm-teal);
    background: var(--bm-teal-light);
    box-shadow: 0 0 0 3px rgba(66, 186, 188, .12);
}

.bm-delivery-card:hover {
    border-color: var(--bm-teal-mid);
}

.bm-delivery-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.bm-delivery-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bm-delivery-info strong {
    font-size: .9rem;
    font-weight: 600;
    color: var(--bm-text-dark);
}

.bm-delivery-info em {
    font-size: .78rem;
    font-style: normal;
    color: var(--bm-text-light);
}

.bm-delivery-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bm-delivery-badge--express {
    background: #fff3cd;
    color: #92600a;
}

.bm-delivery-badge--standard {
    background: #d1fae5;
    color: #065f46;
}

.bm-delivery-badge--norush {
    background: #e0f2fe;
    color: #075985;
}

.bm-delivery-note {
    margin-top: 6px;
    font-size: .78rem;
    color: var(--bm-text-light);
    background: var(--bm-teal-light);
    border: 1px solid var(--bm-teal-mid);
    border-radius: 6px;
    padding: 7px 10px;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bm-box {
        padding: 22px 18px 20px;
        border-radius: 18px;
    }

    .bm-summary-actions {
        flex-direction: column-reverse;
    }

    .bm-btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bm-time-slots {
        gap: 6px;
    }

    .bm-time-btn {
        font-size: .78rem;
        padding: 7px 11px;
    }
}