/* ===== BOOKING-WIDGET (Branch-First) =====
 * Verwendet auf Home + /booking-Page. Lippen behält eigenes Widget.
 * Palette: Home-Variablen (--black, --white, --cream, --gold, --gold-light, --grey, --serif, --sans).
 */

.bk-widget {
    max-width: 1100px;
    margin: 0 auto;
    font-family: var(--sans);
    color: var(--black);
}

/* ── Progress-Bar ────────────────────────────────────────── */
.bk-progress { margin-bottom: 36px; }
.bk-progress-track {
    height: 2px;
    background: rgba(10, 10, 10, 0.08);
    position: relative;
    overflow: hidden;
}
.bk-progress-fill {
    position: absolute; top: 0; left: 0; height: 100%;
    background: var(--gold);
    transition: width 0.4s ease;
}
.bk-progress-labels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-top: 12px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(10, 10, 10, 0.35);
}
.bk-progress-labels .active { color: var(--gold); }

/* ── Panel-Layout ────────────────────────────────────────── */
.bk-panel {
    background: var(--white);
    padding: 36px 32px;
    border: 1px solid rgba(10, 10, 10, 0.08);
}
.bk-panel-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 28px;
}
.bk-panel-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.15;
    color: var(--black);
    margin: 0;
}
.bk-panel-hint {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    color: var(--grey);
    margin-left: 6px;
}
.bk-panel-sub {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--grey);
    margin: 8px 0 0;
}
.bk-link-back {
    background: none; border: none; padding: 0;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey);
    cursor: pointer;
    transition: color 0.2s;
}
.bk-link-back:hover { color: var(--gold); }

/* ── Step 1: Branch-Cards ────────────────────────────────── */
.bk-branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}
.bk-branch-card {
    background: var(--white);
    border: 1px solid rgba(10, 10, 10, 0.12);
    padding: 24px 20px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    font-family: var(--sans);
    color: var(--black);
}
.bk-branch-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.06);
}
.bk-branch-card-name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 300;
    color: var(--black);
    margin-bottom: 4px;
}
.bk-branch-card-meta {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}
.bk-branch-card-addr {
    font-size: 13px;
    color: var(--grey);
    line-height: 1.4;
}

/* ── Step 2: Produkt-Cards (multi-select, 4-spaltig kompakt) ─ */
.bk-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 980px) { .bk-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Auf Mobile bewusst 2 Spalten (auch auf sehr kleinen Phones), damit
   der User beim Scannen Vergleich zwischen Leistungen behält.
   minmax(0, 1fr) verhindert, dass lange Produktnamen die Spalten
   sprengen und damit das Grid aus dem Panel rausschiebt. */
@media (max-width: 720px) { .bk-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.bk-product-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--white);
    border: 1px solid rgba(10, 10, 10, 0.12);
    padding: 14px 14px 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    font-family: var(--sans);
    color: var(--black);
    position: relative;
    min-height: 110px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.bk-product-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(10, 10, 10, 0.05);
}
.bk-product-card.is-selected {
    border-color: var(--gold);
    background: rgba(184, 154, 114, 0.06);
}
/* Checkbox oben rechts in der Karte (kompaktes, info-dichtes Layout). */
.bk-product-card-check {
    position: absolute;
    top: 12px; right: 12px;
    width: 20px; height: 20px;
    border: 1.5px solid rgba(10, 10, 10, 0.22);
    background: var(--white);
    transition: border-color 0.2s, background 0.2s;
}
.bk-product-card.is-selected .bk-product-card-check {
    border-color: var(--gold);
    background: var(--gold);
}
.bk-product-card.is-selected .bk-product-card-check::after {
    content: '';
    position: absolute;
    left: 6px; top: 2px;
    width: 5px; height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.bk-product-card-body {
    flex: 1;
    padding-right: 28px;
}
.bk-product-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
    line-height: 1.25;
}
.bk-product-card-sub {
    font-size: 11px;
    color: var(--grey);
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bk-product-card-meta {
    display: flex; gap: 8px; align-items: center;
    margin-top: auto;
}
.bk-product-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.bk-products-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
}
.bk-selected-count {
    font-size: 13px;
    color: var(--grey);
}
.bk-cta {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--gold);
    border: none;
    padding: 14px 32px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
}
.bk-cta:hover:not(:disabled) {
    background: var(--gold-light);
    transform: translateY(-1px);
}
.bk-cta:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Step 3: Calendar + Practitioner ─────────────────────── */
.bk-calendar-area {
    margin-top: 8px;
}
.bk-calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}
.bk-month-btn {
    background: none;
    border: 1px solid rgba(10, 10, 10, 0.15);
    width: 36px; height: 36px;
    font-size: 18px;
    color: var(--black);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.bk-month-btn:hover { border-color: var(--gold); color: var(--gold); }
.bk-month-label {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 300;
    color: var(--black);
    text-transform: capitalize;
    min-width: 180px;
    text-align: center;
}

/* Shore-Style: cleaner Grid ohne Cell-Borders, nur die Tageszahl in
   einem optional gefüllten Kreis. Verfügbar = bold-schwarz, gesperrt =
   grau + durchgestrichen, ausgewählt = gold-gefüllter Kreis. */
.bk-cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.bk-cal-table th {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--grey);
    padding: 10px 2px 14px;
    background: transparent;
    border: none;
    text-align: center;
}
.bk-cal-cell {
    border: none;
    height: 50px;
    vertical-align: middle;
    padding: 4px 2px;
    position: relative;
    background: transparent;
    text-align: center;
}
.bk-cal-cell.is-empty { background: transparent; }
.bk-cal-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: rgba(10, 10, 10, 0.5);
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
/* Past-Tage und ausgebuchte Tage: grau + durchgestrichen */
.bk-cal-cell.is-past .bk-cal-day,
.bk-cal-cell.is-unavailable .bk-cal-day {
    color: rgba(10, 10, 10, 0.3);
    text-decoration: line-through;
    font-weight: 400;
}
/* Loading-State: dezent, kein Strikethrough */
.bk-cal-cell.is-loading .bk-cal-day {
    color: rgba(10, 10, 10, 0.35);
    text-decoration: none;
}
/* Verfügbare Tage: dunkelgold (statt blass-schwarz), fett, klickbar.
   Hover-State legt einen sanften Gold-Tint hinter die Zahl. */
