/* Wochenend-Fenster „Am Wochenende krank?“ – eigene Datei, damit die Website (includes/closed-toast.inc.php)
   und die Vorschau im Admin (admin/templates/weekend-popup-card.php) dieselben Regeln nutzen.
   Dunkelmodus der Website: styles/dark-mode.css. */

/* Erscheint im eingestellten Zeitraum statt des kleinen Hinweises. Breite so, dass Bild und Knöpfe
   auch auf niedrigen Bildschirmen ganz zu sehen sind (Bild im Format 4 : 5). */
.weekend-popup {
    width: min(440px, 94vw, calc((100vh - 150px) * 0.8));
    width: min(440px, 94vw, calc((100dvh - 150px) * 0.8));
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 70px -20px rgba(8, 28, 44, 0.6);
    overflow: hidden;
    color: #1f2937;
    font-family: var(--font-sans);
}
.weekend-popup[open] { animation: weekend-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes weekend-pop {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
}
.weekend-popup::backdrop {
    background: rgba(8, 28, 44, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.weekend-popup__img {
    display: block;
    width: 100%;
    height: auto;
}
.weekend-popup svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.weekend-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    color: #133f5c;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Wie die anderen Dialoge (popup.css, .exit-dialog): Überfahren dreht das Kreuz mit Federeffekt,
   Drücken drückt es ein, der Klick dreht es weg (.is-closing, Schließen in closed-toast.inc.php) */
.weekend-popup__close:hover {
    background: #fff;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.3);
    transform: rotate(90deg) scale(1.12);
}
.weekend-popup__close:active {
    transform: rotate(90deg) scale(0.86);
    transition-duration: 0.08s;
}
.weekend-popup__close.is-closing {
    pointer-events: none;
    animation: weekend-close-spin 0.22s ease-in forwards;
}
@keyframes weekend-close-spin {
    to { transform: rotate(270deg) scale(0.5); opacity: 0; }
}
.weekend-popup__close svg { width: 18px; height: 18px; stroke-width: 2.4; }
.weekend-popup a:focus-visible,
.weekend-popup button:focus-visible {
    outline: 3px solid #133f5c;
    outline-offset: 2px;
}
.weekend-popup__actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 14px 0;
}
a.weekend-popup__call,
a.weekend-popup__sos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s;
}
a.weekend-popup__call {
    background: linear-gradient(135deg, #1a5276, #1f776d);
    box-shadow: 0 8px 18px -10px rgba(26, 82, 118, 0.8);
}
a.weekend-popup__sos {
    min-width: 96px;
    background: #c62828;
    box-shadow: 0 8px 18px -10px rgba(198, 40, 40, 0.8);
}
a.weekend-popup__call:hover,
a.weekend-popup__sos:hover,
a.weekend-popup__call:focus-visible,
a.weekend-popup__sos:focus-visible {
    color: #fff;
    transform: translateY(-1px);
}
.weekend-popup__call svg,
.weekend-popup__sos svg { width: 19px; height: 19px; flex: none; }
a.weekend-popup__call { white-space: nowrap; }
@media (max-width: 420px) {
    .weekend-popup__actions { gap: 8px; padding: 10px 10px 0; }
    a.weekend-popup__call,
    a.weekend-popup__sos { gap: 6px; padding: 12px 12px; font-size: 15.5px; }
    a.weekend-popup__sos { min-width: 76px; }
}
.weekend-popup .weekend-popup__more {
    margin: 8px 0 12px;
    font-size: 13.5px;
    text-align: center;
}
.weekend-popup__more a {
    color: #1a6580;
    font-size: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .weekend-popup[open],
    .weekend-popup__close,
    .weekend-popup__close.is-closing { animation: none; transition: none; }
    .weekend-popup__close:hover,
    .weekend-popup__close:active { transform: none; }
}
@media print {
    .weekend-popup { display: none; }
}
