/**
 * Appointments Public Booking Portal Styles
 *
 * Styles for the citizen-facing appointment booking interface.
 * Service-First Booking Flow (6 Schritte).
 *
 * Farbpalette (aus Mockup):
 *   Buergerbüro (orange):  #ef9f27 / #faeeda / #854f0b / #f5c26b
 *   KFZ (gruen):           #1d9e75 / #e1f5ee / #0f6e56 / #9fe1cb
 *   Erfolg:                #27ae60 / #eaf3de / #3b6d11 / #97c459
 *   Info (blau):           #378add / #e6f1fb / #185fa5 / #b5d4f4
 *   Warnung (rot):         #e24b4a / #fcebeb / #a32d2d / #f09595
 *
 * Path: /public/assets/css/appointments-public.css
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Accent (Terminvergabe) */
    --bf-accent: #ef9f27;
    --bf-accent-dark: #d4891e;
    --bf-accent-bg: #fef3e2;
    --bf-accent-text: #854f0b;
    --bf-accent-border: #f5c26b;

    /* Department: Buergerbüro */
    --bf-bb-accent: #ef9f27;
    --bf-bb-bg: #faeeda;
    --bf-bb-text: #854f0b;
    --bf-bb-border: #f5c26b;

    /* Department: KFZ */
    --bf-kfz-accent: #1d9e75;
    --bf-kfz-bg: #e1f5ee;
    --bf-kfz-text: #0f6e56;
    --bf-kfz-border: #9fe1cb;

    /* Erfolg */
    --bf-success: #27ae60;
    --bf-success-bg: #eaf3de;
    --bf-success-text: #3b6d11;
    --bf-success-border: #97c459;

    /* Info */
    --bf-info: #378add;
    --bf-info-bg: #e6f1fb;
    --bf-info-text: #185fa5;
    --bf-info-border: #b5d4f4;

    /* Warnung */
    --bf-warn: #e24b4a;
    --bf-warn-bg: #fcebeb;
    --bf-warn-text: #a32d2d;
    --bf-warn-border: #f09595;

    /* Neutral */
    --bf-border: #e8e8e6;
    --bf-bg: #f4f4f2;
    --bf-bg-white: #fff;
    --bf-bg-hover: #f9f9f7;
    --bf-text: #1a1a1a;
    /* Grautoene: BITV 2.0 / WCAG AA - muted erreicht >= 4.5:1 auf weiss
       UND auf --bf-bg; light nur fuer Nicht-Text (Icons/Deko) verwenden */
    --bf-text-muted: #66707c;
    --bf-text-light: #767d89;
}

/* ==========================================================================
   Base Layout
   ========================================================================== */

.bf-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bf-bg);
    color: var(--bf-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bf-main {
    flex: 1;
    padding: 0 0 24px;
}

/* Der Layout-Footer (pp-footer) folgt nach bf-main; die fixe Bottom-Bar
   wuerde ihn sonst ueberdecken -> Platz in Leistenhoehe reservieren.
   So endet jede Wizard-Seite wie die Portal-Startseite mit sichtbarem
   Footer, direkt ueber der Buttonleiste. */
body.bf-page .pp-footer {
    margin-bottom: 76px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.bf-header {
    background: var(--bf-bg-white);
    border-bottom: 1px solid var(--bf-border);
    padding: 0.75rem 0;
}

.bf-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bf-logo-img {
    max-height: 36px;
    max-width: 150px;
}

.bf-logo-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--bf-text);
}

.bf-exit-link {
    color: var(--bf-text-muted);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s;
}

.bf-exit-link:hover {
    color: var(--bf-text);
}

/* ==========================================================================
   Steps Navigation (modern progress stepper)
   Genutzt in allen 6 Schritten der Online-Terminbuchung.
   ========================================================================== */

.bf-steps-container {
    background: rgba(246, 248, 251, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1rem 0 0.85rem;
    /* Sticky direkt unter dem Buergerportal-Topbar damit der Stepper beim
       Scrollen sichtbar bleibt und nicht verdeckt wird. */
    position: sticky;
    top: var(--pp-header-h, 64px);
    z-index: 40;
}

.bf-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

.bf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    position: relative;
    min-width: 0;
}

/* Connector line between steps - sitzt mittig hinter den Step-Nums */
.bf-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;            /* mittig zur Step-Num bei 36px */
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.bf-step.done:not(:last-child)::after {
    background: var(--pp-accent, #1e40af);
}

/* Step-Number Bubble */
.bf-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--bf-text-muted); /* BITV: #94a3b8 war nur 2.45:1 */
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
    line-height: 1;
}

/* Done: ausgefuelltes Bubble + Haken */
.bf-step.done .bf-step-num {
    background: var(--pp-accent, #1e40af);
    border-color: var(--pp-accent, #1e40af);
    color: white;
    font-size: 0;
}
.bf-step.done .bf-step-num::before {
    content: '';
    width: 14px;
    height: 8px;
    border-left: 2.5px solid white;
    border-bottom: 2.5px solid white;
    transform: rotate(-45deg) translate(2px, -2px);
    border-radius: 1px;
}

/* Active: gefuellt mit Akzent + sanfter Ring */
.bf-step.active .bf-step-num {
    background: var(--pp-accent, #1e40af);
    border-color: var(--pp-accent, #1e40af);
    color: white;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.18);
    transform: scale(1.06);
}

/* Label unter Step-Num */
.bf-step-label {
    font-size: 0.78rem;
    color: var(--bf-text-muted);
    text-align: center;
    line-height: 1.25;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bf-step.active .bf-step-label {
    color: var(--pp-accent, #1e40af);
    font-weight: 600;
}

.bf-step.done .bf-step-label {
    color: #475569;
}

/* Mobile: nur Step-Nums + Connector, Labels nur fuer active sichtbar */
@media (max-width: 600px) {
    .bf-steps-container {
        padding: 1.25rem 0 0.25rem;
    }
    .bf-step-label {
        font-size: 0.7rem;
        opacity: 0;
        max-height: 0;
        transition: opacity 0.2s ease, max-height 0.2s ease;
    }
    .bf-step.active .bf-step-label {
        opacity: 1;
        max-height: 1.5rem;
    }
    .bf-step:not(:last-child)::after {
        left: calc(50% + 18px);
        right: calc(-50% + 18px);
    }
    .bf-step-num {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
    .bf-step:not(:last-child)::after {
        top: 15px;
    }
}

/* ==========================================================================
   Hero Section (Schritt 1)
   ========================================================================== */

.bf-hero {
    background: var(--bf-accent-bg);
    border-bottom: 1px solid var(--bf-accent-border);
    padding: 16px 0;
    margin-bottom: 0;
}

.bf-hero-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bf-text);
    margin-bottom: 3px;
}

.bf-hero-subtitle {
    font-size: 0.8rem;
    color: var(--bf-text-muted);
    margin-bottom: 14px;
}

/* ==========================================================================
   Search
   ========================================================================== */

.bf-search-wrapper {
    position: relative;
    max-width: 600px;
}

.bf-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bf-text-light);
    font-size: 0.875rem;
    pointer-events: none;
}

.bf-search-input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    font-size: 14px;
    border: 1px solid var(--bf-accent-border);
    border-radius: 10px;
    background: var(--bf-bg-white);
    color: var(--bf-text);
    outline: none;
    transition: border-color 0.15s;
}

.bf-search-input:focus {
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 2px rgba(239, 159, 39, 0.15);
}

.bf-search-input::placeholder {
    color: var(--bf-text-light);
}

.bf-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bf-text-muted);
    cursor: pointer;
    padding: 4px;
}

