/* ============================================
   Doctor booking modal — theme-aware styles
   ============================================ */

.bm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 90;
}

#bookingModal.open .bm-overlay {
    opacity: 1;
    pointer-events: auto;
}

.bm-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(.96);
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(2, 20, 10, .35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 100;
}

#bookingModal.open .bm-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.bm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--bm-pri, #0d6e3a), var(--bm-pri-dark, #08502a));
    border-radius: 20px 20px 0 0;
    color: #fff;
}

.bm-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bm-head h3 i { color: var(--bm-accent, #f59e0b); }

.bm-close {
    background: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.bm-close:hover { background: rgba(255, 255, 255, .3); }

.bm-doctor {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bm-pri-bg, #ecfdf5);
    border-bottom: 1px solid rgba(13, 110, 58, .12);
}

.bm-doctor i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bm-pri, #0d6e3a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bm-doctor strong { display: block; font-size: 15px; color: #0f172a; }
.bm-doctor small { color: #64748b; font-size: 12.5px; }

.bm-body { padding: 20px 24px 24px; }

.bm-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 14px;
}

.bm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bm-field { display: flex; flex-direction: column; gap: 5px; }
.bm-field.bm-full { grid-column: 1 / -1; }

.bm-field > span {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.bm-field em { color: #dc2626; font-style: normal; }

.bm-field input,
.bm-field select,
.bm-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d7dee8;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.bm-field input:focus,
.bm-field select:focus,
.bm-field textarea:focus {
    outline: none;
    border-color: var(--bm-pri, #0d6e3a);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-pri, #0d6e3a) 18%, transparent);
}

.bm-field .bm-error {
    border-color: #dc2626 !important;
    background: #fff8f8;
}

.bm-note { color: #64748b; font-size: 11.5px; margin-top: 2px; }

.bm-captcha-row { display: flex; align-items: center; gap: 10px; }

.bm-captcha-q {
    background: var(--bm-pri-bg, #ecfdf5);
    color: var(--bm-pri, #0d6e3a);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 16px;
    white-space: nowrap;
    user-select: none;
}

.bm-captcha-row input { width: 110px; text-align: center; }

.bm-submit {
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bm-pri, #0d6e3a), var(--bm-pri-light, #16a34a));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s, opacity .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bm-submit:hover { box-shadow: 0 10px 24px rgba(13, 110, 58, .35); transform: translateY(-1px); }
.bm-submit:disabled { opacity: .7; cursor: wait; transform: none; }

.bm-success { text-align: center; padding: 18px 6px 6px; }
.bm-success i { font-size: 52px; color: #16a34a; }
.bm-success h4 { margin: 12px 0 6px; font-size: 19px; color: #0f172a; }
.bm-success p { color: #475569; font-size: 14px; margin-bottom: 18px; }

.bm-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Doctor card trigger button */
.btn-book-doctor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 12px;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bm-pri, #0d6e3a), var(--bm-pri-light, #16a34a));
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}

.btn-book-doctor:hover {
    box-shadow: 0 10px 22px rgba(13, 110, 58, .3);
    transform: translateY(-1px);
    color: #fff;
}

@media (max-width: 520px) {
    .bm-grid { grid-template-columns: 1fr; }
}

/* --- Success: serial number + slip download --- */
.bm-serial-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 2px dashed var(--bm-pri, #0d6e3a);
    border-radius: 12px;
    padding: 10px 30px;
    margin: 6px 0 12px;
    background: #fff;
}
.bm-serial-box .bm-serial-lbl {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: .5px;
}
.bm-serial-box #bmSerialNum {
    font-size: 34px;
    font-weight: 800;
    color: var(--bm-pri-dark, #08502a);
    line-height: 1.15;
}
.bm-success .bm-submit.bm-btn-plain {
    background: #6b7280;
    margin-top: 8px;
}
.bm-success a.bm-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
