/* =========================================
   THERAPIETERMIN FINDEN
   22e - Veranstaltungsformular CSS
   Version 2.0
   ========================================= */

/* 01 - Seitenbreite und Seitenlayout */

body:has(.ttf-event-form) .site-content {
    max-width: 1280px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body:has(.ttf-event-form) #primary {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    float: none;
}

body:has(.ttf-event-form) #left-sidebar,
body:has(.ttf-event-form) #right-sidebar {
    display: none;
}

body:has(.ttf-event-form) .entry-header {
    display: none;
}

body:has(.ttf-event-form) .entry-content {
    margin-top: 0;
}

body:has(.ttf-event-form) .inside-article {
    padding: 25px;
}

/* 02 - Farbsystem und Hintergrund */

.ttf-event-dashboard:has(.ttf-event-form) {
    --ttf-form-primary: #778F79;
    --ttf-form-dark: #526D54;
    --ttf-form-light: #EDF3EB;
    --ttf-form-border: #D8E4D5;
    --ttf-form-text: #39463B;
    --ttf-form-muted: #68756A;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    width: 100%;
    max-width: 1150px;
    margin: 25px auto 50px;
    padding: 45px;

    border-radius: 26px;

    background:
        radial-gradient(
            circle at 100% 0%,
            #D5E3D1 0,
            transparent 35%
        ),
        radial-gradient(
            circle at 0% 100%,
            #DCE8D8 0,
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #F0F5EE,
            #E5EDE1
        );
}

/* 03 - Dekorative Kreislinien */

.ttf-event-dashboard:has(.ttf-event-form)::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -160px;
    right: -120px;

    width: 430px;
    height: 430px;

    border: 1px solid #B3C7AE;
    border-radius: 50%;

    box-shadow:
        0 0 0 32px rgba(119,143,121,0.06),
        0 0 0 65px rgba(119,143,121,0.05),
        0 0 0 100px rgba(119,143,121,0.04);

    pointer-events: none;
}

.ttf-event-dashboard:has(.ttf-event-form)::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -170px;
    left: -180px;

    width: 440px;
    height: 440px;

    border: 1px solid #B3C7AE;
    border-radius: 50%;

    box-shadow:
        0 0 0 35px rgba(119,143,121,0.07),
        0 0 0 70px rgba(119,143,121,0.04);

    pointer-events: none;
}

/* 04 - Hauptcontainer */

.ttf-event-dashboard:has(.ttf-event-form)
.ttf-event-praxis {
    position: relative;
    width: 100%;
    max-width: none;

    padding: 40px;
    margin: 0;

    background: rgba(255,255,255,0.96);
    border: 1px solid #D8E4D5;
    border-radius: 22px;

    box-shadow:
        0 12px 40px rgba(65,88,65,0.06);
}

/* 05 - Überschriften */

.ttf-event-dashboard:has(.ttf-event-form) h1 {
    font-size: clamp(27px, 4vw, 38px);
    font-weight: 600;
    line-height: 1.3;
    color: #526D54;
    margin: 15px 0;
}

.ttf-event-dashboard:has(.ttf-event-form) h2 {
    color: #526D54;
    font-size: 25px;
    font-weight: 600;
}

.ttf-event-dashboard:has(.ttf-event-form)
.ttf-event-zurueck {
    display: inline-block;
    color: #526D54;
    margin-bottom: 15px;
    font-size: 14px;
}

/* 06 - Formular */

.ttf-event-form {
    position: relative;
    width: 100%;
    margin-top: 30px;
}

.ttf-event-form *,
.ttf-event-form *::before,
.ttf-event-form *::after {
    box-sizing: border-box;
}

.ttf-event-formular {
    width: 100%;
    margin: 0;
    color: #39463B;
}

.ttf-event-formular + .ttf-event-formular {
    margin-top: 45px;
    padding-top: 35px;
    border-top: 1px solid #D8E4D5;
}

/* 07 - Formularabschnitte */

.ttf-event-formular fieldset {
    position: relative;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;

    width: 100%;
    min-width: 0;
    margin: 0 0 32px;
    padding: 30px;

    background: linear-gradient(
        135deg,
        #FFFFFF,
        #F8FAF7
    );

    border: 1px solid #D8E4D5;
    border-radius: 16px;
}

.ttf-event-formular legend {
    display: table;
    max-width: 100%;
    width: auto;
    margin-left: 0;
    padding: 9px 18px;

    background: #E5EDE1;
    border: 1px solid #D8E4D5;
    border-radius: 30px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #526D54;
}

.ttf-event-formular fieldset p {
    grid-column: 1 / -1;
    margin: 0;

    font-size: 14px;
    line-height: 1.7;
    color: #68756A;
}

/* 08 - Feldbeschriftungen */

.ttf-event-form-feld {
    display: flex;
    flex-direction: column;
    gap: 9px;

    width: 100%;
    min-width: 0;
    margin: 0;
}

