/* ============================================================================
   Terminfinder — Abstimmungsscreen (Frontend)
   Nutzt die Tokens des Site Packages (--vd-*), damit die Seite wie der Rest
   der Website aussieht. Klassennamen sind mit tf- gepraeft.
   ========================================================================== */

.tf-section { padding: 96px 0 120px; }

.tf-head {
    max-width: 900px;
    margin-bottom: 32px;
}

.tf-title { margin: 10px 0 16px; }

.tf-description {
    max-width: 760px;
    margin: 0;
}

.tf-alert {
    padding: 14px 18px;
    margin-bottom: 24px;
    border-left: 4px solid var(--vd-border-strong);
    background: var(--vd-bg-elev);
    color: var(--vd-fg);
    font-weight: 500;
}
.tf-alert-ok { border-left-color: var(--vd-success); background: #E9F6EE; }
.tf-alert-error { border-left-color: var(--vd-danger); background: #FBE9E8; }
.tf-alert-info { border-left-color: var(--vd-blue-500); background: var(--vd-blue-50); }

.tf-current-note {
    margin: 0 0 18px;
    font-size: var(--vd-text-md);
    color: var(--vd-fg);
}
.tf-current-saved {
    display: inline;
    color: var(--vd-fg-subtle);
    font-size: var(--vd-text-sm);
}

.tf-form { margin: 0; }

.tf-table-wrap {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius-md);
    background: var(--vd-bg-elev);
    -webkit-overflow-scrolling: touch;
}

.tf-table-wrap:focus-visible {
    outline: 2px solid var(--vd-blue-500);
    outline-offset: 2px;
}

.tf-scroll-hint {
    display: none;
    margin: 0 0 8px;
    font-size: var(--vd-text-xs);
    color: var(--vd-fg-subtle);
}

.tf-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--vd-font-sans);
    font-size: var(--vd-text-sm);
}

.tf-table th,
.tf-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--vd-border);
    text-align: center;
    vertical-align: middle;
}

.tf-table thead th {
    position: sticky;
    top: 0;
    background: var(--vd-bg-sunken);
    vertical-align: bottom;
    font-weight: 700;
    color: var(--vd-fg);
    z-index: 1;
}

.tf-col-name {
    position: sticky;
    left: 0;
    min-width: 190px;
    max-width: 260px;
    text-align: left;
    background: var(--vd-bg-elev);
    z-index: 2;
    font-weight: 600;
}

/* Die Zelle ist ein th und .tf-table th zentriert — hier ausdruecklich links,
   mit hoeherer Spezifitaet als .tf-table th. */
.tf-table .tf-col-name {
    text-align: left;
}

.tf-table thead .tf-col-name { z-index: 3; }

.tf-name { display: inline-block; }

.tf-voted {
    display: inline-block;
    margin-left: 6px;
    color: var(--vd-success);
    font-weight: 700;
}

.tf-option-date {
    display: block;
    font-size: var(--vd-text-sm);
    white-space: nowrap;
}

.tf-option-time {
    display: block;
    font-weight: 400;
    font-size: var(--vd-text-xs);
    color: var(--vd-fg-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.tf-option-title {
    display: block;
    font-weight: 400;
    font-size: var(--vd-text-xs);
    color: var(--vd-fg-brand);
    margin-top: 4px;
}

.tf-cell { min-width: 96px; }

.tf-row-current .tf-col-name,
.tf-row-current .tf-cell {
    background: var(--vd-sun-50);
}

.tf-row-current .tf-col-name {
    box-shadow: inset 3px 0 0 var(--vd-sun-500);
}

.tf-table tfoot th,
.tf-table tfoot td {
    border-bottom: 0;
    background: var(--vd-bg-sunken);
    font-size: var(--vd-text-xs);
    color: var(--vd-fg-muted);
}

.tf-table tfoot .tf-col-name { background: var(--vd-bg-sunken); }

.tf-count { font-weight: 700; color: var(--vd-fg); }

.tf-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
}
.tf-mark-yes { color: var(--vd-success); font-weight: 700; }
.tf-mark-no { color: var(--vd-ink-300); }

/* Natives Kontrollkaestchen: accent-color faerbt es in der Markenfarbe, ohne
   eigenes Markup und ohne die Bedienbarkeit nachzubauen. */
.tf-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 32px;
    min-height: 32px;
}

.tf-checkbox {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--vd-blue-500);
    cursor: pointer;
}

.tf-hint {
    margin: 16px 0 0;
    color: var(--vd-fg-subtle);
    font-size: var(--vd-text-sm);
}

.tf-actions { margin-top: 24px; }

.tf-chooser {
    background: var(--vd-bg-elev);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius-md);
    padding: 28px;
    margin-bottom: 32px;
}

.tf-chooser h2 { margin: 0 0 8px; }

.tf-chooser-text { margin: 0 0 20px; color: var(--vd-fg-muted); }

.tf-chooser-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.tf-label {
    display: block;
    width: 100%;
    font-weight: 600;
    font-size: var(--vd-text-sm);
    margin-bottom: -8px;
}

.tf-select {
    min-width: 280px;
    padding: 13px 14px;
    border: 1.5px solid var(--vd-control-border);
    border-radius: var(--vd-radius-xs);
    background: var(--vd-ink-0);
    color: var(--vd-fg);
    font-family: var(--vd-font-sans);
    font-size: var(--vd-text-base);
}

.tf-select:focus-visible {
    outline: 2px solid var(--vd-blue-500);
    outline-offset: 2px;
}

.tf-chooser-hint {
    margin: 18px 0 0;
    color: var(--vd-fg-subtle);
    font-size: var(--vd-text-sm);
}

.tf-notice {
    background: var(--vd-bg-elev);
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius-md);
    padding: 32px;
    max-width: 760px;
}
.tf-notice h1, .tf-notice h2 { margin: 8px 0 12px; }
.tf-notice p { margin: 0; color: var(--vd-fg-muted); }

.tf-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .tf-section { padding: 56px 0 72px; }
    .tf-chooser { padding: 20px; }
    .tf-chooser-form { align-items: stretch; }
    .tf-select { width: 100%; min-width: 0; }
    .tf-chooser-form .ed-btn { width: 100%; justify-content: center; }
    .tf-table th, .tf-table td { padding: 12px 8px; }
    .tf-table { min-width: 460px; }
    .tf-col-name { min-width: 130px; max-width: 150px; }
    .tf-cell { min-width: 78px; }
    .tf-option-date, .tf-option-time { white-space: normal; }
    .tf-scroll-hint { display: block; }
}
