/**
 * SN Warteliste – Frontend-Styles
 * Schlicht, responsiv, barrierefrei.
 * Alle Farben und Abstände können per Theme-CSS überschrieben werden.
 */

/* ============================================================
   Wrapper & Grundlayout
   ============================================================ */

.sn-waitlist-wrapper {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #d4c9b8;
    border-radius: 6px;
    background-color: #faf8f5;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.sn-waitlist-notice {
    margin-bottom: 1.25rem;
}

.sn-waitlist-notice p {
    margin: 0;
    font-weight: 500;
    color: #555;
}

/* ============================================================
   Formularfelder
   ============================================================ */

.sn-waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sn-waitlist-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sn-waitlist-field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.sn-waitlist-field input[type="text"],
.sn-waitlist-field input[type="email"],
.sn-waitlist-field input[type="tel"],
.sn-waitlist-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #c8bfb0;
    border-radius: 4px;
    background: #fff;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sn-waitlist-field input:focus,
.sn-waitlist-field textarea:focus {
    outline: 2px solid #7a6a52;
    outline-offset: 1px;
    border-color: #7a6a52;
}

.sn-waitlist-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox-Felder */
.sn-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.sn-field-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    accent-color: #7a6a52;
    cursor: pointer;
}

/* Optionale Felder */
.sn-optional {
    font-weight: 400;
    color: #888;
    font-size: 0.85em;
}

/* Pflichtfeld-Hinweis */
.sn-required-note {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* ============================================================
   Button
   ============================================================ */

.sn-waitlist-submit {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: #7a6a52;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    align-self: flex-start;
}

.sn-waitlist-submit:hover,
.sn-waitlist-submit:focus {
    background-color: #5e5040;
    outline: 2px solid #5e5040;
    outline-offset: 2px;
}

.sn-waitlist-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   Meldungen
   ============================================================ */

.sn-waitlist-messages {
    min-height: 1.5rem;
}

.sn-waitlist-success {
    padding: 0.75rem 1rem;
    background-color: #edf7ed;
    border: 1px solid #b2dfb2;
    border-radius: 4px;
    color: #2d6a2d;
    font-weight: 500;
}

.sn-waitlist-error {
    padding: 0.75rem 1rem;
    background-color: #fdecea;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    color: #a02020;
    font-weight: 500;
}

/* ============================================================
   Shortcode-Wrapper: Formular immer sichtbar
   ============================================================ */

.sn-waitlist-shortcode-wrapper .sn-waitlist-wrapper {
    display: block !important;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 480px) {
    .sn-waitlist-wrapper {
        padding: 1rem;
    }

    .sn-waitlist-submit {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Barrierefreiheit: Fokus-Sichtbarkeit
   ============================================================ */

:focus-visible {
    outline: 2px solid #7a6a52;
    outline-offset: 2px;
}
