/* ==========================================================================
   DreamForm – Spitex Kriens
   ========================================================================== */

:root {
    --primary: #9dc93d;
    --primary-dark: #86b42b;
    --border: #d8dee5;
    --text: #24313f;
    --muted: #6b7280;
    --danger: #d93025;
    --background: #fff;
    --background-light: #f7f9fb;
}

/* ==========================================================================
   Formular
   ========================================================================== */

.dreamform {
    max-width: 900px;
    width: 100%;
}

.dreamform > div {
    margin-bottom: 2rem;
}

.dreamform div[data-has-error] {
    margin-bottom: 2rem;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.dreamform label:not(.radio-button) {
    display: block;
    margin-bottom: .75rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

.dreamform em {
    color: var(--danger);
    font-style: normal;
}

/* ==========================================================================
   Textfelder
   ========================================================================== */

.dreamform input[type="text"],
.dreamform input[type="email"],
.dreamform input[type="tel"],
.dreamform input[type="number"],
.dreamform input[type="password"],
.dreamform input[type="date"],
.dreamform textarea,
.dreamform select {

    display: block;
    width: 100%;

    padding: 14px 18px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #fff;

    font: inherit;

    transition: .2s;
    box-sizing: border-box;
}

.dreamform textarea {
    min-height: 180px;
    resize: vertical;
}

.dreamform input:focus,
.dreamform textarea:focus,
.dreamform select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(157,201,61,.18);
}

.dreamform ::placeholder {
    color: #98a3ad;
}

/* ==========================================================================
   Select
   ========================================================================== */

.dreamform select {
    appearance: none;
    cursor: pointer;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

/* ==========================================================================
   Radio Buttons
   ========================================================================== */

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.radio-group input {
    display: none;
}

.radio-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 110px;
    padding: 13px 24px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #fff;
    color: var(--text);

    font-size: 1rem;
    font-weight: 400;

    cursor: pointer;
    user-select: none;

    transition: all .2s ease;
}

.radio-button:hover {
    border-color: var(--primary);
    background: #f8fbf2;
}

/* Ausgewählt */
.radio-group input:checked + .radio-button {
    background: #f3f9e8;
    border-color: var(--primary);
    color: var(--text);
}

/* Tastaturfokus */
.radio-group input:focus + .radio-button {
    box-shadow: 0 0 0 3px rgba(157,201,61,.2);
}

/* Klick-Animation */
.radio-button:active {
    transform: scale(.98);
}

/* ==========================================================================
   Checkboxen
   ========================================================================== */

.checkbox-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.checkbox-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-row label {
    margin: 0;
    font-weight: normal;
}

/* ==========================================================================
   Datei Upload
   ========================================================================== */

.dreamform input[type=file] {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 10px;
    background: var(--background-light);
}

/* ==========================================================================
   Button
   ========================================================================== */

.dreamform button,
.dreamform input[type=submit] {

    padding: 15px 34px;

    border: none;
    border-radius: 8px;

    background: var(--primary);
    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition: .2s;
}

.dreamform button:hover,
.dreamform input[type=submit]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.dreamform button:active,
.dreamform input[type=submit]:active {
    transform: translateY(0);
}

/* ==========================================================================
   Fehler
   ========================================================================== */

.dreamform [data-error] {
    display: block;
    margin-top: .5rem;
    color: var(--danger);
    font-size: .9rem;
}

/* ==========================================================================
   Erfolg
   ========================================================================== */

.form-success {
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--primary);
    background: #f7fbef;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width:768px) {

    .radio-group {
        flex-direction: column;
    }

    .radio-button {
        width: 100%;
    }

    .dreamform button,
    .dreamform input[type=submit] {
        width: 100%;
    }

}