fieldset {
    border: none;
    padding-bottom: 2em;
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 1px solid var(--sj-green);
    display: flex;
    gap: 10px;
}

fieldset:first-child {
    margin-top: 0;
}

fieldset.no-border {
    border: none !important;
}

input, textarea, select {
    background-color: var(--sj-grey-input);
    padding: 14px 20px 14px 20px;
    border-radius: var(--radius-lg);
    color: var(--sj-green);
}

select {
    appearance: none; /* entfernt Standard-Pfeil */
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    display: inline-block;
    padding: 14px 50px 14px 20px;
}

.select {
    position: relative;
}

.select::after {
    content: "↓";
    position: absolute;
    top: 26px;
    right: 12px;
    width: auto;
    height: auto;
    pointer-events: none;
    color: var(--sj-green);
    transform: translateY(-50%);
    display: block;
}

.form-group label {
    display: block;
    margin-bottom: 1em;
}

fieldset legend {
    margin-bottom: 1em;
}

textarea {
    width: 100%;
}

label a {
    text-decoration: underline;
}

/* Grundstruktur */
.checkbox {
    align-items: center;
    cursor: pointer;
    font-size: var(--font-size-xs);
    user-select: none;
    display: flex;
}

/* Verstecke die Standard-Checkbox */
.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Eigenes Kästchen */
.checkbox .checkmark {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background-color: var(--sj-grey-input);
    border: 2px solid var(--sj-grey-input);
    border-radius: var(--radius-full); /* rund oder eckig */
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

/* Häkchen */
.checkbox .checkmark::after {
    content: "";
    width: 15px;
    height: 8px;
    border: solid white;
    border-width: 0 0 3px 3px;
    transform: rotate(-45deg);
    opacity: 0;
    transition: all 0.2s;
}

/* Checkbox aktiviert */
.checkbox input:checked + .checkmark {
    background-color: var(--sj-green); /* grün beim aktivieren */
    border-color: var(--sj-green);
}

.checkbox input:checked + .checkmark::after {
    opacity: 1;
}

.form-group input, .form-group select {
    width: 100%;
}

@media (max-width: 768px) {
    fieldset {
        flex-direction: column;
    }

    select {
        width: 100%;
    }

    input:not([type="checkbox"]) {
        width: 100%;
    }

    .form-group {
        margin-bottom: 1em;
    }

    fieldset .form-group:last-child {
        margin-bottom: 0;
    }
}