/* Search Dropdown */
.bf-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bf-bg-white);
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
}

.bf-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--bf-border);
    transition: background 0.1s;
}

.bf-search-item:last-child {
    border-bottom: none;
}

.bf-search-item:hover {
    background: var(--bf-bg-hover);
}

.bf-search-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bf-text);
}

.bf-search-item-meta {
    font-size: 11px;
    color: var(--bf-text-muted);
}

/* ==========================================================================
   Section Titles
   ========================================================================== */

.bf-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bf-section-hint {
    font-size: 10px;
    color: var(--bf-text-light);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* ==========================================================================
   Top Cards Grid (Schritt 1)
   ========================================================================== */

.bf-topcards-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--bf-border);
}

.bf-topgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.bf-top-card {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    background: var(--bf-bg-white);
    padding: 10px 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s;
}

/* Color stripe at top */
.bf-top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--dept-color, var(--bf-accent));
}

.bf-top-card:hover {
    border-color: #ccc;
}

.bf-top-card.selected {
    border-width: 1.5px;
}

.bf-tc-dept {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.bf-tc-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--bf-text);
    line-height: 1.3;
    margin-bottom: 4px;
}

.bf-tc-meta {
    font-size: 10px;
    color: var(--bf-text-muted);
}

.bf-tc-meta i {
    font-size: 9px;
}

.bf-tc-slot {
    font-size: 10px;
    color: var(--bf-success-text);
}

.bf-tc-badge {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    align-items: center;
    justify-content: center;
}

.bf-tc-badge.visible {
    display: flex;
}

/* ==========================================================================
   Accordion: Departments & Categories (Schritt 1)
   ========================================================================== */

.bf-allservices-section {
    padding: 12px 0 0;
}

.bf-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Level 1: Department (Area) */
.bf-area-block {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-area-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--bf-bg-hover);
    cursor: pointer;
    transition: background 0.15s;
}

.bf-area-block.has-selection > .bf-area-head {
    background: var(--bf-accent-bg);
}

.bf-area-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.bf-area-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bf-area-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
}

.bf-area-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bf-area-selected-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    background: var(--bf-success-bg);
    color: var(--bf-success-text);
    font-weight: 600;
}

.bf-area-arrow {
    font-size: 14px;
    color: var(--bf-text-muted);
    transition: transform 0.2s;
}

.bf-area-head[aria-expanded="false"] .bf-area-arrow {
    transform: rotate(-90deg);
}

.bf-area-body {
    display: block;
}

.bf-area-head[aria-expanded="false"] + .bf-area-body {
    display: none;
}

.bf-empty-state {
    padding: 16px 14px;
    text-align: center;
}

/* Level 2: Category (Subcat) */
.bf-subcat-block {
    border-top: 1px solid var(--bf-border);
}

.bf-subcat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px 9px 18px;
    cursor: pointer;
    transition: background 0.1s;
}

.bf-subcat-head:hover {
    background: var(--bf-bg-hover);
}

.bf-subcat-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.bf-subcat-icon {
    font-size: 12px;
    color: var(--bf-text-muted);
}

.bf-subcat-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--bf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bf-subcat-block.has-selection > .bf-subcat-head .bf-subcat-name {
    color: var(--bf-accent-text);
}

.bf-subcat-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bf-subcat-count {
    font-size: 10px;
    color: var(--bf-text-light);
}

.bf-subcat-arrow {
    font-size: 12px;
    color: var(--bf-text-muted);
    transition: transform 0.2s;
}

.bf-subcat-head[aria-expanded="false"] .bf-subcat-arrow {
    transform: rotate(-90deg);
}

.bf-subcat-body {
    display: none;
}

.bf-subcat-head[aria-expanded="true"] + .bf-subcat-body {
    display: block;
}

/* Level 3: Service Row */
.bf-svc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px 10px 22px;
    border-top: 1px solid var(--bf-border);
}

.bf-svc-left {
    flex: 1;
    min-width: 0;
}

.bf-svc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bf-text);
    line-height: 1.3;
}

.bf-svc-meta {
    font-size: 11px;
    color: var(--bf-text-muted);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.bf-svc-meta i {
    font-size: 10px;
}

.bf-svc-divider {
    color: var(--bf-text-light);
}

.bf-svc-info-link {
    font-size: 11px;
    color: var(--bf-accent-text);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.bf-svc-info-link:hover {
    color: var(--bf-accent-dark);
}

.bf-svc-right {
    flex-shrink: 0;
}

/* Counter +/- */
.bf-counter {
    display: flex;
    align-items: center;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    overflow: hidden;
}

.bf-cnt-btn {
    width: 28px;
    height: 28px;
    background: var(--bf-bg-hover);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--bf-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    padding: 0;
    line-height: 1;
}

.bf-cnt-btn:hover:not(:disabled) {
    background: #f0f0ee;
}

.bf-cnt-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bf-cnt-val {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--bf-text);
    border-left: 1px solid var(--bf-border);
    border-right: 1px solid var(--bf-border);
}

.bf-cnt-val.has-value {
    color: var(--bf-success-text);
}

/* ==========================================================================
   Selection Pill (Auswahl-Zusammenfassung)
   ========================================================================== */

.bf-sel-pill {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 40px);
    padding: 10px 14px;
    background: var(--bf-success-bg);
    border: 1px solid var(--bf-success-border);
    border-radius: 10px;
    font-size: 12px;
    color: #27500a;
    line-height: 1.6;
    z-index: 90;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Bottom Navigation Bar
   ========================================================================== */

.bf-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bf-bg-white);
    border-top: 1px solid var(--bf-border);
    padding: 14px 0;
    z-index: 100;
}

