/* =================================================================
   Booking Modal — Figma Design (Easy Medicals UK)
   Theme: #1f9f9a
   ================================================================= */

:root {
    --bm-primary:        #1f9f9a;
    --bm-primary-dark:   #178880;
    --bm-primary-light:  #e8f8f6;
    --bm-text:           #1b3255;
    --bm-text-light:     #6b7280;
    --bm-border:         #e5e7eb;
    --bm-bg:             #f9fafb;
    --bm-shadow:         0 6px 24px rgba(0,0,0,.08);
}

/* === Modal wrapper === */
.bm-modal-wrapper .modal-dialog { max-width: 1100px; margin: 30px auto; }
.bm-modal-wrapper .modal-content { border: none; border-radius: 14px; overflow: hidden; }
.bm-modal { background: #fff; box-shadow: var(--bm-shadow); }

/* === Top bar === */
.bm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    border-bottom: 1px solid var(--bm-border);
}
.bm-topbar-logo {
    font-weight: 700;
    color: var(--bm-text);
    font-size: 18px;
    display: flex;
    align-items: center;
}
.bm-topbar-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}
.bm-topbar-logo i { color: var(--bm-primary); margin-right: 6px; }
.bm-topbar-back {
    color: var(--bm-text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.bm-topbar-back:hover { color: var(--bm-primary); text-decoration: none; }

/* === Stepper === */
.bm-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 32px 16px;
    background: #fff;
    gap: 0;
}
.bm-step {
    flex: 0 0 auto;
    text-align: center;
    position: relative;
    padding: 0 12px;
}
.bm-step-status {
    font-size: 11px;
    color: var(--bm-text-light);
    margin-bottom: 6px;
    font-weight: 500;
}
.bm-step.active .bm-step-status { color: var(--bm-primary); }
.bm-step.complete .bm-step-status { color: var(--bm-primary); }

.bm-step-circle {
    width: 28px; height: 28px;
    margin: 0 auto;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--bm-border);
    color: var(--bm-text-light);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.bm-step-circle i { display: none; font-size: 12px; color: #fff; }
.bm-step-circle span { display: inline; }

.bm-step.active .bm-step-circle {
    border-color: var(--bm-primary);
    color: var(--bm-primary);
    background: #fff;
}
.bm-step.complete .bm-step-circle {
    background: var(--bm-primary);
    border-color: var(--bm-primary);
}
.bm-step.complete .bm-step-circle i { display: block; }
.bm-step.complete .bm-step-circle span { display: none; }

.bm-step-label {
    font-size: 13px;
    color: var(--bm-text);
    margin-top: 8px;
    font-weight: 500;
    white-space: nowrap;
}
.bm-step-line {
    flex: 1;
    height: 2px;
    background: var(--bm-border);
    margin-top: 32px;
    min-width: 30px;
    max-width: 120px;
}
.bm-step-line.complete { background: var(--bm-primary); }

/* === Body === */
.bm-body {
    padding: 24px 32px 32px;
    background: #fff;
}
.bm-section-title { text-align: center; margin-bottom: 24px; }
.bm-section-title small {
    color: var(--bm-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.bm-section-title h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--bm-text);
    margin: 6px 0 0;
}

/* === Alert === */
.bm-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.bm-alert.success { background: #d1fae5; color: #065f46; }
.bm-alert.error   { background: #fee2e2; color: #991b1b; }
.bm-alert.warning { background: #fef3c7; color: #92400e; }

/* === Step content === */
.bm-step-content { display: none; }
.bm-step-content.active { display: block; }

/* === Grids === */
.bm-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: stretch;
}
.bm-grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.bm-form-col, .bm-cal-col, .bm-hero-col { min-width: 0; }

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

/* === Form fields === */
.bm-field { margin-bottom: 16px; }
.bm-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bm-text);
    margin-bottom: 6px;
}
.bm-input-wrap { position: relative; }
.bm-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bm-text-light);
    font-size: 14px;
    pointer-events: none;
}
.bm-field input,
.bm-field select,
.bm-field textarea {
    width: 100%;
    height: 46px;
    border: 1px solid var(--bm-border);
    border-radius: 8px;
    padding: 8px 14px 8px 40px;
    font-size: 14px;
    color: var(--bm-text);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.bm-field textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
}
.bm-field input:focus,
.bm-field select:focus,
.bm-field textarea:focus {
    border-color: var(--bm-primary);
    box-shadow: 0 0 0 3px rgba(31,159,154,.12);
}