.bk-cal-cell.is-available {
    cursor: pointer;
}
.bk-cal-cell.is-available .bk-cal-day {
    color: #8a6d4a;
    font-weight: 700;
    text-decoration: none;
}
.bk-cal-cell.is-available:hover .bk-cal-day {
    background: rgba(184, 154, 114, 0.15);
    color: #6f573a;
}
/* Ausgewählter Tag: voll gold + weiße Zahl */
.bk-cal-cell.is-selected .bk-cal-day,
.bk-cal-cell.is-selected.is-available .bk-cal-day {
    background: var(--gold);
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
}

.bk-practitioner-area {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
    max-width: 520px;
}
.bk-practitioner-label {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 10px;
}
.bk-optional {
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: none;
    font-size: 11px;
    color: rgba(10, 10, 10, 0.4);
}
.bk-practitioner-select {
    font-family: var(--sans);
    font-size: 14px;
    padding: 10px 14px;
}

/* ── Slot-Modal ──────────────────────────────────────────── */
.bk-slot-modal {
    position: fixed; inset: 0;
    z-index: 1050;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.bk-slot-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.bk-slot-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 10, 10, 0.5);
    cursor: pointer;
}
.bk-slot-modal-dialog {
    position: relative;
    background: var(--white);
    width: min(560px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.bk-slot-modal-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    gap: 12px;
}
.bk-slot-modal-head-text { flex: 1; min-width: 0; }
.bk-slot-modal-head h4 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 22px;
    margin: 0;
    color: var(--black);
    line-height: 1.25;
}
.bk-slot-modal-sub {
    margin: 6px 0 0;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gold);
}
.bk-slot-modal-desc {
    margin: 4px 0 0;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    font-weight: 400;
}
.bk-slot-modal-close {
    background: none; border: none;
    font-size: 26px; cursor: pointer;
    color: var(--grey);
    line-height: 1;
    padding: 0;
}
.bk-slot-modal-body { padding: 20px 24px 24px; }
.bk-slot-group { margin-bottom: 20px; }
.bk-slot-group:last-child { margin-bottom: 0; }
.bk-slot-group-name {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}
.bk-slot-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.bk-slot-btn {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--gold);
    color: var(--black);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.bk-slot-btn:hover {
    background: var(--gold);
    color: var(--white);
}
.bk-slot-btn:disabled { pointer-events: none; }
@keyframes bkSpin { to { transform: rotate(360deg); } }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 720px) {
    .bk-panel { padding: 24px 16px; }
    .bk-panel-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .bk-link-back { font-size: 10px; }
    .bk-branch-grid { grid-template-columns: 1fr; }
    /* .bk-products bleibt bei 2 Spalten — siehe Regel oben (Zeile 133). */
    .bk-products-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .bk-products-footer .bk-cta { width: 100%; }
    .bk-cal-cell { height: 44px; padding: 2px; }
    .bk-cal-day { width: 34px; height: 34px; font-size: 13px; }
    .bk-cal-table th { font-size: 10px; padding: 8px 2px 10px; letter-spacing: 0.06em; }
    .bk-month-label { font-size: 18px; min-width: 140px; }
}