.bf-bottom-inner,
.bf-bottom-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.bf-btn-back {
    flex: 1;
    padding: 11px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 14px;
    color: var(--bf-text-muted);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.bf-btn-back:hover {
    background: var(--bf-bg-hover);
    color: var(--bf-text);
    text-decoration: none;
}

.bf-btn-next {
    flex: 2;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: var(--bf-accent);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    /* BITV: weiss auf #ef9f27 waere nur ~2.1:1 - dunkle Schrift auf dem
       hellen Orange erreicht ~8:1 */
    color: var(--bf-text);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.bf-btn-next:hover:not(:disabled) {
    background: var(--bf-accent-dark);
    color: var(--bf-text);
    text-decoration: none;
}

.bf-btn-next:disabled,
.bf-btn-next[aria-disabled="true"] {
    background: #f0f0ee;
    color: var(--bf-text-light);
    cursor: default;
    pointer-events: none;
}

.bf-btn-book {
    flex: 1;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: var(--bf-success);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.bf-btn-book:hover:not(:disabled) {
    background: #1e8449;
    color: #fff;
}

/* ==========================================================================
   Page Header (Schritt 2-6)
   ========================================================================== */

.bf-page-header {
    padding: 14px 0;
    border-bottom: 1px solid var(--bf-border);
    margin-bottom: 0;
}

.bf-page-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bf-text);
    margin-bottom: 3px;
}

.bf-page-subtitle {
    font-size: 14px;
    color: var(--bf-text-muted);
}

/* ==========================================================================
   Department Info Block (Schritt 2)
   ========================================================================== */

.bf-dept-info-block {
    margin: 14px 0 0;
    padding: 12px 14px;
    background: var(--bf-info-bg);
    border: 1px solid var(--bf-info-border);
    border-left: 3px solid var(--bf-info);
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--bf-info-text);
    line-height: 1.5;
}

.bf-dept-info-block i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==========================================================================
   Warning Banner (Schritt 2)
   ========================================================================== */

.bf-warn-banner {
    margin: 14px 0 0;
    padding: 12px 14px;
    background: var(--bf-bb-bg);
    border: 1px solid var(--bf-accent-border);
    border-left: 3px solid var(--bf-accent);
    border-radius: 10px;
    font-size: 14px;
    color: #633806;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bf-warn-banner i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--bf-accent-text);
}

/* ==========================================================================
   Summary Chips
   ========================================================================== */

.bf-summary-chips,
.bf-ssc-chips,
.bf-selected-services-compact {
    padding: 14px 0 0;
}

.bf-ssc-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-text-muted);
    margin-bottom: 8px;
}

.bf-ssc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bf-sum-chip,
.bf-ssc-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
    /* BITV: dunkle Schrift - die Bereichsfarbe kommt nur als
       Rahmen/Hintergrund-Toenung (Inline-Style der Views) */
    color: var(--bf-text);
}

.bf-ssc-qty {
    margin-right: 3px;
}

/* ==========================================================================
   Documents Section (Schritt 2)
   ========================================================================== */

.bf-docs-section {
    padding: 14px 0 0;
}

.bf-ds-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bf-ds-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bf-ds-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
}

.bf-doc-list {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-doc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--bf-border);
}

.bf-doc-item:last-child {
    border-bottom: none;
}

.bf-doc-info {
    flex: 1;
    min-width: 0;
}

.bf-doc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
    line-height: 1.3;
}

.bf-doc-desc {
    font-size: 13px;
    color: var(--bf-text-muted);
    margin-top: 2px;
}

.bf-doc-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

.bf-badge-pflicht {
    background: var(--bf-bb-bg);
    color: var(--bf-accent-text);
    border: 1px solid var(--bf-accent-border);
}

.bf-badge-optional {
    background: var(--bf-bg);
    color: var(--bf-text-muted);
    border: 1px solid var(--bf-border);
}

/* ==========================================================================
   Confirmation Checkbox (Schritt 2)
   ========================================================================== */

.bf-confirm-wrap {
    padding: 0;
    margin-top: 14px;
}

.bf-confirm-box {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.15s;
}

.bf-confirm-box:hover {
    background: var(--bf-bg-hover);
}

.bf-confirm-box.checked {
    background: var(--bf-success-bg);
    border-color: var(--bf-success-border);
}

.bf-conf-cb {
    width: 18px;
    height: 18px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.bf-confirm-box.checked .bf-conf-cb {
    background: #639922;
    border-color: #639922;
}

.bf-conf-cb svg {
    width: 11px;
    height: 11px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.bf-confirm-box.checked .bf-conf-cb svg {
    opacity: 1;
}

.bf-conf-text {
    font-size: 14px;
    color: var(--bf-text);
    line-height: 1.5;
}

/* No-Docs State */
.bf-no-docs {
    background: var(--bf-success-bg);
    border: 1px solid var(--bf-success-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 14px 0 0;
}

.bf-no-docs i {
    font-size: 2.5rem;
    color: var(--bf-success-text);
}

.bf-no-docs-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bf-success-text);
    margin-top: 8px;
}

.bf-no-docs-text {
    font-size: 14px;
    color: var(--bf-success-text);
    margin-top: 4px;
}

/* ==========================================================================
   Calendar / Termin waehlen (Schritt 3)
   ========================================================================== */

.bf-dur-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bf-bb-bg);
    border: 1px solid var(--bf-accent-border);
    font-size: 12px;
    color: var(--bf-accent-text);
    font-weight: 600;
    margin-bottom: 3px;
}

/* Filter Section */
.bf-filter-section {
    margin-top: 0;
}

.bf-filter-direct {
    padding: 12px 0;
    border-bottom: 1px solid var(--bf-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bf-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bf-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bf-text-muted);
    min-width: 68px;
    flex-shrink: 0;
}

.bf-fchips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bf-fchip {
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--bf-border);
    background: var(--bf-bg-white);
    cursor: pointer;
    color: var(--bf-text-muted);
    transition: all 0.12s;
    white-space: nowrap;
}

.bf-fchip:hover {
    border-color: #ccc;
}

.bf-fchip.active {
    background: var(--bf-bb-bg);
    border-color: var(--bf-accent-border);
    color: var(--bf-accent-text);
}

/* More Filters Toggle */
.bf-more-toggle {
    font-size: 13px;
    color: var(--bf-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* Touch-Ziel: mindestens 32px hoch (WCAG 2.2 Target Size) */
    min-height: 32px;
    padding: 4px 0;
}

.bf-more-toggle i {
    transition: transform 0.2s;
}

.bf-more-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.bf-more-wrap {
    display: none;
    padding-top: 10px;
    border-top: 1px solid var(--bf-border);
    margin-top: 4px;
}

.bf-more-wrap[aria-hidden="false"] {
    display: block;
}

.bf-filter-reset {
    font-size: 12px;
    color: var(--bf-info-text);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    margin-left: auto;
}

/* Legend */
.bf-legend-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--bf-border);
    flex-wrap: wrap;
}

