/* =============================================
   WB Bookings — Frontend v2.2
   Brand: #ED194E  |  Mobile-first
   ============================================= */
:root {
  --brand:      #ED194E;
  --brand-dk:   #c4153f;
  --brand-lt:   #fff5f7;
  --brand-ring: rgba(237,25,78,.18);
  --text:       #1a1d2e;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #f9fafb;
  --radius:     10px;
}

.wbb-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
}
.wbb-form-wrap * { box-sizing: border-box; }

/* ---- Front-end modal ---- */
.wbb-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.52);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity .22s;
}
.wbb-modal-overlay.open { opacity: 1; pointer-events: all; }
.wbb-front-modal-box {
    background: #fff; border-radius: 16px;
    padding: 36px 28px; text-align: center;
    max-width: 360px; width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,.2);
    transform: scale(.94); transition: transform .22s;
}
.wbb-modal-overlay.open .wbb-front-modal-box { transform: scale(1); }
.wbb-front-modal-icon {
    width: 60px; height: 60px; border-radius: 50%;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.wbb-front-modal-icon.success { background: #d1fae5; color: #065f46; }
.wbb-front-modal-icon.error   { background: #fee2e2; color: #991b1b; }
#wbb-modal-msg  { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
#wbb-modal-sub  { font-size: 13px; color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.wbb-front-modal-close {
    background: var(--brand); color: #fff; border: none;
    border-radius: 8px; padding: 10px 26px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.wbb-front-modal-close:hover { background: var(--brand-dk); }

/* ---- Step indicators ---- */
.wbb-steps {
    display: flex; align-items: center;
    margin-bottom: 28px;
    overflow-x: auto; /* allow scroll on tiny screens */
    scrollbar-width: none;
}
.wbb-steps::-webkit-scrollbar { display: none; }
.wbb-step {
    display: flex; flex-direction: column;
    align-items: center; gap: 5px;
    flex-shrink: 0;
}
.wbb-step-circle {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid var(--border); background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--muted);
    transition: all .18s;
}
.wbb-step-label { font-size: 10px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.wbb-step.active .wbb-step-circle { background: var(--brand); border-color: var(--brand); color: #fff; }
.wbb-step.active .wbb-step-label  { color: var(--brand); font-weight: 600; }
.wbb-step.done .wbb-step-circle::after { content: '✓'; font-size: 13px; color: var(--brand); }
.wbb-step.done .wbb-step-circle  { background: var(--brand-lt); border-color: var(--brand); }
.wbb-step.done .wbb-step-circle span { display: none; }
.wbb-step-connector { flex: 1; height: 2px; background: var(--border); margin-bottom: 18px; min-width: 16px; transition: background .2s; }
.wbb-step-connector.done { background: var(--brand); }

/* ---- Panels ---- */
.wbb-step-panel { display: none; }
.wbb-step-panel.active { display: block; }
.wbb-panel-title { font-size: 18px; font-weight: 700; margin: 0 0 18px; }

/* ---- Category select ---- */
.wbb-input-group { display: flex; flex-direction: column; gap: 5px; }
.wbb-input-group label { font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .4px; }
.wbb-req { color: var(--brand); }

/* ---- Service cards ---- */
.wbb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px; margin-bottom: 20px;
}
.wbb-service-card {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 14px; cursor: pointer; transition: all .15s;
    display: flex; gap: 10px; align-items: flex-start; background: #fff;
}
.wbb-service-card:hover { border-color: var(--brand); box-shadow: 0 3px 10px var(--brand-ring); }
.wbb-service-card.selected { border-color: var(--brand); background: var(--brand-lt); }
.wbb-service-accent { width: 4px; border-radius: 2px; min-height: 44px; flex-shrink: 0; }
.wbb-service-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.wbb-service-meta {
    display: flex; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--brand);
}
/* Duration badge — no "min" label */
.wbb-service-dur { font-size: 11px; color: var(--muted); font-weight: 400; }
.wbb-service-desc { font-size: 12px; color: #9ca3af; margin-top: 4px; line-height: 1.5; }
.wbb-service-time { font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 2px; }

/* ---- Calendar + slots layout ---- */
.wbb-datetime-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
    align-items: start;
}
/* Mobile: stack calendar above slots */
@media (max-width: 580px) {
    .wbb-datetime-wrap { grid-template-columns: 1fr; }
}

.wbb-calendar-picker {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #fff;
}
.wbb-cal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; background: var(--brand); color: #fff;
}
.wbb-cal-month-label { font-weight: 600; font-size: 14px; }
.wbb-cal-nav {
    background: rgba(255,255,255,.2); border: none; color: #fff;
    width: 28px; height: 28px; border-radius: 7px;
    font-size: 17px; cursor: pointer; transition: background .15s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wbb-cal-nav:hover { background: rgba(255,255,255,.35); }
.wbb-cal-weekdays {
    display: grid; grid-template-columns: repeat(7,1fr);
    background: #fde8ed; padding: 4px 6px 0;
}
.wbb-cal-weekdays span { text-align:center; font-size:10px; font-weight:700; color:var(--brand); text-transform:uppercase; padding:4px 0; }
.wbb-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; padding:6px; }
.wbb-cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 7px; font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all .12s; color: var(--text);
    border: 2px solid transparent; min-width: 0;
}
.wbb-cal-day:hover:not(.disabled):not(.empty) { background: var(--brand-lt); color: var(--brand); }
.wbb-cal-day.today   { font-weight: 700; color: var(--brand); }
.wbb-cal-day.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.wbb-cal-day.disabled { color: #d1d5db; cursor: not-allowed; }
.wbb-cal-day.empty   { cursor: default; }

/* ---- Time slots ---- */
.wbb-slots-panel {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    background: #fff; padding: 14px;
    display: flex; flex-direction: column;
}
.wbb-slots-placeholder {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 160px; color: #d1d5db; text-align: center;
}
.wbb-slots-placeholder p { font-size: 12px; margin: 7px 0 0; }
.wbb-slots-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(78px,1fr)); gap: 7px;
    max-height: 260px; overflow-y: auto;
}
.wbb-slot {
    padding: 9px 4px; border: 1.5px solid var(--border); border-radius: 9px;
    text-align: center; font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all .12s; color: var(--text);
}
.wbb-slot:hover  { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }
.wbb-slot.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.wbb-slots-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.wbb-no-slots { font-size: 12px; color: var(--muted); text-align: center; padding: 16px 0; }
.wbb-slots-loading { text-align: center; padding: 24px; color: var(--muted); font-size: 12px; }

