/* booking.css — Calendly-style two-column booking picker.
 *
 * Used by the member (/buchungen) and public (/coaching) flows, and reused by the
 * admin booking views in a later wave. Class names are kept generic and reusable
 * (.cal-grid, .cal-day, .cal-slot, .booking-panel) and styled with the brand
 * design tokens from style.css. */

/* ── Layout shell ─────────────────────────────────────────────────────── */
.booking-shell {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: var(--space-6);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ── Left: info panel ─────────────────────────────────────────────────── */
.booking-panel {
    padding: var(--space-6);
    border-right: 1px solid var(--color-border);
    background: var(--cream, #f8f4ef);
}

.booking-panel-host {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.booking-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--color-white);
    border: 2px solid var(--color-white);
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
}

.booking-host-name {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.booking-panel-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.25;
    color: var(--primary);
    margin: 0 0 var(--space-4);
}

.booking-meta-list {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.booking-meta-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.92rem;
    color: var(--color-text-light);
}

.booking-meta-list li span[aria-hidden] {
    font-size: 1.05rem;
    width: 1.4em;
    text-align: center;
    flex: 0 0 auto;
}

.booking-panel-bio {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

/* ── Right: calendar + slots ──────────────────────────────────────────── */
.booking-main {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.cal-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: var(--radius);
    font-size: 1.2rem;
    line-height: 1;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cal-nav-btn:hover:not(:disabled) {
    background: var(--cream, #f8f4ef);
    border-color: var(--primary-light);
}

.cal-nav-btn:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.cal-month-label {
    font-weight: 600;
    color: var(--color-text);
    min-width: 9.5em;
    text-align: center;
    font-size: 0.98rem;
}

.cal-loading {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0;
    transition: opacity 0.15s ease;
}

#kalender-picker.htmx-request .cal-loading { opacity: 1; }
#kalender-picker.htmx-request .cal-grid { opacity: 0.45; pointer-events: none; transition: opacity 0.15s ease; }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.cal-weekdays span {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-1);
}

.cal-day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
}

.cal-day-empty {
    background: transparent;
    border: none;
}

.cal-day-disabled {
    color: var(--color-text-muted);
    opacity: 0.45;
    cursor: not-allowed;
}

.cal-day-available {
    color: var(--primary);
    background: var(--cream, #f8f4ef);
    border-color: var(--color-border);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.cal-day-available:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--color-white);
}

.cal-day-available:active { transform: scale(0.96); }

.cal-day-selected,
.cal-day-selected:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--color-white);
    box-shadow: var(--shadow);
}

.cal-day-today-dot {
    width: 5px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--gold, #c39641);
    margin-top: 2px;
}

.cal-day-selected .cal-day-today-dot { background: var(--color-white); }

/* ── Slot list (a chosen day's available times) ───────────────────────── */
.booking-slots-wrap {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-4);
    min-height: 64px;
}

.booking-slots-hint {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin: var(--space-4) 0;
}

.booking-slots-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
    text-transform: capitalize;
}

.cal-slot-list {
    display: grid;
    gap: var(--space-2);
    max-height: 320px;
    overflow-y: auto;
    padding-right: var(--space-1);
}

.cal-slot {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--color-white);
    border: 1.5px solid var(--primary-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.cal-slot:hover {
    background: var(--primary);
    color: var(--color-white);
}

.cal-slot:active { transform: scale(0.99); }

.booking-tz-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0;
}

/* ── Mobile: stack panels ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .booking-shell {
        grid-template-columns: 1fr;
    }
    .booking-panel {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    .booking-panel-title { font-size: 1.25rem; }
    .cal-month-label { min-width: 7.5em; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Admin booking views — additive styles for the weekly grid + agenda list.
   Reuses the brand tokens; loaded via admin/base.html.
   ═══════════════════════════════════════════════════════════════════════ */

/* View toggle (Wochenansicht / Liste) */
.admin-bk-viewtoggle {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-white);
}
.admin-bk-viewtoggle button {
    appearance: none;
    border: none;
    background: transparent;
    padding: var(--space-2) var(--space-4);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.admin-bk-viewtoggle button + button { border-left: 1px solid var(--color-border); }
.admin-bk-viewtoggle button[aria-pressed="true"] {
    background: var(--primary);
    color: var(--color-white);
}
.admin-bk-viewtoggle button:hover:not([aria-pressed="true"]) {
    background: var(--cream, #f8f4ef);
}

/* Weekly grid container */
.admin-bk-grid-head,
.admin-bk-grid-row {
    display: grid;
    grid-template-columns: 64px repeat(7, minmax(0, 1fr));
}
.admin-bk-grid-head {
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 1;
}
.admin-bk-daycol {
    padding: var(--space-2) var(--space-2);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
    border-left: 1px solid var(--color-border-light);
}
.admin-bk-daycol-today {
    background: color-mix(in srgb, var(--primary-light) 12%, transparent);
    border-radius: var(--radius) var(--radius) 0 0;
}
.admin-bk-daycol-date {
    color: var(--color-text);
    font-size: 0.92rem;
    margin-top: 2px;
}
.admin-bk-grid-row { border-bottom: 1px solid var(--color-border-light); min-height: 46px; }
.admin-bk-hourlabel {
    padding: var(--space-1) var(--space-2);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    align-self: start;
    white-space: nowrap;
}
.admin-bk-cell {
    border-left: 1px solid var(--color-border-light);
    padding: 2px;
}
.admin-bk-cell-today { background: color-mix(in srgb, var(--primary-light) 7%, transparent); }

/* Booking block in the grid — now a clickable link */
.admin-bk-block {
    display: block;
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.06s ease, filter 0.12s ease;
}
.admin-bk-block:hover { filter: brightness(1.08); transform: translateY(-1px); }
.admin-bk-block:active { transform: translateY(0); }
.admin-bk-block-time { opacity: 0.85; font-weight: 600; }
.admin-bk-block-pending { outline: 2px dashed rgba(255, 255, 255, 0.6); outline-offset: -3px; }

/* Empty state */
.admin-bk-empty {
    padding: var(--space-8) var(--space-4);
    text-align: center;
    color: var(--color-text-muted);
}
.admin-bk-empty svg {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--space-3);
    color: var(--color-border);
    display: block;
}

/* Agenda status filter pills */
.admin-bk-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.admin-bk-filter {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full, 999px);
    border: 1px solid var(--color-border);
    background: var(--color-white);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-bk-filter:hover { border-color: var(--primary-light); }
.admin-bk-filter-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--color-white);
}

/* Agenda row date pill */
.admin-bk-datepill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius);
    background: var(--cream, #f8f4ef);
    border: 1px solid var(--color-border);
    line-height: 1.1;
}
.admin-bk-datepill-day { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.admin-bk-datepill-mon { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.admin-bk-typedot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full, 999px);
    flex: 0 0 auto;
    vertical-align: middle;
    margin-right: 6px;
}

/* Tighten the timezone hint under the datetime input */
.admin-bk-tz {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: var(--space-1) 0 0;
}