.bf-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--bf-text-muted);
}

.bf-legend-swatch {
    width: 28px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid;
    border-left-width: 3px;
    background: var(--bf-bg-hover);
}

.bf-legend-addr {
    font-size: 10px;
    color: var(--bf-text-light);
}

/* Date Blocks (Accordion) */
.bf-dates-wrap {
    padding: 12px 0 0;
}

.bf-date-block {
    margin-bottom: 10px;
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bf-bg-white);
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bf-date-block:has(.bf-slot-body.open) {
    border-color: var(--bf-accent-border);
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.bf-date-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.12s;
    /* Button-Resets: der Header ist ein <button> */
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    color: var(--bf-text);
}

.bf-date-head:hover {
    background: var(--bf-accent-bg);
}

.bf-date-day-label {
    font-weight: 700;
    font-size: 14px;
    min-width: 28px;
}

.bf-date-day-num {
    font-size: 14px;
}

.bf-date-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bf-accent-bg);
    color: var(--bf-accent-text);
    white-space: nowrap;
}

.bf-date-toggle {
    font-size: 12px;
    color: var(--bf-text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.bf-date-toggle.open {
    transform: rotate(90deg);
}

.bf-date-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
    flex: 1;
}

.bf-date-in {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.bf-date-in.soon {
    background: var(--bf-success-bg);
    color: var(--bf-success-text);
}

.bf-date-in.mid {
    background: var(--bf-bb-bg);
    color: var(--bf-accent-text);
}

.bf-date-in.far {
    background: var(--bf-bg);
    color: var(--bf-text-muted);
}

.bf-date-cnt {
    font-size: 11px;
    color: var(--bf-text-muted);
    white-space: nowrap;
}

/* Slot Body */
.bf-slot-body {
    display: none;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--bf-border);
    background: var(--bf-bg-hover);
}

.bf-slot-body.open {
    display: block;
}

.bf-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Slot Buttons with colored left border (Farbe = Standort) */
.bf-slot-btn {
    padding: 8px 14px;
    border: 1px solid var(--bf-border);
    border-left-width: 3px;
    border-left-style: solid;
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.08s;
    min-width: 72px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.bf-slot-btn:not(.selected):hover {
    background: var(--bf-accent-bg);
    border-color: var(--bf-accent-border);
    border-left-color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 24, 40, 0.1);
}

.bf-slot-btn.selected {
    font-weight: 700;
    /* BITV: Standortfarben sind kundenkonfiguriert, ihr Kontrast zu weisser
       Schrift ist nicht garantiert - Auswahl daher dunkel gefuellt (>= 14:1),
       die Standortfarbe bleibt als linke Kante (--slot-color via JS) */
    background: var(--bf-text);
    border-color: var(--bf-text);
    border-left-color: var(--slot-color, var(--bf-text));
    color: #fff;
    box-shadow: 0 3px 8px rgba(16, 24, 40, 0.25);
}

.bf-slot-capacity {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--bf-muted, #6c757d);
    line-height: 1.2;
    margin-top: 1px;
}

.bf-slot-btn.selected .bf-slot-capacity {
    color: inherit;
}

/* Location-specific slot colors (set via data-color or CSS classes) */
/* These are applied dynamically via inline style or JS */

/* ==========================================================================
   Booking Form (Schritt 4)
   ========================================================================== */

.bf-appt-mini {
    padding: 10px 0;
    border-bottom: 1px solid var(--bf-border);
}

.bf-am-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--bf-text-muted);
}

.bf-am-strong {
    color: var(--bf-text);
    font-weight: 600;
}

.bf-loc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Account Banner */
.bf-konto-banner {
    margin: 14px 0 0;
    border: 1px solid var(--bf-info-border);
    border-radius: 10px;
    background: var(--bf-info-bg);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.bf-konto-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bf-info-text);
}

.bf-konto-sub {
    font-size: 11px;
    color: var(--bf-info);
    line-height: 1.4;
    margin-top: 2px;
}

/* Form Sections */
.bf-form-section {
    padding: 14px 0 0;
}

.bf-form-sec-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bf-form-sec-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bf-border);
}

.bf-field-grp {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bf-form-row {
    display: flex;
    gap: 8px;
}

.bf-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bf-form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bf-text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.bf-req {
    /* BITV: das helle Akzent-Orange erreicht auf Weiss nur ~2.2:1 -
       der Pflicht-Stern braucht den dunklen Akzent-Ton (~6:1) */
    color: var(--bf-accent-text);
    font-size: 14px;
    line-height: 1;
}

.bf-opt-label {
    font-size: 10px;
    color: var(--bf-text-light);
    font-weight: 400;
}

.bf-form-input,
.bf-form-select {
    padding: 8px 11px;
    font-size: 14px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    color: var(--bf-text);
    outline: none;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bf-form-input:focus,
.bf-form-select:focus {
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 2px rgba(239, 159, 39, 0.1);
}

.bf-email-hint {
    font-size: 11px;
    color: var(--bf-info-text);
    margin-top: 3px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

/* Person Blocks */
.bf-person-block {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bf-pers-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: var(--bf-bg-hover);
    border-bottom: 1px solid var(--bf-border);
}

.bf-pnum {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bf-pnum-1 {
    background: var(--bf-bb-bg);
    color: var(--bf-accent-text);
}

.bf-pnum-2 {
    background: var(--bf-info-bg);
    color: var(--bf-info-text);
}

.bf-pers-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--bf-text-muted);
    flex: 1;
}

.bf-same-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--bf-text-muted);
    cursor: pointer;
}

.bf-same-cb {
    width: 14px;
    height: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: var(--bf-bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    flex-shrink: 0;
}

.bf-same-cb.checked {
    background: var(--bf-accent);
    border-color: var(--bf-accent);
}

.bf-pers-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* DSGVO / Privacy Checkbox */
.bf-dsgvo-wrap {
    padding: 0;
    margin-top: 14px;
}

.bf-dsgvo-box {
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.15s;
}

.bf-dsgvo-box:hover {
    background: var(--bf-bg-hover);
}

.bf-dsgvo-box.checked {
    background: var(--bf-success-bg);
    border-color: var(--bf-success-border);
}

.bf-dsgvo-text {
    font-size: 12px;
    color: var(--bf-text-muted);
    line-height: 1.5;
}

.bf-dsgvo-link {
    color: var(--bf-info-text);
    text-decoration: underline;
}

/* ==========================================================================
   Summary (Schritt 5)
   ========================================================================== */

.bf-eco-hint {
    margin: 12px 0 0;
    padding: 8px 14px;
    background: var(--bf-bg-hover);
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--bf-text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Summary Card */
.bf-sum-card {
    margin: 12px 0 0;
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-sum-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--bf-bg-hover);
    border-bottom: 1px solid var(--bf-border);
}

.bf-sum-card-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bf-text-muted);
}

