/* Schnuppertag-Anmeldung — conversion-starkes Modal */
.open-day-modal[hidden] { display: none !important; }

.open-day-modal {
    --od-ink: #0f172a;
    --od-muted: #64748b;
    --od-brand: #0369a1;
    --od-brand-2: #0891b2;
    --od-accent: #22d3ee;
    --od-radius: 1.25rem;
    --od-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.5rem max(0.5rem, env(safe-area-inset-bottom, 0px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.open-day-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.open-day-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 0%, rgba(14, 165, 233, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 45% at 100% 100%, rgba(37, 99, 235, 0.28), transparent 50%),
        rgba(2, 12, 27, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.open-day-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 52rem;
    max-height: min(100dvh - 1rem, 44rem);
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border-radius: var(--od-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 28px 64px -20px rgba(2, 12, 27, 0.65);
    transform: translateY(18px) scale(0.985);
    opacity: 0.96;
    transition: transform 0.4s var(--od-ease), opacity 0.4s var(--od-ease);
}

.open-day-modal.is-open .open-day-modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.open-day-modal-x {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 5;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    font-size: 1.35rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.open-day-modal-x:hover {
    background: #fff;
    color: #0f172a;
}

.open-day-modal-aside {
    position: relative;
    padding: 1.5rem 1.35rem 1.35rem;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(3, 105, 161, 0.96) 0%, rgba(8, 145, 178, 0.94) 52%, rgba(14, 116, 144, 0.98) 100%);
    overflow: hidden;
}

.open-day-modal-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.35), transparent 42%),
        radial-gradient(circle at 8% 92%, rgba(37, 99, 235, 0.28), transparent 38%);
    pointer-events: none;
}

.open-day-modal-aside-inner {
    position: relative;
    z-index: 1;
}

.open-day-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.open-day-modal-badge-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.28);
}

.open-day-modal-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(224, 242, 254, 0.92);
}

.open-day-modal-aside h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fff;
}

.open-day-modal-when {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(224, 242, 254, 0.92);
}

.open-day-modal-perks {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.open-day-modal-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.94);
}

.open-day-modal-perks li::before {
    content: '✓';
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.68rem;
    font-weight: 900;
    margin-top: 0.05rem;
}

.open-day-modal-seats {
    margin: 0.85rem 0 0;
    padding: 0.55rem 0.72rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.open-day-modal-seats[hidden] { display: none !important; }

.open-day-modal-trust {
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    color: rgba(224, 242, 254, 0.82);
}

.open-day-modal-panel {
    padding: 1.35rem 1.25rem 1.3rem;
    overflow: auto;
    max-height: min(100dvh - 1rem, 44rem);
}

.open-day-modal-lead {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: var(--od-muted);
    line-height: 1.5;
}

.open-day-modal-form label,
.open-day-modal-form fieldset {
    display: block;
    margin: 0 0 0.75rem;
    border: 0;
    padding: 0;
}

.open-day-modal-form label > span,
.open-day-modal-form legend {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
}

.open-day-modal-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.open-day-modal-form input[type="text"],
.open-day-modal-form input[type="tel"],
.open-day-modal-form input[type="email"],
.open-day-modal-form input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.62rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.open-day-modal-form input:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.open-day-fieldset-card {
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.open-day-field-hint {
    margin: 0.15rem 0 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.open-day-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.open-day-level { margin: 0 !important; }

.open-day-level input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.open-day-level span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 2.75rem;
    justify-content: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.open-day-level span:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.open-day-level input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, #0369a1 0%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(3, 105, 161, 0.28);
}

.open-day-rem {
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.88;
}

.open-day-consent {
    display: flex !important;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.45;
}

.open-day-consent input { margin-top: 0.2rem; }

.open-day-consent a {
    color: #0369a1;
    font-weight: 600;
}

.open-day-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.open-day-modal-error {
    margin: 0 0 0.6rem;
    padding: 0.55rem 0.72rem;
    border-radius: 0.65rem;
    background: #fef2f2;
    font-size: 0.85rem;
    color: #b91c1c;
}

.open-day-modal-error[hidden] { display: none !important; }

.open-day-modal-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.82rem 1rem;
    border: 0;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #0369a1 0%, #0891b2 55%, #06b6d4 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(3, 105, 161, 0.28);
    transition: filter 0.2s, transform 0.15s;
}

.open-day-modal-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.open-day-modal-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.open-day-modal-done {
    text-align: center;
    padding: 1.5rem 0.5rem 0.75rem;
}

.open-day-modal-done[hidden] { display: none !important; }

.open-day-modal-success-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.open-day-modal-thanks {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--od-ink);
}

.open-day-modal-done p[data-open-day-done-copy] {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: var(--od-muted);
    line-height: 1.5;
}

.open-day-modal-done .open-day-modal-submit {
    max-width: 20rem;
    margin: 0 auto;
}

body.has-open-day-modal {
    overflow: hidden;
}

@media (min-width: 720px) {
    .open-day-modal-dialog {
        grid-template-columns: 0.88fr 1.12fr;
        max-height: min(100dvh - 1.5rem, 42rem);
    }

    .open-day-modal-aside {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100%;
        padding: 1.65rem 1.45rem;
    }

    .open-day-modal-panel {
        max-height: min(100dvh - 1.5rem, 42rem);
        padding: 1.5rem 1.45rem 1.35rem;
    }

    .open-day-modal-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 719px) {
    .open-day-modal-aside {
        padding-bottom: 1rem;
    }

    .open-day-modal-perks li:nth-child(n+4) {
        display: none;
    }
}
