/* ----------------------------
   Timer (kcTimer in kc-timer.js) - global im _Layout geladen, weil laufende Timer auf jeder
   Seite sichtbar bleiben. Zeitangaben in den Schritten sind antippbare Knöpfe; laufende Timer
   stehen in einer Leiste unten (über der Handy-Navigation, rechts Platz für den Nachrichten-Knopf).
   ---------------------------- */
.kc-timer-start {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.1rem;
    padding: 0.05rem 0.5rem;
    border: 1px solid var(--kc-linie);
    border-radius: 999px;
    background: var(--kc-bg-soft);
    color: var(--kc-primary);
    font: inherit;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    vertical-align: baseline;
}

    .kc-timer-start:hover {
        border-color: var(--kc-primary-light);
    }

.kc-timer-leiste {
    position: fixed;
    left: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(360px, calc(100vw - 6rem));
}

    .kc-timer-leiste[hidden] {
        display: none;
    }

.kc-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.5rem 0.55rem 0.9rem;
    border-radius: 14px;
    background: var(--kc-knopf);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.kc-timer--pause {
    opacity: 0.8;
}

.kc-timer--fertig {
    background: #c0392b;
    cursor: pointer;
    animation: kc-timer-blinken 1s ease-in-out infinite;
}

@keyframes kc-timer-blinken {
    50% { background: #e0564a; }
}

.kc-timer-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

/* Timer eines anderen Rezepts: ganze Info-Fläche ist ein Link zurück zum Rezept */
a.kc-timer-info,
a.kc-timer-info:hover {
    color: inherit;
    text-decoration: none;
}

.kc-timer-zeit {
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.kc-timer-was {
    font-size: 0.78rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-timer-knopf {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

    .kc-timer-knopf:hover {
        background: rgba(255, 255, 255, 0.28);
    }

@media (max-width: 767.98px) {
    /* über der Navigationsleiste unten (außer im Kochmodus, da ist sie ausgeblendet) */
    body.kc-hat-bottom-nav:not(.kc-kochmodus) .kc-timer-leiste {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .kc-timer--fertig {
        animation: none;
    }
}

@media print {
    .kc-timer-leiste {
        display: none !important;
    }
}