.bf-sum-edit {
    font-size: 13px;
    color: var(--bf-info-text);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
}

.bf-termin-block {
    padding: 14px;
}

.bf-termin-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.bf-termin-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--bf-accent-border);
    border-radius: 10px;
    background: var(--bf-accent-bg);
    padding: 8px 12px;
    flex-shrink: 0;
    min-width: 58px;
}

.bf-t-day {
    font-size: 22px;
    font-weight: 600;
    color: var(--bf-accent-text);
    line-height: 1;
}

.bf-t-month {
    font-size: 10px;
    color: var(--bf-accent-text);
    margin-top: 2px;
}

.bf-t-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bf-t-time {
    font-size: 16px;
    font-weight: 600;
    color: var(--bf-text);
}

.bf-t-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--bf-text-muted);
}

.bf-t-row i {
    font-size: 11px;
    flex-shrink: 0;
}

.bf-tdur {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 20px;
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    font-size: 11px;
    color: var(--bf-text-muted);
}

/* Divider Section (in summary cards) */
.bf-div-sec {
    border-top: 1px solid var(--bf-border);
    padding: 10px 14px;
}

.bf-div-lbl {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bf-text-muted);
    margin-bottom: 7px;
}

.bf-vrow {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 3px 0;
}

.bf-vc {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.bf-vname {
    font-size: 14px;
    color: var(--bf-text);
    line-height: 1.4;
}

/* Personal data rows */
.bf-krow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
}

.bf-krow i {
    font-size: 13px;
    color: var(--bf-text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

.bf-klbl {
    font-size: 13px;
    color: var(--bf-text-muted);
    min-width: 82px;
    flex-shrink: 0;
}

.bf-kval {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
}

/* Buchen-Button in der Bottom-Bar (Schritt 5) - gleiche Geometrie wie
   bf-btn-next, aber gruen. BITV: weiss auf #27ae60 waere nur ~2.5:1,
   das dunklere Gruen erreicht ~4.6:1 */
.bf-bottom-form {
    flex: 2;
    display: flex;
}

.bf-btn-book {
    flex: 1;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: #1e7e34;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}

.bf-btn-book:hover:not(:disabled) {
    background: #186429;
}

.bf-btn-book:disabled {
    background: var(--bf-text-light);
    cursor: default;
}

.bf-cta-hint {
    font-size: 12px;
    color: var(--bf-text-muted);
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

/* ==========================================================================
   Hinweisseite (Schritt 6)
   ========================================================================== */

.bf-success-hero {
    padding: 24px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--bf-border);
}

.bf-success-ico {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bf-success-bg);
    border: 1px solid var(--bf-success-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.bf-success-ico i {
    font-size: 24px;
    color: var(--bf-success-text);
}

.bf-success-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--bf-text);
    margin-bottom: 4px;
}

.bf-success-sub {
    font-size: 14px;
    color: var(--bf-text-muted);
    line-height: 1.5;
}

/* Pending-Variante: Termin reserviert, E-Mail-Bestaetigung steht aus */
.bf-pending-ico {
    background: var(--bf-accent-bg);
    border-color: var(--bf-accent-border);
    color: var(--bf-accent-text);
}

/* E-Mail Confirmation Box */
.bf-email-box {
    margin: 14px 0 0;
    border: 1px solid var(--bf-accent-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-email-box-head {
    background: var(--bf-accent);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bf-email-box-head i {
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.bf-email-box-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bf-email-box-body {
    background: #fef9f0;
    padding: 14px;
}

.bf-ecs {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.bf-ecs:last-child {
    margin-bottom: 0;
}

.bf-ecs-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bf-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.bf-ecs-text {
    font-size: 14px;
    color: #633806;
    line-height: 1.5;
    flex: 1;
}

.bf-deadline-box {
    margin-top: 12px;
    padding: 9px 12px;
    background: var(--bf-warn-bg);
    border: 1px solid var(--bf-warn-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--bf-warn-text);
}

.bf-deadline-box i {
    font-size: 14px;
    color: var(--bf-warn);
    flex-shrink: 0;
}

/* Appointment Card */
.bf-appt-card {
    margin: 12px 0 0;
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-ac-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--bf-bg-hover);
    border-bottom: 1px solid var(--bf-border);
}

.bf-ac-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bf-text-muted);
}

.bf-ac-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--bf-info-text);
}

.bf-ac-body {
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Termin-Checkliste (mitzubringende Unterlagen, Schritt 6) */
.bf-checklist-card {
    margin: 12px 0 0;
    border: 1px solid var(--bf-success-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-cl-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bf-success-bg);
    border-bottom: 1px solid var(--bf-success-border);
}

.bf-cl-head i {
    font-size: 16px;
    color: var(--bf-success-text);
    flex-shrink: 0;
}

.bf-cl-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-success-text);
}

.bf-cl-body {
    padding: 6px 14px;
}

.bf-cl-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 0;
}

.bf-cl-item + .bf-cl-item {
    border-top: 1px solid var(--bf-border);
}

.bf-cl-item i {
    font-size: 15px;
    color: var(--bf-success-text);
    flex-shrink: 0;
    margin-top: 1px;
}

.bf-cl-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bf-cl-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text);
    line-height: 1.4;
}

.bf-cl-pflicht {
    font-weight: 400;
    color: var(--bf-text-muted);
}

.bf-cl-desc {
    font-size: 13px;
    color: var(--bf-text-muted);
    line-height: 1.4;
}

/* Info Box (post_booking_info, additional_info) */
.bf-info-box {
    margin: 12px 0 0;
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}

.bf-ib-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    background: var(--bf-bg-hover);
    border-bottom: 1px solid var(--bf-border);
}

.bf-ib-head i {
    font-size: 13px;
    color: var(--bf-text-muted);
}

.bf-ib-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bf-text-muted);
}

.bf-ib-body {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--bf-text);
    line-height: 1.6;
}

.bf-ib-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--bf-info-text);
    margin-top: 8px;
    text-decoration: none;
}

