/* Gemeinsames Modal für Impressum, Datenschutz und Kontakt
   (Startseite und Gäste-WLAN). Nativer <dialog>, Steuerung in js/modal.js. */
.site-modal {
    --modal-accent: #bcff03;
    --modal-ease: cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

.site-modal ::selection {
    background: var(--modal-accent);
    color: #111;
}

.site-modal :focus-visible {
    outline: 2px solid var(--modal-accent);
    outline-offset: 3px;
}

.site-modal {
    width: min(760px, calc(100vw - 24px));
    max-height: min(84vh, 900px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: #161616;
    color: #e6e6e6;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.35s var(--modal-ease), transform 0.35s var(--modal-ease), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}

.site-modal[open] {
    opacity: 1;
    transform: none;
}

@starting-style {
    .site-modal[open] {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
}

.site-modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Aufbau: fester Kopf (Titel + Schließen), darunter scrollt nur der Inhalt */
.site-modal[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.site-modal-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 14px 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #161616;
}

.site-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
    overflow-wrap: anywhere;
}

.site-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 24px 32px;
    line-height: 1.65;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.site-modal-body > :first-child {
    margin-top: 16px;
}

.site-modal-body h2 {
    margin: 1.8em 0 0.6em;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--modal-accent);
}

.site-modal-body h3,
.site-modal-body h4 {
    margin: 1.5em 0 0.4em;
    font-weight: 500;
    color: #fff;
}

.site-modal-body a {
    color: var(--modal-accent);
}

.site-modal-body img {
    max-width: 200px;
    height: auto;
}

.site-modal-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-modal-close:hover {
    background: var(--modal-accent);
    color: #111;
}