/* ---- Details form ---- */
.wbb-details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
@media (max-width: 480px) { .wbb-details-grid { grid-template-columns: 1fr; } }
.wbb-full { grid-column: 1 / -1; }
.wbb-input, .wbb-textarea {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 10px 12px; font-size: 14px; color: var(--text);
    outline: none; transition: border .15s; width: 100%; font-family: inherit;
}
.wbb-input:focus, .wbb-textarea:focus { border-color: var(--brand); }
.wbb-textarea { min-height: 76px; resize: vertical; }

/* ---- Summary ---- */
.wbb-summary-card {
    background: var(--brand-lt); border: 1.5px solid #fecdd3;
    border-radius: var(--radius); padding: 14px; margin-bottom: 16px;
}
.wbb-summary-row {
    display: flex; justify-content: space-between;
    padding: 5px 0; font-size: 13px; color: var(--text);
    border-bottom: 1px solid #fecdd3;
}
.wbb-summary-row:last-child { border: none; }
.wbb-summary-total { font-weight: 700; font-size: 15px; }
.wbb-summary-total strong { color: var(--brand); }

/* ---- Payment methods ---- */
.wbb-payment-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; color: var(--text); }
.wbb-payment-list  { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.wbb-pay-option {
    display: flex; align-items: center; gap: 12px;
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; cursor: pointer; transition: all .15s; position: relative;
}
.wbb-pay-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.wbb-pay-option.selected { border-color: var(--brand); background: var(--brand-lt); }
.wbb-pay-icon  { font-size: 20px; flex-shrink: 0; }
.wbb-pay-info  { flex: 1; min-width: 0; }
.wbb-pay-info strong { display: block; font-size: 14px; color: var(--text); }
.wbb-pay-info small  { font-size: 11px; color: var(--muted); }
.wbb-pay-check {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    opacity: 0; transition: opacity .15s;
}
.wbb-pay-option.selected .wbb-pay-check { opacity: 1; }

/* ---- Navigation buttons ---- */
.wbb-step-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; gap: 10px;
    /* Always stay in the current step panel */
    position: relative;
}
.wbb-nav-btn {
    padding: 11px 24px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; border: none;
    transition: all .15s; font-family: inherit; flex-shrink: 0;
}
.wbb-nav-back   { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.wbb-nav-back:hover { border-color: var(--brand); color: #fff; background-color: var(--brand); }
.wbb-nav-next   { background: var(--brand); color: #fff; margin-left: auto; }
.wbb-nav-next:hover:not(:disabled) { background: var(--brand-dk); }
.wbb-nav-next:disabled  { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.wbb-nav-submit { background: var(--brand); color: #fff; }
.wbb-nav-submit:hover:not(:disabled) { background: var(--brand-dk); }
.wbb-nav-submit:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }

/* ---- Confirmation ---- */
.wbb-confirmation { text-align: center; padding: 36px 16px; }
.wbb-confirm-icon {
    width: 68px; height: 68px; background: #d1fae5;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #065f46; margin: 0 auto 18px;
}
.wbb-confirmation h2 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.wbb-confirmation p  { font-size: 14px; color: var(--muted); }

/* ---- Bank instructions ---- */
.wbb-bank-box { background: var(--bg); border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; text-align: left; margin-top: 18px; }
.wbb-bank-box h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; }
.wbb-bank-ref-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.wbb-bank-amount  { font-weight: 700; color: var(--brand); font-size: 15px; }
.wbb-bank-note    { background: #fef9c3; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #713f12; margin-bottom: 12px; }
.wbb-bank-account { background: #fff; border: 1px solid #e2e8f0; border-radius: 9px; padding: 12px; margin-bottom: 8px; }
.wbb-bank-account-name { font-weight: 700; font-size: 13px; color: #0f172a; margin-bottom: 8px; }
.wbb-bank-fields  { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
@media (max-width: 480px) { .wbb-bank-fields { grid-template-columns: 1fr; } }
.wbb-bank-field span:first-child { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; }
.wbb-bank-field strong { font-size: 13px; color: #0f172a; }
.wbb-bank-footer { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #64748b; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e2e8f0; }

/* Loading */
.wbb-loading { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: wbb-spin .5s linear infinite; margin-right: 6px; vertical-align: middle; }
@keyframes wbb-spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 520px) {
    .wbb-form-wrap { padding: 0; margin-bottom: 50px;}
    .wbb-panel-title { font-size: 16px; }
    .wbb-steps { gap: 0; }
    .wbb-step-circle { width: 30px; height: 30px; font-size: 12px; }
    .wbb-step-connector { min-width: 10px; }

    /* Services: 1 column on tiny phones */
    .wbb-services-grid { grid-template-columns: 1fr; }

    /* Nav buttons: full width, stacked */
    .wbb-step-nav { flex-wrap: wrap; }
    .wbb-nav-back, .wbb-nav-next, .wbb-nav-submit {
        flex: 1; min-width: 120px; text-align: center; justify-content: center;
    }
    .wbb-nav-next { margin-left: 0; }

    /* Summary responsive */
    .wbb-summary-row { font-size: 12px; }
    .wbb-input-group {max-width: 100% !important;}
}

@media (max-width: 360px) {
    .wbb-cal-day { font-size: 11px; }
    .wbb-cal-weekdays span { font-size: 9px; }
}