/* Actions (ics, new booking) */
.bf-actions-wrap {
    padding: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bf-btn-ical {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 14px;
    color: var(--bf-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    transition: background 0.15s;
}

.bf-btn-ical:hover {
    background: var(--bf-bg-hover);
    color: var(--bf-text-muted);
}

.bf-btn-new {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 14px;
    color: var(--bf-info-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    transition: background 0.15s;
}

.bf-btn-new:hover {
    background: var(--bf-info-bg);
    color: var(--bf-info-text);
}

/* ==========================================================================
   Service Info Modal
   ========================================================================== */

.bf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.bf-modal-overlay.visible {
    display: flex;
}

.bf-modal {
    background: var(--bf-bg-white);
    border-radius: 12px 12px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--bf-border);
}

.bf-modal-handle {
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--bf-border);
    margin: 12px auto;
}

.bf-modal-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 0 20px 14px;
}

.bf-modal-dept {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.bf-modal-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--bf-text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.bf-modal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.bf-modal-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    color: var(--bf-text-muted);
}

.bf-modal-sec-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-text-muted);
    margin-bottom: 6px;
}

.bf-modal-desc {
    font-size: 13px;
    color: var(--bf-text);
    line-height: 1.6;
    margin-bottom: 14px;
}

.bf-modal-notice {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bf-info-bg);
    border: 1px solid var(--bf-info-border);
    font-size: 12px;
    color: var(--bf-info-text);
    line-height: 1.5;
    margin-top: 8px;
}

.bf-modal-footer {
    flex-shrink: 0;
    padding: 12px 20px;
    border-top: 1px solid var(--bf-border);
    display: flex;
    gap: 8px;
}

.bf-modal-btn-close {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 14px;
    color: var(--bf-text-muted);
}

.bf-modal-btn-select {
    flex: 2;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: var(--bf-accent);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: background 0.15s;
}

.bf-modal-btn-select:hover {
    background: var(--bf-accent-dark);
}

/* Qty Step */
.bf-qty-counter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.bf-qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--bf-border);
    background: var(--bf-bg);
    font-size: 24px;
    cursor: pointer;
    color: var(--bf-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}

.bf-qty-btn:hover {
    background: #e8e8e6;
}

.bf-qty-val {
    font-size: 28px;
    font-weight: 600;
    color: var(--bf-text);
    min-width: 36px;
    text-align: center;
}

.bf-more-choice {
    display: flex;
    gap: 8px;
}

.bf-more-btn {
    flex: 1;
    padding: 9px;
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    background: var(--bf-bg-white);
    cursor: pointer;
    font-size: 13px;
    color: var(--bf-text-muted);
    transition: all 0.12s;
    text-align: center;
}

.bf-more-btn:hover {
    border-color: #ccc;
    background: var(--bf-bg-hover);
}

.bf-more-btn.selected {
    background: var(--bf-success-bg);
    border-color: var(--bf-success-border);
    color: var(--bf-success-text);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.bf-footer {
    background: #343a40;
    color: #adb5bd;
    padding: 20px 0;
    margin-top: auto;
}

.bf-footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.bf-footer-link:hover {
    color: var(--bf-accent);
}

.bf-footer-divider {
    color: #6c757d;
    margin: 0 4px;
}

/* ==========================================================================
   Appointment Card Details (Hinweisseite)
   ========================================================================== */

.bf-ac-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--bf-accent-border);
    border-radius: 10px;
    background: var(--bf-accent-bg);
    padding: 8px 12px;
    flex-shrink: 0;
    min-width: 58px;
}

.bf-ac-day {
    font-size: 22px;
    font-weight: 600;
    color: var(--bf-accent-text);
    line-height: 1;
}

.bf-ac-month {
    font-size: 10px;
    color: var(--bf-accent-text);
    margin-top: 2px;
}

.bf-ac-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bf-ac-time {
    font-size: 16px;
    font-weight: 600;
    color: var(--bf-text);
}

.bf-ac-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--bf-text-muted);
}

.bf-ac-row i {
    font-size: 13px;
    flex-shrink: 0;
}

/* ==========================================================================
   Form Card (Schritt 4)
   ========================================================================== */

.bf-form-card {
    background: var(--bf-bg-white);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    padding: 8px 24px 24px;
    margin: 16px 0 24px;
}

.bf-form-header {
    padding: 14px 0;
    border-bottom: 1px solid var(--bf-border);
    margin-bottom: 14px;
}

.bf-form-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bf-text);
    margin-bottom: 3px;
}

.bf-form-subtitle {
    font-size: 12px;
    color: var(--bf-text-muted);
}

.bf-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--bf-border);
}

.bf-section-desc {
    font-size: 13px;
    color: var(--bf-text-muted);
    margin-bottom: 10px;
}

/* ==========================================================================
   Summary: Additional Sections
   ========================================================================== */