/* === Buttons === */
.bm-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 22px;
}
.bm-actions-split {
    justify-content: space-between;
    gap: 12px;
}
.bm-btn {
    border: none;
    border-radius: 8px;
    padding: 12px 36px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .15s;
    text-transform: uppercase;
}
.bm-btn-primary {
    background: var(--bm-primary);
    color: #fff;
}
.bm-btn-primary:hover { background: var(--bm-primary-dark); color: #fff; }
.bm-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.bm-btn-outline {
    background: #fff;
    border: 1px solid var(--bm-border);
    color: var(--bm-text);
}
.bm-btn-outline:hover { border-color: var(--bm-primary); color: var(--bm-primary); }

.bm-link-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bm-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
}
.bm-link-back:hover { color: var(--bm-primary); text-decoration: none; }

/* === Hero column (Step 1 right side) === */
.bm-hero-col {
    position: relative;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.bm-hero-circle {
    flex: 1;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    background:
        radial-gradient(circle, var(--bm-primary-light) 30%, transparent 60%),
        repeating-radial-gradient(circle, transparent 0 18px, rgba(31,159,154,.18) 18px 19px);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bm-hero-circle img {
    max-width: 80%;
    max-height: 90%;
    z-index: 2;
    position: relative;
}
.bm-hero-circle.no-image::after {
    content: "👨‍⚕️";
    font-size: 120px;
    z-index: 2;
}
.bm-hero-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bm-primary);
    position: absolute;
    z-index: 1;
    opacity: .9;
}
.bm-hero-dot-1 { top: 20%;  left: 10%;  background: #fff; border: 2px solid var(--bm-primary); }
.bm-hero-dot-2 { top: 30%;  right: 12%; }
.bm-hero-dot-3 { bottom: 25%; left: 5%; }
.bm-hero-dot-4 { bottom: 18%; right: 8%; background: #fff; border: 2px solid var(--bm-primary); }

.bm-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: -32px;                 /* INCREASED from previous - more space from doctor */
    background: #1b3255;              /* CHANGED: was green/teal — now dark navy */
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(27, 50, 85, 0.15);
}
.bm-stat {
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.bm-stat:last-child { border-right: none; }
.bm-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.bm-stat span {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.3px;
}

/* === Calendar === */
.bm-calendar-card {
    border: 1px solid var(--bm-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.bm-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.bm-cal-header strong {
    flex: 1;
    text-align: center;
    color: var(--bm-text);
    font-size: 15px;
}
.bm-cal-year {
    border: 1px solid var(--bm-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}
.bm-cal-nav {
    background: transparent;
    border: 1px solid var(--bm-border);
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--bm-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bm-cal-nav:hover { background: var(--bm-primary-light); color: var(--bm-primary); border-color: var(--bm-primary); }

.bm-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: var(--bm-text-light);
    margin-bottom: 6px;
    font-weight: 600;
}
.bm-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.bm-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;             /* CHANGED: 13 → 12 */
    cursor: pointer;
    color: var(--bm-text);
    user-select: none;
    transition: all .12s;
    max-width: 42px;             /* NEW: cap cell size on desktop */
    margin: 0 auto;              /* NEW: center capped cell */
}
.bm-cal-day.muted    { color: #d1d5db; cursor: default; }
.bm-cal-day.disabled { color: #d1d5db; cursor: not-allowed; text-decoration: line-through; }
.bm-cal-day:not(.muted):not(.disabled):hover { background: var(--bm-primary-light); color: var(--bm-primary); }
.bm-cal-day.selected {
    background: var(--bm-primary);
    color: #fff;
    font-weight: 700;
}
.bm-cal-day.today { font-weight: 700; }

.bm-cal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bm-border);
    font-size: 13px;
}
.bm-cal-selected-label { color: var(--bm-text-light); }
.bm-cal-selected-value { font-weight: 600; color: var(--bm-primary); }

/* === Time card === */
.bm-time-card {
    border: 1px solid var(--bm-border);
    border-radius: 12px;
    padding: 16px;
}
.bm-time-card > strong {
    display: block;
    margin-bottom: 12px;
    color: var(--bm-text);
}
.bm-time-shifts {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.bm-shift-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--bm-border);
    border-radius: 8px;
    background: #fff;
    color: var(--bm-text-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
}
.bm-shift-btn:hover { border-color: var(--bm-primary); color: var(--bm-primary); }
.bm-shift-btn.active {
    background: var(--bm-primary);
    color: #fff;
    border-color: var(--bm-primary);
}
.bm-time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.bm-slot-btn {
    padding: 10px;
    border: 1px solid var(--bm-border);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: var(--bm-text);
    cursor: pointer;
    transition: all .12s;
    text-align: center;
}
.bm-slot-btn:hover:not(:disabled) { border-color: var(--bm-primary); color: #fff; }
.bm-slot-btn.selected {
    background: var(--bm-primary);
    color: #fff;
    border-color: var(--bm-primary);
}
.bm-slot-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: line-through;
}
.bm-helper-text {
    grid-column: 1 / -1;
    color: var(--bm-text-light);
    font-size: 13px;
    text-align: center;
    margin: 0;
    padding: 20px 0;
}
.bm-datetime-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}
.bm-datetime-wrapper .bm-cal-area {
    width: 100%;
    max-width: 380px;          /* CHANGED: 460 → 380 — smaller default calendar */
    transition: max-width .25s;
}
.bm-datetime-wrapper.has-date {
    display: grid;
    grid-template-columns: 1fr 1fr;     /* exactly 50/50 */
    gap: 20px;
    align-items: start;
}
.bm-datetime-wrapper.has-date .bm-cal-area { max-width: none; }
.bm-datetime-wrapper.has-date .bm-slots-area { width: 100%; }
/* === Step 3: Summary (full-width centered, no payment) === */
.bm-summary-wrapper {
    display: flex;
    justify-content: center;
}
.bm-summary-card {
    border: 1px solid var(--bm-border);
    border-radius: 12px;
    padding: 24px;
    background: #fafbfc;
    width: 100%;
}
.bm-summary-card-wide { max-width: 560px; }
.bm-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.bm-summary-head h5 { margin: 0; font-size: 16px; color: var(--bm-text); font-weight: 700; }
.bm-summary-edit {
    color: var(--bm-primary);
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}
.bm-summary-edit:hover { color: var(--bm-primary-dark); }
.bm-summary-list { list-style: none; padding: 0; margin: 0; }
.bm-summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bm-border);
    font-size: 14px;
    gap: 12px;
}
.bm-summary-list li span { color: var(--bm-text-light); flex: 0 0 auto; }
.bm-summary-list li strong { color: var(--bm-text); font-weight: 600; text-align: right; word-break: break-word; }
.bm-sum-total {
    border-top: 2px solid var(--bm-text) !important;
    margin-top: 6px;
    padding-top: 14px !important;
    border-bottom: none !important;
}
.bm-sum-total span, .bm-sum-total strong { font-size: 16px; font-weight: 700 !important; }
.bm-sum-total strong { color: var(--bm-primary) !important; }

.bm-summary-note {
    margin: 16px 0 0;
    padding: 12px;
    background: var(--bm-primary-light);
    color: var(--bm-primary-dark);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.bm-summary-note i { margin-right: 6px; }

.bm-actions-final { margin-top: 28px; }

/* =================================================================
   TOP STATS STRIP — sits above main header
   ================================================================= */
.top-stats-strip {
    background: #f7f9fc;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 0;
    font-size: 14px;
    color: #1b3255;
}
.top-stats-strip .tss-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    text-align: center;
}
.top-stats-strip .tss-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.top-stats-strip .tss-highlight {
    color: #ff5722;
    font-weight: 800;
    font-size: 15px;
}
.top-stats-strip .tss-stars {
    display: inline-flex;
    gap: 2px;
    margin: 0 4px;
    color: #f5b301;
    font-size: 13px;
}
.top-stats-strip .tss-divider {
    width: 1px;
    height: 18px;
    background: #d1d5db;
}
@media (max-width: 575px) {
    .top-stats-strip { font-size: 12px; padding: 6px 0; }
    .top-stats-strip .tss-highlight { font-size: 13px; }
    .top-stats-strip .tss-divider { display: none; }
    .top-stats-strip .tss-inner { gap: 4px 12px; }
}

/* === Responsive === */
@media (max-width: 991px) {
    .bm-modal-wrapper .modal-dialog { max-width: 95%; margin: 15px auto; }
    .bm-grid-1-2,
    .bm-grid-1-1 { grid-template-columns: 1fr; gap: 24px; }
    .bm-stepper { padding: 18px 16px 12px; }
    .bm-step-label { font-size: 11px; }
    .bm-step-status { font-size: 10px; }
    .bm-body { padding: 18px 20px 24px; }
    .bm-section-title h2 { font-size: 22px; }
    .bm-hero-col { display: none; } /* hide hero on mobile */
}
@media (max-width: 575px) {
    .bm-stepper { gap: 0; }
    .bm-step { padding: 0 4px; }
    .bm-step-label { display: none; }
    .bm-step-line { min-width: 20px; }
    .bm-row { grid-template-columns: 1fr; }
    .bm-time-slots { grid-template-columns: repeat(2, 1fr); max-height: 240px; }
    .bm-btn { padding: 12px 24px; font-size: 13px; }
    .bm-topbar { padding: 14px 18px; }
    .bm-topbar-logo img { max-height: 32px; }
    .bm-topbar-logo { font-size: 16px; }
    .bm-topbar-back { font-size: 12px; }
    .bm-summary-card { padding: 18px; }
    .bm-body { padding: 14px 14px 18px; }

    /* HIDE "Date & Time" back link + section title on mobile to save space */
    .bm-link-back, .bm-section-title, .bm-cal-footer { display: none; }
    .bm-datetime-wrapper.has-date {grid-template-columns: auto;    gap: 0px;}
    .bm-step-content[data-step-content="2"] .bm-section-title,
    .bm-step-content[data-step-content="3"] .bm-section-title { display: none; }
    .bm-datetime-wrapper{justify-content: normal;}
    /* === COMPACT CALENDAR on mobile === */
    .bm-calendar-card { padding: 10px; }
    .bm-cal-header { gap: 6px; padding-bottom: 8px; }
    .bm-cal-header strong { font-size: 14px; }
    .bm-cal-nav { width: 26px; height: 26px; font-size: 11px; }
    .bm-cal-year { font-size: 12px; padding: 4px 6px; }
    .bm-cal-weekdays { font-size: 10px; padding: 4px 0; }
    .bm-cal-days { gap: 2px; }
    .bm-cal-day {
        aspect-ratio: 1;
        height: 30px;
        font-size: 12px;
        border-radius: 6px;
        max-width: none;
    }
    .bm-cal-footer { padding-top: 8px; font-size: 12px; }

    /* Compact slots area */
    .bm-time-card { padding: 12px; }
    .bm-time-card > strong { font-size: 13px; margin-bottom: 8px; }
    .bm-slot-btn { padding: 8px 6px; font-size: 12px; }

    .bm-actions-split { gap: 8px; }
    .bm-actions-split .bm-btn { flex: 1; padding: 10px; font-size: 12px; }
}

/* ===== Step 1 NEXT button alignment ===== */
.bm-step-content[data-step-content="1"] .bm-actions {
    display: flex;
    justify-content: flex-end;        /* right align on desktop */
    margin-top: 20px;
}
@media (max-width: 575px) {
    .bm-step-content[data-step-content="1"] .bm-actions {
        justify-content: stretch;
    }
    .bm-step-content[data-step-content="1"] .bm-actions .bm-btn {
        width: 100%;
    }
}
