/* ==========================================================================
   Verein Beitrittsformular - Stylesheet
   Exakt abgestimmt auf Twenty Twenty + Contact Form 7 (feuerwehr-herzogenaurach.de)
   Pfad: /wp-content/mu-plugins/verein-formular/style.css
   ========================================================================== */

/* Haupt-Container: Vollständig transparent, keine Rahmen */
.ff-form-wrapper {
    max-width: 760px;
    margin: 2rem auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
    box-sizing: border-box;
}

.ff-form-wrapper *,
.ff-form-wrapper *::before,
.ff-form-wrapper *::after {
    box-sizing: inherit;
}

/* ==========================================================================
   Fieldsets & Überschriften (Einheitlicher, großzügiger Abstand mobil + Desktop)
   ========================================================================== */
.ff-group {
    border: none;
    padding: 0;
    margin: 0 0 3.5rem 0; /* Fester, einheitlicher Abstand zur nächsten Gruppe */
}

.ff-group legend {
    font-family: "Roboto", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 1.75rem 0;
    padding: 0 0 0.5rem 0;
    color: #000000;
    display: block;
    width: 100%;
    border-bottom: 1px solid #c4c4c4;
}

/* Hinweistexte */
.ff-hint {
    font-size: 14px;
    color: #5e5e5e;
    margin: -0.75rem 0 1.75rem 0;
    line-height: 1.5;
}

/* Radio-Auswahl (Art der Mitgliedschaft) */
.ff-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.ff-radio-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
}

.ff-radio-card:hover {
    background: transparent;
    color: #cd1313;
}

.ff-radio-card:has(input:checked) {
    border: none;
    background: transparent;
    color: #000000;
    font-weight: 600;
}

.ff-radio-card input[type="radio"] {
    margin: 0;
    accent-color: #cd1313;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Formular-Raster & Vertikaler Abstand
   ========================================================================== */
.ff-grid-2,
.ff-grid-street,
.ff-grid-city {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.1rem;
}

.ff-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.ff-grid-street {
    grid-template-columns: 1fr 110px;
}

.ff-grid-city {
    grid-template-columns: 130px 1fr;
}

/* Einzelne Felder: Standard 2.1rem Abstand */
.ff-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 2.1rem;
}

/* In Desktop-Grids den Abstand der inneren Felder neutralisieren */
.ff-grid-2 .ff-field,
.ff-grid-street .ff-field,
.ff-grid-city .ff-field {
    margin-bottom: 0;
}

/* Mobil-Optimierung: Alle Felder laufen linear untereinander mit 2.1rem */
@media (max-width: 600px) {
    .ff-grid-2,
    .ff-grid-street,
    .ff-grid-city {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }
    
    .ff-grid-2 .ff-field,
    .ff-grid-street .ff-field,
    .ff-grid-city .ff-field {
        margin-bottom: 2.1rem;
    }
}

/* Das jeweils letzte Element einer Gruppe hat keinen zusätzlichen unteren Rand */
.ff-group > :last-child,
.ff-group > .ff-grid-2:last-child,
.ff-group > .ff-grid-street:last-child,
.ff-group > .ff-grid-city:last-child,
.ff-group > .ff-field:last-child,
.ff-group > .ff-slider-wrapper:last-child,
.ff-group > .ff-sepa-box:last-child {
    margin-bottom: 0 !important;
}

/* Feldbezeichnungen (Labels) */
.ff-field label {
    font-family: "Roboto", sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: #000000;
    white-space: normal;
}

/* ==========================================================================
   Eingabefelder & Fokus-Rahmen (2x so dick & schwarz)
   ========================================================================== */
.ff-field input[type="text"],
.ff-field input[type="email"],
.ff-field input[type="tel"],
.ff-field input[type="date"],
.ff-field textarea {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000000;
    background-color: #ffffff !important;
    padding: 0.75rem 1rem;
    border: 1px solid #c4c4c4;
    border-radius: 0 !important;
    width: 100%;
    box-sizing: border-box;
    transition: border 0.1s ease-in-out;
}

/* Wenn markiert/fokussiert: Schwarzer Rahmen, doppelt so dick (2px) */
.ff-field input:focus,
.ff-field textarea:focus {
    outline: none !important;
    border: 2px solid #000000 !important;
    padding: calc(0.75rem - 1px) calc(1rem - 1px); /* Verhindert Ruckeln */
    box-shadow: none !important;
}

/* Platzhalter */
::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