.bf-kontakt-block {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   Fokus-Sichtbarkeit (BITV 2.4.7): einheitlicher, kraeftiger Fokusring
   fuer alle Wizard-Interaktiven - der reine Border-Farbwechsel der
   Inputs war als Fokusanzeige zu schwach
   ========================================================================== */

.bf-btn-next:focus-visible,
.bf-btn-back:focus-visible,
.bf-btn-book:focus-visible,
.bf-slot-btn:focus-visible,
.bf-date-head:focus-visible,
.bf-confirm-box:focus-visible,
.bf-btn-ical:focus-visible,
.bf-btn-new:focus-visible,
.bf-more-toggle:focus-visible,
.bf-sum-edit:focus-visible,
.bf-chip:focus-visible,
.bf-load-more:focus-visible {
    outline: 2px solid var(--pp-accent, #1e40af);
    outline-offset: 2px;
}

.bf-form-input:focus-visible,
.bf-form-select:focus-visible,
.bf-search-input:focus-visible {
    outline: 2px solid var(--pp-accent, #1e40af);
    outline-offset: 1px;
}

/* ==========================================================================
   bf-hidden utility
   ========================================================================== */

.bf-hidden {
    display: none !important;
}

/* ==========================================================================
   Legacy styles (for backward compatibility)
   ========================================================================== */

.apt-public-page {
    background: var(--bf-bg);
    min-height: 100vh;
}

.apt-slot-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.apt-slot-btn-selected {
    border-color: var(--bf-accent);
    background: var(--bf-accent);
    color: white;
}

.apt-booking-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bf-accent);
    letter-spacing: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .bf-bottom-bar,
    .bf-sel-pill,
    .bf-header,
    .bf-footer,
    .pp-footer,
    .bf-steps-container {
        display: none !important;
    }

    .bf-main {
        padding: 0;
    }
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .bf-topgrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bf-steps {
        padding: 8px 0;
    }

    .bf-step-num {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .bf-step-label {
        font-size: 8px;
    }

    .bf-hero-title {
        font-size: 1.1rem;
    }

    .bf-page-title {
        font-size: 1.1rem;
    }

    .bf-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .bf-filter-label {
        min-width: auto;
    }

    .bf-book-bar-top {
        flex-direction: column;
        align-items: stretch;
    }

    .bf-termin-main {
        flex-direction: column;
    }

    .bf-ac-body {
        flex-direction: column;
    }

    .bf-form-row {
        flex-direction: column;
    }

    .bf-bottom-inner,
    .bf-bottom-nav {
        padding: 0 12px;
    }
}

@media (max-width: 576px) {
    .bf-topgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .bf-tc-name {
        font-size: 10px;
    }

    .bf-tc-dept {
        font-size: 8px;
    }

    .bf-slot-grid {
        gap: 4px;
    }

    .bf-slot-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 54px;
    }

    .bf-svc-row {
        padding: 8px 10px 8px 16px;
    }

    .bf-sel-pill {
        bottom: 60px;
        width: calc(100% - 20px);
        font-size: 11px;
    }
}

/* Touch-Optimierung */
@media (hover: none) and (pointer: coarse) {
    .bf-slot-btn {
        min-height: 44px;
        padding: 8px 12px;
    }

    .bf-cnt-btn {
        width: 34px;
        height: 34px;
    }

    .bf-cnt-val {
        width: 34px;
        height: 34px;
    }

    .bf-fchip {
        padding: 6px 14px;
    }

    .bf-top-card {
        padding: 12px 10px;
    }

    .bf-confirm-box,
    .bf-dsgvo-box {
        padding: 14px 16px;
    }
}

/* ==========================================================================
   Schritt 1: Neue Vorgangs-Auswahl (apt-* Klassen, ersetzt das Akkordeon-Konzept)
   ========================================================================== */

.apt-wizard {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.apt-intro {
    margin: 0 auto 1.75rem;
    text-align: center;
    max-width: 720px;
}
.apt-intro-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.apt-intro-subtitle {
    color: var(--bf-text-muted);
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.5;
}

.apt-search {
    position: relative;
    max-width: 640px;
    margin: 0 auto 1.5rem;
}
.apt-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
    pointer-events: none;
}
.apt-search-input {
    width: 100%;
    padding: 0.95rem 3rem 0.95rem 3rem;
    font-size: 1.02rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.apt-search-input:focus {
    border-color: var(--pp-accent, #1e40af);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}
.apt-search-clear {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--bf-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}
.apt-search-clear:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.apt-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.apt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.apt-chip i { color: #94a3b8; }
.apt-chip:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.apt-chip.active {
    background: var(--pp-accent, #1e40af);
    border-color: var(--pp-accent, #1e40af);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}
.apt-chip.active i { color: rgba(255, 255, 255, 0.9); }
.apt-chip-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.apt-chip-count {
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.apt-chip.active .apt-chip-count {
    background: rgba(255, 255, 255, 0.22);
}

.apt-section {
    margin-bottom: 2.5rem;
}
.apt-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.apt-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.apt-section-count {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 0.4rem;
}

/* Blitzbuchung: pro Bereich eine Zeile mit Top 5 (Counter + Buchen-Button pro Card) */
.apt-quickbook-icon {
    color: #f59e0b;
}
.apt-quickbook {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apt-quickbook-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.apt-quickbook-row-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.1rem;
}
.apt-quickbook-row-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--apt-qb-accent, var(--pp-accent, #1e40af));
    flex-shrink: 0;
}
.apt-quickbook-row-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.apt-quickbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.7rem;
}

.apt-quick-card {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 0.95rem 0.8rem 1.05rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}
.apt-quick-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--apt-qb-accent, var(--pp-accent, #1e40af));
    opacity: 0.6;
}
.apt-quick-card:hover {
    border-color: var(--apt-qb-accent, var(--pp-accent, #1e40af));
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.apt-quick-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-height: 0;
}
.apt-quick-card-name {
    font-size: 0.93rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.apt-quick-card-meta {
    color: var(--bf-text-muted);
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.apt-quick-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.apt-quick-card-meta .apt-svc-info {
    font-size: 0.78rem;
}

.apt-quick-card-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    justify-content: space-between;
}

.apt-quick-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.15rem;
}
.apt-quick-counter .apt-cnt-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
}
.apt-quick-counter .apt-cnt-val {
    min-width: 26px;
    height: 28px;
    font-size: 0.9rem;
    font-weight: 700;
}

.apt-quick-book-btn {
    flex: 1;
    background: var(--apt-qb-accent, var(--pp-accent, #1e40af));
    color: white;
    border: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: filter 0.15s, transform 0.15s;
    white-space: nowrap;
}
.apt-quick-book-btn:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}
.apt-quick-book-btn.is-firing {
    pointer-events: none;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .apt-quick-card-actions { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .apt-quick-counter { justify-content: space-between; }
    .apt-quick-book-btn { width: 100%; }
}

/* Service-Groups: Bereich + Kategorien + Liste */
.apt-svc-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.apt-svc-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.apt-svc-group.apt-hidden {
    display: none;
}
/* Bereich-Header (klickbar, akkordeon-style) */
.apt-group-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.5rem 0.65rem 0.25rem;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--apt-group-accent, #e2e8f0);
    margin-bottom: 0.25rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: inherit;
    transition: background-color 0.15s;
    border-radius: 6px 6px 0 0;
}
.apt-group-header:hover {
    background-color: rgba(15, 23, 42, 0.025);
}
.apt-group-header:focus-visible {
    outline: 2px solid var(--apt-group-accent, var(--pp-accent, #1e40af));
    outline-offset: 2px;
}
.apt-group-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--apt-group-accent, var(--pp-accent, #1e40af));
    flex-shrink: 0;
}
.apt-group-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
    min-width: 0;
    text-align: left;
}
.apt-group-count {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.apt-group-arrow {
    color: #94a3b8;
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.apt-svc-group[aria-expanded="true"] .apt-group-arrow {
    transform: rotate(180deg);
    color: var(--apt-group-accent, var(--pp-accent, #1e40af));
}
.apt-svc-group-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 0.35rem;
}
.apt-svc-group[aria-expanded="false"] > .apt-svc-group-body {
    display: none;
}

/* Kategorie-Header (klickbar, akkordeon-style) */
.apt-svc-cat-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.apt-svc-cat-group.apt-hidden {
    display: none;
}
.apt-cat-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    color: var(--bf-text-muted);
    font-size: 0.83rem;
    font-weight: 600;
    padding: 0.45rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.15s, border-color 0.15s;
}
.apt-cat-header:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.apt-cat-header:focus-visible {
    outline: 2px solid var(--pp-accent, #1e40af);
    outline-offset: 2px;
}
.apt-cat-icon {
    color: #94a3b8;
    font-size: 0.95rem;
}
.apt-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-cat-count {
    color: var(--bf-text-muted); /* BITV: #94a3b8 war nur 2.45:1 */
    font-weight: 500;
    font-size: 0.78rem;
}
.apt-cat-arrow {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.apt-svc-cat-group[aria-expanded="true"] .apt-cat-arrow {
    transform: rotate(180deg);
    color: var(--pp-accent, #1e40af);
}
.apt-svc-cat-group[aria-expanded="false"] > .apt-svc-list {
    display: none;
}

/* Service-List (kompakte Listenansicht innerhalb einer Kategorie) */
.apt-svc-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.apt-svc-item {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 1rem 0.7rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    overflow: hidden;
}
.apt-svc-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.apt-svc-item.is-selected {
    border-color: var(--apt-item-accent, var(--pp-accent, #1e40af));
    background-color: rgba(30, 64, 175, 0.025);
}
.apt-svc-item.is-selected .apt-svc-item-bar {
    background: var(--apt-item-accent, var(--pp-accent, #1e40af));
    width: 4px;
}
.apt-svc-item.apt-hidden {
    display: none;
}

.apt-svc-item-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--apt-item-accent, var(--pp-accent, #1e40af));
    transition: width 0.2s ease;
}

.apt-svc-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.apt-svc-item-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1;
}
.apt-svc-item-dept {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.apt-svc-item-cat {
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.apt-svc-item-cat::before {
    content: "·";
    margin-right: 0.65rem;
    color: #cbd5e1;
}
.apt-svc-item-tags .apt-svc-item-cat:first-child::before {
    display: none;
}

.apt-svc-item-name {
    font-size: 0.97rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.apt-svc-item-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}
.apt-svc-item-duration {
    color: var(--bf-text-muted);
    font-size: 0.83rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.apt-svc-info {
    background: none;
    border: none;
    padding: 0.25rem 0.4rem;
    color: var(--pp-accent, #1e40af);
    cursor: pointer;
    font-size: 0.83rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.15s;
}
.apt-svc-info:hover {
    background: rgba(30, 64, 175, 0.08);
    text-decoration: none;
}

.apt-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.2rem;
}
.apt-cnt-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #475569;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.apt-cnt-btn:hover:not(:disabled) {
    background: var(--pp-accent, #1e40af);
    color: white;
}
.apt-cnt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.apt-cnt-val {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}
.apt-cnt-val.has-value {
    color: var(--pp-accent, #1e40af);
}


.apt-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bf-text-muted);
}
.apt-empty-icon {
    font-size: 3rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.85rem;
}
.apt-empty h3 {
    color: #0f172a;
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}
.apt-empty p {
    margin: 0;
    color: var(--bf-text-muted);
}

@media (max-width: 700px) {
    .apt-intro-title { font-size: 1.45rem; }
    .apt-intro-subtitle { font-size: 0.95rem; }
    .apt-search-input { padding: 0.85rem 3rem 0.85rem 2.85rem; font-size: 0.97rem; }

    /* Mobile: Listen-Item stackt vertikal */
    .apt-svc-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.85rem 1rem 0.85rem 1.15rem;
    }
    .apt-svc-item-actions {
        gap: 0.5rem;
        justify-content: space-between;
    }
    .apt-svc-item-dept,
    .apt-svc-item-cat { max-width: none; }

    .apt-cnt-btn { width: 32px; height: 32px; font-size: 1.05rem; }
    .apt-cnt-val { min-width: 32px; height: 32px; }
}

/* ==========================================================================
   Termin-Detailseite (view.php) - apt-* Komponenten
   Die View nutzte diese Klassen von Beginn an, gestylt waren sie nie.
   ========================================================================== */

.apt-card {
    background: var(--bf-bg-white, #fff);
    border: 1px solid var(--bf-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    overflow: hidden;
}

.apt-card .card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--bf-border, #e5e7eb);
    background: var(--bf-bg-white, #fff);
}

.apt-card .card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--bf-text, #1f2937);
}

.apt-card .card-header i {
    color: var(--bf-accent, #ef9f27);
    margin-right: 6px;
}

.apt-card .card-body {
    padding: 8px 20px;
}

.apt-card .card-body.text-center {
    padding: 24px 20px;
}

/* Detail-Zeilen (Label links, Wert rechts) */
.apt-detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bf-bg-hover, #f3f4f6);
}

.apt-detail-row:last-child {
    border-bottom: none;
}

.apt-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bf-text-muted, #6b7280);
}

.apt-detail-value {
    font-size: 14px;
    color: var(--bf-text, #1f2937);
}

/* Aktionen-Sidebar */
.apt-action-card {
    background: var(--bf-bg-white, #fff);
    border: 1px solid var(--bf-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    padding: 20px;
}

.apt-action-card h3,
.apt-action-card h4 {
    color: var(--bf-text, #1f2937);
}

.apt-action-card .btn i {
    margin-right: 6px;
}

.apt-action-card a[href^="tel:"],
.apt-action-card a[href^="mailto:"] {
    color: var(--bf-accent-text, #854f0b);
    text-decoration: none;
}

.apt-action-card a[href^="tel:"]:hover,
.apt-action-card a[href^="mailto:"]:hover {
    text-decoration: underline;
}

/* Erfolgs-Icon nach Buchung */
.apt-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.apt-status-icon-success {
    background: var(--bf-success-bg, #dcfce7);
    color: var(--bf-success-text, #15803d);
}

.apt-status-icon-warning {
    background: #fef3c7;
    color: #b45309;
}

.apt-status-icon-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.apt-status-icon-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.apt-status-icon-large {
    width: 80px;
    height: 80px;
    font-size: 40px;
}

.apt-status-icon-small {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 0;
}

/* Buchungsnummer */
.apt-booking-number {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--bf-text, #1f2937);
}

/* Leere-Zustaende (services.php nutzt apt-empty) */
.apt-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--bf-text-muted, #6b7280);
}

.apt-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    color: var(--bf-border, #d1d5db);
}

/* Mobile: Label ueber Wert */
@media (max-width: 575px) {
    .apt-detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Druckansicht: nur Termindaten */
@media print {
    .apt-no-print,
    .bf-steps-container,
    header,
    footer,
    nav {
        display: none !important;
    }

    .apt-card {
        border: 1px solid #999;
        box-shadow: none;
        break-inside: avoid;
    }
}
