/*
 * Dateipfad: assets/css/bi-public.css
 * Gemeinsame Styles für alle Seiten – öffentlich und hinter dem Login
 * (eingebunden in includes/head.php nach assets/theme.php).
 *
 * Inhalt:
 *   1. Grundlagen (Textgrösse auf dem Handy stabil halten)
 *   2. Eingabefelder: mind. 16px auf Touch-Geräten -> iPhone zoomt beim Tippen nicht mehr hinein
 *      (+ Datum-/Uhrzeitfelder auf dem iPhone in voller Feldbreite)
 *   3. Buttons & Button-Reihen in Popups: nichts ragt über den Rand hinaus
 *   4. Gemeinsamer Abschluss-Bereich «Bereit für deine nächste Feier?» (includes/allgemein/cta_feier.php)
 *
 * Grosse Eingabefelder (z.B. Event-Code, PIN) mit class="bi-input-lg" behalten ihre eigene Grösse.
 */

/* =========================================================================
   1. GRUNDLAGEN
   ========================================================================= */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* =========================================================================
   2. EINGABEFELDER (iPhone-Zoom verhindern)
   iOS Safari vergrössert die Seite automatisch, sobald ein Feld mit weniger als
   16px Schrift angetippt wird. Auf Handys & Tablets daher überall mind. 16px.
   ========================================================================= */
@media (max-width: 900px), (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]):not(.bi-input-lg),
    select:not(.bi-input-lg),
    textarea:not(.bi-input-lg) {
        font-size: 16px !important;
    }
}

/* iPhone/iPad: Datum- & Uhrzeitfelder halten sich an die Feldbreite
   und fallen im leeren Zustand nicht zusammen */
@supports (-webkit-touch-callout: none) {
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        -webkit-appearance: none;
        appearance: none;
        min-width: 0;
        max-width: 100%;
    }
    input::-webkit-date-and-time-value {
        min-height: 1.2em;
        text-align: left;
    }
}

/* =========================================================================
   3. BUTTONS & POPUPS AUF KLEINEN BILDSCHIRMEN
   ========================================================================= */
@media (max-width: 480px) {
    /* Lange Button-Texte umbrechen statt über den Rand zu ragen */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        white-space: normal;
        max-width: 100%;
        text-align: center;
        line-height: 1.3;
    }

    /* Button-Reihen in Popups: bei Platzmangel untereinander, volle Breite */
    :is(.modal-card, .popup-content, .modal-content) :is(div, form, footer):has(> .btn + .btn) {
        flex-wrap: wrap;
    }
    :is(.modal-card, .popup-content, .modal-content) :is(div, form, footer):has(> .btn + .btn) > .btn {
        flex: 1 1 auto;
        width: auto !important;
        min-width: min(100%, 120px);
    }
}

/* =========================================================================
   4. ABSCHLUSS-BEREICH «BEREIT FÜR DEINE NÄCHSTE FEIER?»
   ========================================================================= */
.bi-cta-wrap {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto 90px;
    padding: 0 5%;
    box-sizing: border-box;
}
.bi-cta-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    padding: 50px 30px;
    border-radius: 30px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}
.bi-cta-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 450px;
    height: 450px;
    max-width: 140%;
    background: radial-gradient(circle, rgba(39, 113, 200, 0.35) 0%, transparent 70%);
    pointer-events: none;
}
.bi-cta-title {
    position: relative;
    margin: 0 0 14px;
    font-size: clamp(1.4rem, 5vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.25;
    color: #ffffff;
}
.bi-cta-text {
    position: relative;
    max-width: 600px;
    margin: 0 auto 28px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: #cbd5e1;
}
.bi-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    padding: 14px 32px;
    border-radius: 16px;
    box-sizing: border-box;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    box-shadow: 0 8px 24px rgba(39, 113, 200, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bi-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(39, 113, 200, 0.45);
}
@media (max-width: 768px) {
    .bi-cta-wrap {
        margin: 0 auto 55px;
        padding: 0 16px;
    }
    .bi-cta-card {
        padding: 38px 20px;
        border-radius: 24px;
    }
    .bi-cta-text {
        font-size: 0.94rem;
        margin-bottom: 22px;
    }
    .bi-cta-btn {
        width: 100%;
        padding: 15px 18px;
        font-size: 0.94rem;
    }
}
@media print {
    .bi-cta-wrap { display: none; }
}