.ttf-event-form-feld > span {
    display: block;

    color: #39463B;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

/* 09 - Eingabefelder */

.ttf-event-formular input:not([type="checkbox"]):not([type="hidden"]):not([type="submit"]),
.ttf-event-formular select,
.ttf-event-formular textarea {
    display: block;

    width: 100%;
    min-width: 0;
    max-width: 100%;

    margin: 0;
    padding: 13px 16px;

    background: #FFFFFF;
    color: #39463B;

    border: 1px solid #D3DFD0;
    border-radius: 10px;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;

    box-shadow: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.ttf-event-formular input:not([type="checkbox"]):not([type="hidden"]),
.ttf-event-formular select {
    min-height: 49px;
}

.ttf-event-formular textarea {
    min-height: 110px;
    resize: vertical;
}

.ttf-event-formular textarea[name="beschreibung"] {
    min-height: 200px;
}

.ttf-event-formular input::placeholder,
.ttf-event-formular textarea::placeholder {
    color: #858E84;
}

.ttf-event-formular input:focus,
.ttf-event-formular select:focus,
.ttf-event-formular textarea:focus {
    outline: none;
    background: #FFFFFF;
    border-color: #778F79;

    box-shadow:
        0 0 0 4px rgba(119,143,121,0.13);
}

/* 10 - Felder über die gesamte Breite */

.ttf-event-form-feld:has(input[name="titel"]),
.ttf-event-form-feld:has(textarea),
.ttf-event-form-feld:has(input[name="anmeldelink"]),
.ttf-event-form-feld:has(input[name="veranstaltungsort"]),
.ttf-event-form-feld:has(input[name="strasse"]) {
    grid-column: 1 / -1;
}

/* 11 - Themenauswahl */

.ttf-event-form-themen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 12px;
}

.ttf-event-form-themen label {
    display: flex;
    align-items: center;
    gap: 9px;

    min-width: 0;
    min-height: 48px;

    margin: 0;
    padding: 12px;

    background: #F0F5EE;
    border: 1px solid #D8E4D5;
    border-radius: 10px;

    color: #39463B;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.ttf-event-form-themen label:hover {
    background: #E5EDE1;
    border-color: #A9BEA5;
}

.ttf-event-form-themen label:has(input:checked) {
    background: #DBE8D7;
    border-color: #778F79;
}

/* 12 - Checkboxen */

.ttf-event-formular input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #526D54;
    cursor: pointer;
}

.ttf-event-form-checkbox {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 12px;

    min-height: 48px;
    padding: 14px 18px;
    margin: 0;

    background: #E5EDE1;
    border: 1px solid #D8E4D5;
    border-radius: 10px;

    font-size: 14px;
    cursor: pointer;
}

/* 13 - Datumsfelder */

.ttf-event-formular input[type="datetime-local"] {
    min-height: 49px;
    font-size: 15px;
    color-scheme: light;
}

.ttf-event-formular
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.7;
    cursor: pointer;
}

/* 14 - Hinweise */

.ttf-event-formular .ttf-event-hinweis {
    position: relative;
    grid-column: 1 / -1;

    margin: 25px 0;
    padding: 20px 24px;

    background: #EDF3EB;
    border-left: 4px solid #778F79;
    border-radius: 10px;

    color: #526D54;
    font-size: 14px;
    line-height: 1.8;
}

/* 15 - Speichern-Button */

.ttf-event-formular button[type="submit"],
.ttf-event-formular input[type="submit"] {
    display: block;

    width: 100%;
    min-height: 56px;
    margin: 25px 0 0;
    padding: 16px 24px;

    background: linear-gradient(
        120deg,
        #526D54,
        #778F79
    );

    border: 0;
    border-radius: 12px;

    color: #FFFFFF;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: center;

    box-shadow:
        0 6px 18px rgba(82,109,84,0.16);

    cursor: pointer;
}

.ttf-event-formular button[type="submit"]:hover,
.ttf-event-formular input[type="submit"]:hover {
    background: #405842;
}

.ttf-event-formular button[type="submit"]:focus-visible,
.ttf-event-formular input[type="submit"]:focus-visible {
    outline: 3px solid #778F79;
    outline-offset: 3px;
}

.ttf-event-formular button[type="submit"]:disabled,
.ttf-event-formular input[type="submit"]:disabled {
    background: #DDE5DA;
    color: #68756A;
    cursor: not-allowed;
    box-shadow: none;
}

/* 16 - Tablet */

@media (max-width: 900px) {

    .ttf-event-dashboard:has(.ttf-event-form) {
        padding: 28px;
    }

    .ttf-event-dashboard:has(.ttf-event-form)
    .ttf-event-praxis {
        padding: 28px;
    }

    .ttf-event-formular fieldset {
        padding: 24px;
    }

    .ttf-event-form-themen {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

/* 17 - Smartphone */

@media (max-width: 600px) {

    body:has(.ttf-event-form) .inside-article {
        padding: 10px;
    }

    .ttf-event-dashboard:has(.ttf-event-form) {
        margin-top: 10px;
        padding: 12px;
        border-radius: 17px;
    }

    .ttf-event-dashboard:has(.ttf-event-form)
    .ttf-event-praxis {
        padding: 17px;
        border-radius: 14px;
    }

    .ttf-event-formular fieldset {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
        margin-bottom: 24px;
        padding: 17px;
    }

    .ttf-event-formular legend {
        font-size: 14px;
        padding: 8px 12px;
    }

    .ttf-event-form-themen {
        grid-template-columns: minmax(0, 1fr);
    }

    .ttf-event-formular input,
    .ttf-event-formular select,
    .ttf-event-formular textarea {
        font-size: 16px;
    }

    .ttf-event-dashboard:has(.ttf-event-form)::before {
        width: 250px;
        height: 250px;
    }

    .ttf-event-dashboard:has(.ttf-event-form)::after {
        width: 250px;
        height: 250px;
    }
}

/* 18 - Barrierearme Animationen */

@media (prefers-reduced-motion: reduce) {

    .ttf-event-formular * {
        transition: none;
    }
}

/* =========================================
   ENDE - SNIPPET 22e
   Version 2.0
   ========================================= */