/* =====================================================================
 * protokoll.css — Anruf-Protokoll, Erinnerungen, Anrufplan
 * ---------------------------------------------------------------------
 * Alle Werte ausschließlich über CSS-Variablen aus design-tokens.css.
 * Keine Hex/rgb-Literale.
 * ===================================================================== */

/* === Protokoll-Modal ================================================= */

.protokoll-modal__backdrop {
    position: fixed;
    inset: 0;
    background: hsl(0 0% 0% / 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
}

.protokoll-modal {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 36rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.protokoll-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-5) var(--space-5) var(--space-3);
    border-bottom: 1px solid var(--color-border-subtle);
}

.protokoll-modal__titel {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    line-height: var(--line-height-tight);
}

.protokoll-modal__untertitel {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.protokoll-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-subtle);
    font-size: var(--font-size-body);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: color var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.protokoll-modal__close:hover {
    color: var(--color-text);
}

/* Typ-Auswahl */
.protokoll-modal__typ-row {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-subtle);
}

.protokoll-modal__typ-btn {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition:
        background var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
}

.protokoll-modal__typ-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.protokoll-modal__typ-btn--aktiv {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Sektionen */
.protokoll-modal__sektion {
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--color-border-subtle);
}

.protokoll-modal__sektion:last-of-type {
    border-bottom: none;
}

.protokoll-modal__label {
    display: block;
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
}

/* Ergebnis-Buttons */
.protokoll-modal__ergebnis-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.protokoll-modal__ergebnis-btn {
    padding: var(--space-1) var(--space-3);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: var(--font-size-micro);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    transition:
        background var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
}

.protokoll-modal__ergebnis-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.protokoll-modal__ergebnis-btn--aktiv {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Textarea + Input */
.protokoll-modal__textarea {
    width: 100%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    padding: var(--space-2) var(--space-3);
    resize: vertical;
    min-height: 4.5rem;
    box-sizing: border-box;
    transition: border-color var(--duration-fast) var(--ease-out);
}

.protokoll-modal__textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
}

.protokoll-modal__input {
    width: 100%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    padding: var(--space-2) var(--space-3);
    box-sizing: border-box;
    margin-bottom: var(--space-2);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.protokoll-modal__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
}

.protokoll-modal__input--klein {
    width: 8rem;
}

.protokoll-modal__zeichen {
    font-size: var(--font-size-micro);
    color: var(--color-text-subtle);
    text-align: right;
    margin-top: var(--space-1);
}

/* Checkbox */
.protokoll-modal__checkbox-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-body);
    color: var(--color-text-muted);
    cursor: pointer;
}

.protokoll-modal__checkbox {
    accent-color: var(--color-accent);
    width: 1rem;
    height: 1rem;
}

.protokoll-modal__erinnerung-details {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
}

/* Footer */
.protokoll-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border-subtle);
}

/* === Protokoll-Liste ================================================= */

.protokoll-liste {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.protokoll-liste__liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.protokoll-liste__eintrag {
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-1);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: background var(--duration-fast) var(--ease-out);
}

.protokoll-liste__eintrag:hover {
    background: var(--color-surface-hover);
}

.protokoll-liste__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.protokoll-liste__meta-info {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.protokoll-liste__ergebnis {
    font-size: var(--font-size-micro);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-pill);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}

.protokoll-liste__ergebnis--erreicht {
    background: var(--color-phase-aktiv-bg);
    color: var(--color-phase-aktiv-text);
}

.protokoll-liste__ergebnis--nicht_erreicht,
.protokoll-liste__ergebnis--mailbox {
    background: var(--color-phase-passiv-bg);
    color: var(--color-phase-passiv-text);
}

.protokoll-liste__ergebnis--erledigt {
    background: var(--color-phase-aktiv-bg);
    color: var(--color-phase-aktiv-text);
}

.protokoll-liste__notiz {
    font-size: var(--font-size-body);
    color: var(--color-text);
    line-height: var(--line-height-normal);
}

.protokoll-liste__erinnerung {
    font-size: var(--font-size-micro);
    color: var(--color-text-muted);
    background: var(--color-surface-2);
    border-radius: var(--radius-xs);
    padding: var(--space-1) var(--space-2);
}

.protokoll-liste__erinnerung--ueberfaellig {
    color: var(--color-phase-passiv-text);
    background: var(--color-phase-passiv-bg);
}

.protokoll-liste__feedback-row {
    display: flex;
    gap: var(--space-2);
}

.protokoll-liste__feedback-btn {
    background: none;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--color-text-subtle);
    font-size: var(--font-size-micro);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    transition:
        background var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
}

.protokoll-liste__feedback-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

.protokoll-liste__feedback-btn--aktiv {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.protokoll-liste__feedback-btn--negativ.protokoll-liste__feedback-btn--aktiv {
    background: var(--color-phase-passiv-bg);
    border-color: var(--color-phase-passiv-border);
    color: var(--color-phase-passiv-text);
}

.protokoll-liste__mehr {
    background: none;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: var(--space-2);
    transition: background var(--duration-fast) var(--ease-out);
}

.protokoll-liste__mehr:hover {
    background: var(--color-surface-hover);
}

.protokoll-liste__leer {
    font-size: var(--font-size-small);
    color: var(--color-text-subtle);
    padding: var(--space-3) 0;
}

/* === Anrufplan-Modul ================================================= */

.anrufplan-modul {
    /* Gleiche Card-Basis wie modul-card, plus leichte Akzent-Tönung */
    border-top: 2px solid var(--color-accent);
}

.anrufplan-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.anrufplan-zeile {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    transition: background var(--duration-fast) var(--ease-out);
}

.anrufplan-zeile:last-child {
    border-bottom: none;
}

.anrufplan-zeile:hover {
    background: var(--color-surface-hover);
}

.anrufplan-zeile__rank {
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    font-family: var(--font-mono);
    padding-top: var(--space-1);
}

.anrufplan-zeile__mitte {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.anrufplan-zeile__firma {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    text-align: left;
    transition: color var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anrufplan-zeile__firma:hover {
    color: var(--color-accent-hover);
}

.anrufplan-zeile__grund {
    font-size: var(--font-size-micro);
    color: var(--color-text-muted);
    line-height: var(--line-height-normal);
}

.anrufplan-zeile__rechts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-1);
    flex-shrink: 0;
}

.anrufplan-zeile__score {
    font-size: var(--font-size-micro);
    font-family: var(--font-mono);
    color: var(--color-text-subtle);
    background: var(--color-surface-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-xs);
}

.anrufplan-zeile__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: nowrap;
}

/* === Firma-Detail Kontakt-Strip ====================================== */

.firma-detail__kontakt-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
}

.firma-detail__letzter-kontakt {
    margin-top: var(--space-2);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.firma-detail__letzter-kontakt--kein {
    color: var(--color-text-subtle);
}

/* Protokoll-Sektion in Firma-Detail */
.detail__protokoll-sektion {
    margin: var(--space-5) 0;
}

/* Erinnerungs-Liste — Live-Einträge mit Firmen-Button */
.erinnerung-liste__firma-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    text-align: left;
    transition: color var(--duration-fast) var(--ease-out);
}

.erinnerung-liste__firma-btn:hover {
    color: var(--color-accent-hover);
}

/* Gefährlicher Button (Reset) */
.btn--gefaehrlich {
    color: var(--color-phase-passiv-text);
    border-color: var(--color-phase-passiv-border);
}

.btn--gefaehrlich:hover {
    background: var(--color-phase-passiv-bg);
}
