/* Medical Appointment Booking – Public Styles */
.mab-booking-wrap * { box-sizing: border-box; }

.mab-booking-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 760px;
    margin: 32px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    overflow: hidden;
}

/* Header */
.mab-header {
    padding: 28px 36px 20px;
    color: #fff;
}
.mab-header h2 { margin: 0 0 6px; font-size: 24px; }
.mab-header p  { margin: 0; opacity: .88; font-size: 15px; }

/* Progress steps */
.mab-steps {
    display: flex;
    padding: 0 36px;
    background: rgba(0,0,0,.12);
}
.mab-step {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    border-bottom: 3px solid transparent;
    cursor: default;
    transition: color .2s, border-color .2s;
}
.mab-step.active  { color: #fff; border-bottom-color: #fff; font-size: 14px; }
.mab-step.done    { color: rgba(255,255,255,.85); }

/* Body */
.mab-body { padding: 32px 36px; }

/* Step panels */
.mab-panel { display: none; }
.mab-panel.active { display: block; animation: mabFadeIn 0.3s ease; }
@keyframes mabFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mab-panel h3 { margin: 0 0 20px; font-size: 18px; color: #1a1a2e; }

/* Grid of cards */
.mab-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
.mab-card-item {
    border: 2px solid #e4e4e4;
    border-radius: 10px;
    padding: 18px 16px;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .15s;
    position: relative;
}
.mab-card-item:hover   { border-color: var(--mab-brand, #0073aa); transform: translateY(-2px); }
.mab-card-item.selected { border-color: var(--mab-brand, #0073aa); background: color-mix(in srgb, var(--mab-brand,#0073aa) 8%, #fff); }
.mab-card-item .mab-card-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.mab-card-item .mab-card-sub   { font-size: 13px; color: #666; }
.mab-card-item .mab-check {
    position: absolute; top: 10px; right: 10px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--mab-brand, #0073aa); color: #fff;
    display: none; align-items: center; justify-content: center; font-size: 12px;
}
.mab-card-item.selected .mab-check { display: flex; }

/* Provider card with photo */
.mab-provider-photo {
    width: 56px; height: 56px; border-radius: 50%;
    object-fit: cover; margin-bottom: 10px; background: #eee;
}

/* Date picker */
.mab-date-input {
    padding: 10px 14px; border: 2px solid #e4e4e4; border-radius: 8px;
    font-size: 16px; width: 100%; max-width: 260px;
    transition: border-color .18s;
}
.mab-date-input:focus { border-color: var(--mab-brand, #0073aa); outline: none; }

/* Slots */
.mab-slots {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px;
}
.mab-slot {
    padding: 10px 18px; border: 2px solid #e4e4e4; border-radius: 8px;
    cursor: pointer; font-size: 14px; font-weight: 600;
    transition: border-color .18s, background .18s;
}
.mab-slot:hover   { border-color: var(--mab-brand,#0073aa); }
.mab-slot.selected { border-color: var(--mab-brand,#0073aa); background: #e8f4fb; }

/* Form fields */
.mab-field { margin-bottom: 18px; }
.mab-field label { display: block; font-weight: 600; margin-bottom: 6px; color: #333; font-size: 14px; }
.mab-field input,
.mab-field textarea {
    width: 100%; padding: 10px 14px;
    border: 2px solid #e4e4e4; border-radius: 8px;
    font-size: 15px; transition: border-color .18s;
}
.mab-field input:focus,
.mab-field textarea:focus { border-color: var(--mab-brand,#0073aa); outline: none; }
.mab-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Summary box */
.mab-summary {
    background: #f6f8fb; border-radius: 10px; padding: 20px 24px; margin-bottom: 20px;
}
.mab-summary h4 { margin: 0 0 14px; font-size: 16px; }
.mab-summary-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.mab-summary-row:last-child { border-bottom: none; }
.mab-summary-row span:first-child { color: #666; }
.mab-summary-row span:last-child  { font-weight: 600; }

/* Navigation */
.mab-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; position: relative; z-index: 5; }
.mab-btn {
    padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; border: none; transition: opacity .2s, transform .15s;
    position: relative; z-index: 5; pointer-events: auto !important;
}
.mab-btn:hover { opacity: .88; transform: translateY(-1px); }
.mab-btn-primary { background: var(--mab-brand,#0073aa); color: #fff; }
.mab-btn-secondary { background: #f0f0f0; color: #333; }
.mab-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Success */
.mab-success {
    text-align: center; padding: 40px 20px;
}
.mab-success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #d1e7dd; display: flex; align-items: center; justify-content: center;
    font-size: 36px; margin: 0 auto 20px;
}
.mab-success h3 { color: #0a3622; font-size: 22px; margin-bottom: 10px; }
.mab-success p  { color: #555; font-size: 15px; }

/* Error/loading */
.mab-loading { text-align:center; color:#666; padding:16px; font-size:14px; }
.mab-error   { color:#d63638; font-size:14px; padding:10px 0; }
.mab-info    { color:#666;    font-size:14px; padding:10px 0; }

/* Leave notice & on-leave message */
.mab-leave-notice {
    background: #fff3cd; border-left: 3px solid #ffc107;
    padding: 10px 14px; border-radius: 4px;
    font-size: 13px; color: #664d03; margin-bottom: 14px;
}
.mab-on-leave-msg {
    background: #f8d7da; border-left: 3px solid #d63638;
    padding: 14px 16px; border-radius: 4px;
    font-size: 14px; color: #58151c; margin-top: 12px;
}

/* Payment badge */
.mab-payment-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff3cd; color: #664d03; border-radius: 20px;
    padding: 6px 14px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}

@media (max-width: 580px) {
    .mab-booking-wrap { border-radius: 0; margin: 0; }
    .mab-body, .mab-header { padding: 20px; }
    .mab-steps { padding: 0 20px; }
    .mab-field-row { grid-template-columns: 1fr; }
    .mab-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Custom Calendar ─────────────────────────────────────────────────── */
/* ── Beautiful Calendar ─────────────────────────────────────────────── */
.mab-cal-wrap {
    background: #fff;
    border: 2px solid #e8eaf0;
    border-radius: 16px;
    padding: 20px;
    max-width: 440px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.mab-cal-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
}
.mab-cal-header span { font-weight: 700; font-size: 18px; color: #1a1d23; letter-spacing: -.3px; }
.mab-cal-nav {
    background: #f4f5f7; border: none; border-radius: 8px;
    width: 38px; height: 38px; cursor: pointer; font-size: 18px;
    color: #374151; transition: background .15s; display: flex; align-items: center; justify-content: center;
}
.mab-cal-nav:hover { background: var(--mab-brand,#0073aa); color: #fff; }
.mab-cal-nav:disabled { opacity: .25; cursor: not-allowed; }
.mab-cal-nav:disabled:hover { background: #f4f5f7; color: #374151; }
.mab-cal-dow {
    display: grid; grid-template-columns: repeat(7,1fr); text-align: center;
    margin-bottom: 8px; border-bottom: 2px solid #f3f4f6; padding-bottom: 8px;
}
.mab-cal-dow div { font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; padding: 4px 0; }
.mab-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.mab-cal-day {
    aspect-ratio: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border-radius: 10px; font-size: 16px; font-weight: 600;
    cursor: pointer; border: 2px solid transparent;
    transition: all .15s; position: relative; color: #1a1d23; min-height: 46px;
}
.mab-cal-day:hover:not(.mab-cal-disabled):not(.mab-cal-leave):not(.mab-cal-holiday):not(.mab-cal-empty) {
    background: #e8f4fb;
    border-color: var(--mab-brand,#0073aa); color: var(--mab-brand,#0073aa); transform: scale(1.08);
}
.mab-cal-day:not(.mab-cal-disabled):not(.mab-cal-leave):not(.mab-cal-holiday):not(.mab-cal-empty):not(.mab-cal-selected)::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 5px; height: 5px; border-radius: 50%; background: #10b981;
}
.mab-cal-day.mab-cal-selected {
    background: var(--mab-brand,#0073aa) !important; color: #fff !important;
    border-color: var(--mab-brand,#0073aa) !important; transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0,115,170,.35);
}
.mab-cal-day.mab-cal-selected::after { display: none; }
.mab-cal-day.mab-cal-today:not(.mab-cal-selected):not(.mab-cal-disabled) {
    border: none;
    color: var(--mab-brand,#0073aa);
    background: transparent;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mab-cal-day.mab-cal-today.mab-cal-disabled {
    border: none;
    color: #d1d5db;
    background: #fafafa;
}
.mab-cal-day.mab-cal-disabled { color: #d1d5db; cursor: not-allowed; background: #fafafa; }
.mab-cal-day.mab-cal-disabled::after { display: none; }
.mab-cal-day.mab-cal-leave {
    background: #fff1f2 !important; color: #e11d48 !important;
    cursor: not-allowed; border-color: #fecdd3 !important;
}
.mab-cal-day.mab-cal-leave::after {
    content: "x"; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
    font-size: 9px; color: #e11d48; font-weight: 900;
    width: auto; height: auto; border-radius: 0; background: none;
}
.mab-cal-day.mab-cal-holiday {
    background: #fffbeb !important; color: #d97706 !important;
    cursor: not-allowed; border-color: #fcd34d !important;
}
.mab-cal-day.mab-cal-holiday::after {
    content: "*"; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    font-size: 10px; color: #d97706; font-weight: 700;
    width: auto; height: auto; border-radius: 0; background: none;
}
.mab-cal-day.mab-cal-empty { cursor: default; }
.mab-cal-day.mab-cal-empty::after { display: none; }
.mab-cal-legend {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 16px; padding-top: 14px; border-top: 2px solid #f3f4f6;
}
.mab-leg-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; color: #374151;
    padding: 7px 12px; border-radius: 8px; background: #f9fafb;
    flex: 1; justify-content: center; min-width: 100px;
}
.mab-leg-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.mab-leg-avail   { background: #d1fae5; }
.mab-leg-leave   { background: #fff1f2; border: 1.5px solid #fecdd3; }
.mab-leg-holiday { background: #fffbeb; border: 1.5px solid #fcd34d; }
.mab-leg-past    { background: #f3f4f6; border: 1.5px solid #e5e7eb; }
.mab-cal-loading { text-align: center; padding: 24px; color: #999; font-size: 13px; }
