/* Barber Booking - tutto scoped sotto .bb-widget per non collidere col tema */
.bb-widget {
    --bb-ink: #111111;
    --bb-accent: #c9a227;
    --bb-bg: #ffffff;
    --bb-line: #e7e4de;
    --bb-soft: #f6f4f0;
    --bb-radius: 14px;
    --bb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    max-width: 640px;
    margin: 0 auto;
    padding: 26px;
    background: var(--bb-bg);
    border: 1px solid var(--bb-line);
    border-radius: calc(var(--bb-radius) + 6px);
    font-family: var(--bb-font);
    color: var(--bb-ink);
    box-shadow: 0 18px 50px -28px rgba(17, 17, 17, .35);
    box-sizing: border-box;
}
.bb-widget *, .bb-widget *::before, .bb-widget *::after { box-sizing: border-box; }

/* Step dots */
.bb-steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.bb-dot {
    width: 34px; height: 4px; border-radius: 99px; background: var(--bb-line);
    transition: background .25s ease;
}
.bb-dot.is-active { background: var(--bb-accent); }

.bb-title {
    font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; margin: 0 0 16px; color: var(--bb-ink);
}

/* Cards (servizi / barbieri) */
.bb-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .bb-grid { grid-template-columns: 1fr 1fr; } }
.bb-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    text-align: left; width: 100%; padding: 16px 18px;
    background: var(--bb-soft); border: 1.5px solid transparent;
    border-radius: var(--bb-radius); cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
    font-family: inherit; color: inherit;
}
.bb-card:hover { transform: translateY(-2px); border-color: var(--bb-ink); background: #fff; }
.bb-card-name { font-size: 16px; font-weight: 650; }
.bb-card-meta { font-size: 13px; color: #6b6760; }

/* Selettore giorni */
.bb-days {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.bb-day {
    flex: 0 0 auto; width: 62px; padding: 10px 0; cursor: pointer;
    background: var(--bb-soft); border: 1.5px solid transparent; border-radius: var(--bb-radius);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-family: inherit; color: inherit; transition: border-color .15s ease, background .15s ease;
}
.bb-day:hover { border-color: var(--bb-ink); }
.bb-day.is-sel { background: var(--bb-ink); color: #fff; border-color: var(--bb-ink); }
.bb-day-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.bb-day-num { font-size: 20px; font-weight: 700; line-height: 1; }
.bb-day-mon { font-size: 11px; opacity: .7; }

/* Slot orari */
.bb-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.bb-time {
    padding: 11px 0; text-align: center; cursor: pointer;
    background: #fff; border: 1.5px solid var(--bb-line); border-radius: 10px;
    font-family: inherit; font-size: 15px; font-weight: 600; color: var(--bb-ink);
    transition: all .15s ease;
}
.bb-time:hover { border-color: var(--bb-accent); background: var(--bb-accent); color: var(--bb-ink); }

/* Dati cliente */
.bb-summary {
    background: var(--bb-soft); border-radius: 10px; padding: 12px 14px;
    font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.bb-fields { display: flex; flex-direction: column; gap: 10px; }
.bb-input {
    width: 100%; padding: 13px 15px; font-family: inherit; font-size: 15px;
    border: 1.5px solid var(--bb-line); border-radius: 10px; background: #fff; color: var(--bb-ink);
}
.bb-input:focus { outline: none; border-color: var(--bb-ink); }
.bb-hp { position: absolute !important; left: -9999px !important; }

/* Bottoni / nav */
.bb-nav { display: flex; gap: 10px; margin-top: 20px; }
.bb-btn {
    padding: 13px 22px; border-radius: 10px; cursor: pointer; font-family: inherit;
    font-size: 14px; font-weight: 700; letter-spacing: .03em; border: 1.5px solid transparent;
    transition: opacity .15s ease, transform .1s ease;
}
.bb-btn:active { transform: translateY(1px); }
.bb-btn-ghost { background: transparent; border-color: var(--bb-line); color: var(--bb-ink); }
.bb-btn-primary { background: var(--bb-ink); color: #fff; margin-left: auto; }
.bb-btn-primary:disabled { opacity: .6; cursor: default; }

/* Messaggi / stati */
.bb-loading, .bb-empty { color: #6b6760; font-size: 14px; padding: 10px 0; }
.bb-msg { font-size: 14px; margin: 12px 0 0; min-height: 18px; }
.bb-msg.is-err { color: #b3261e; }

/* Successo */
.bb-success { text-align: center; padding: 14px 0; }
.bb-check {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--bb-accent); color: var(--bb-ink);
    display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700;
}

/* ---------- Area cliente "Le mie prenotazioni" ---------- */
.bb-me-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bb-me-logout { font-size: 13px; color: #6b6760; text-decoration: underline; }
.bb-me-list { display: flex; flex-direction: column; gap: 10px; }
.bb-me-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; background: var(--bb-soft); border-radius: var(--bb-radius); flex-wrap: wrap;
}
.bb-me-info { display: flex; flex-direction: column; gap: 2px; }
.bb-me-svc { font-weight: 650; font-size: 15px; }
.bb-me-when { font-size: 13px; color: #6b6760; }
.bb-me-actions { display: flex; gap: 8px; }
.bb-me-actions .bb-btn { padding: 9px 14px; font-size: 13px; }
.bb-btn-cx { background: transparent; border-color: #b3261e; color: #b3261e; }
.bb-success-link { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--bb-ink); text-decoration: underline; }

/* ===== Multi-servizio, riepilogo, calendario mensile, popup (stile Amelia) ===== */

/* Card servizio selezionabile */
.bb-card { position: relative; }
.bb-card.is-sel { border-color: var(--bb-ink); background: #fff; box-shadow: inset 0 0 0 1px var(--bb-ink); }
.bb-card-check {
    position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
    background: var(--bb-soft); color: var(--bb-ink);
}
.bb-card.is-sel .bb-card-check { background: var(--bb-accent); }

/* Barra inferiore step 1 */
.bb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.bb-bar-info { font-size: 14px; color: #6b6760; font-weight: 600; }

/* Riepilogo */
.bb-summary-box { background: var(--bb-soft); border-radius: var(--bb-radius); padding: 14px 16px; margin-bottom: 18px; }
.bb-sum-h { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #8a857c; margin-bottom: 8px; }
.bb-sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.bb-sum-meta { font-size: 13px; color: #6b6760; margin-top: 6px; }
.bb-sum-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; border-top: 1px solid var(--bb-line); margin-top: 8px; padding-top: 8px; }

/* Calendario mensile */
.bb-cal { border: 1px solid var(--bb-line); border-radius: var(--bb-radius); padding: 12px; margin-bottom: 14px; }
.bb-cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bb-cal-mon { font-weight: 700; font-size: 15px; text-transform: capitalize; }
.bb-cal-arrow { width: 34px; height: 34px; border: 1px solid var(--bb-line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--bb-ink); }
.bb-cal-arrow:disabled { opacity: .3; cursor: default; }
.bb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bb-cal-dow { text-align: center; font-size: 11px; color: #8a857c; font-weight: 600; padding: 4px 0; }
.bb-cal-cell { aspect-ratio: 1 / 1; border: none; background: var(--bb-soft); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--bb-ink); font-family: inherit; display: flex; align-items: center; justify-content: center; }
.bb-cal-cell:hover:not(.is-dis):not(.is-empty) { background: #fff; box-shadow: inset 0 0 0 1.5px var(--bb-ink); }
.bb-cal-cell.is-sel { background: var(--bb-ink); color: #fff; }
.bb-cal-cell.is-dis { opacity: .3; cursor: default; background: transparent; }
.bb-cal-cell.is-empty { background: transparent; cursor: default; }

/* Popup */
.bb-open-btn { padding: 14px 26px; background: var(--bb-ink); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.bb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 99999; padding: 24px 12px; overflow-y: auto; }
.bb-overlay[hidden] { display: none; }
.bb-overlay-box { position: relative; width: 100%; max-width: 680px; margin: auto; }
.bb-overlay-close { position: absolute; top: -6px; right: -6px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: none; background: #fff; color: #111; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* Badge stato conferma (area cliente) */
.bb-me-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.bb-me-badge.is-ok { background: #e7f6ec; color: #1c7a43; }
.bb-me-badge.is-wait { background: #fdf3d6; color: #8a6d00; }

/* Pulsante Conferma (area cliente) */
.bb-btn-ok { background: #2d9d5b; border-color: #2d9d5b; color: #fff; }
.bb-btn-ok:hover { background: #25814a; border-color: #25814a; }