::-webkit-input-placeholder { color: #9ca3af !important; }
::-moz-placeholder          { color: #9ca3af !important; opacity: 1 !important; }
:-ms-input-placeholder      { color: #9ca3af !important; }

/* Datumsfeld Platzhalter */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #9ca3af;
}

input[type="date"]:valid::-webkit-datetime-edit,
input[type="date"]:valid::-webkit-datetime-edit-fields-wrapper,
input[type="date"]:valid::-webkit-datetime-edit-text,
input[type="date"]:valid::-webkit-datetime-edit-month-field,
input[type="date"]:valid::-webkit-datetime-edit-day-field,
input[type="date"]:valid::-webkit-datetime-edit-year-field {
    color: #000000;
}

/* ==========================================================================
   Schieberegler (Pixelgenau vertikal zentrierter Punkt)
   ========================================================================== */
.ff-slider-wrapper {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 2.1rem;
}

.ff-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 400;
    color: #000000;
}

.ff-slider-header strong {
    font-size: 28px;
    font-weight: 700;
    color: #cd1313;
}

.ff-slider-input-container {
    width: 100%;
    display: block;
    margin: 16px 0;
}

/* Basis-Element: Transparent und 36px Gesamthöhe */
.ff-form-wrapper input[type="range"]#beitragSlider,
.ff-slider-wrapper input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 36px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Webkit Schiene: Genau 18px hoch */
.ff-form-wrapper input[type="range"]#beitragSlider::-webkit-slider-runnable-track {
    width: 100% !important;
    height: 18px !important;
    background: #9ca3af !important;
    border-radius: 0 !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease;
}

.ff-form-wrapper input[type="range"]#beitragSlider:hover::-webkit-slider-runnable-track {
    background: #6b7280 !important;
}

/* Webkit Knopf: Exakt mittig zentriert auf der Schiene ((18 - 33) / 2 = -7.5px) */
.ff-form-wrapper input[type="range"]#beitragSlider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 33px !important;
    height: 33px !important;
    border-radius: 50% !important;
    background: #cd1313 !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
    cursor: pointer !important;
    margin-top: -7.5px !important;
    box-sizing: border-box !important;
    transition: transform 0.1s ease;
}

.ff-form-wrapper input[type="range"]#beitragSlider::-webkit-slider-thumb:hover {
    transform: scale(1.08);
}

/* Firefox Schiene */
.ff-form-wrapper input[type="range"]#beitragSlider::-moz-range-track {
    width: 100% !important;
    height: 18px !important;
    background: #9ca3af !important;
    border-radius: 0 !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease;
}

.ff-form-wrapper input[type="range"]#beitragSlider:hover::-moz-range-track {
    background: #6b7280 !important;
}

/* Firefox Knopf */
.ff-form-wrapper input[type="range"]#beitragSlider::-moz-range-thumb {
    width: 33px !important;
    height: 33px !important;
    border-radius: 50% !important;
    background: #cd1313 !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: transform 0.1s ease;
}

.ff-form-wrapper input[type="range"]#beitragSlider::-moz-range-thumb:hover {
    transform: scale(1.08);
}

.ff-slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    color: #5e5e5e;
    margin-top: 0.5rem;
}

/* ==========================================================================
   SEPA-Lastschriftmandat Box
   ========================================================================== */
.ff-sepa-box {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
}

.ff-sepa-text {
    font-family: "Roboto", sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.45;
    color: #000000;
    margin-bottom: 2.1rem;
    padding: 1.1rem 1.25rem;
    background: #ffffff;
    border-left: 4px solid #cd1313;
    border-radius: 0;
    border-top: 1px solid #c4c4c4;
    border-right: 1px solid #c4c4c4;
    border-bottom: 1px solid #c4c4c4;
}

.ff-sepa-consent {
    margin-top: 2.1rem;
    font-size: 15px;
    font-weight: 500;
}

/* ==========================================================================
   Checkboxen & Absende-Button
   ========================================================================== */
.ff-checkboxes {
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.ff-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 15px;
    line-height: 1.5;
    color: #000000;
    cursor: pointer;
}

.ff-checkbox input {
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: #cd1313;
    border-radius: 0;
}

.ff-checkbox a {
    color: #cd1313;
    text-decoration: underline;
}

.ff-checkbox a:hover {
    color: #990000;
}

/* Absende-Button */
.ff-submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: #cd1313;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.ff-submit-btn:hover {
    background-color: #990000;
}

/* Meldungen */
.ff-success {
    padding: 1rem 1.25rem;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    border-radius: 0;
    font-size: 15px;
    margin-bottom: 2.1rem;
}

.ff-error {
    padding: 1rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    border-radius: 0;
    font-size: 15px;
    margin-bottom: 2.1rem;
}

/* ==========================================================================
   Entwicklungs-Popup (Modal)
   ========================================================================== */
.ff-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    backdrop-filter: blur(2px);
}

.ff-modal-box {
    position: relative;
    background: #ffffff;
    max-width: 500px;
    width: 100%;
    padding: 2.25rem 2rem;
    border-radius: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
}

.ff-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #5e5e5e;
    cursor: pointer;
    padding: 0;
}

.ff-modal-close:hover {
    color: #000000;
}

.ff-modal-icon {
    font-size: 42px;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.ff-modal-box h3 {
    font-family: "Roboto", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 1rem 0;
}

.ff-modal-box p {
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #5e5e5e;
    margin: 0 0 0.85rem 0;
}

.ff-modal-box p strong {
    color: #cd1313;
}

.ff-modal-subtext {
    font-size: 13.5px !important;
    color: #5e5e5e !important;
    margin-top: 0.5rem !important;
}

.ff-modal-btn {
    margin-top: 1.25rem;
    padding: 0.75rem 2rem;
    background-color: #cd1313;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ff-modal-btn:hover {
    background-color: #990000;
}