* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

#sonderbeschaffung {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2em 1em;
}

.formular {
    width: 100%;
    max-width: 700px;
    padding: 0 1em;
}

.formular-wrapper {
    padding: 1.5em 2em 2em 2em; /* oben reduziert */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

h2 {
    text-align: center;
    color: #3169a6;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1em;
}

/* RADIO BUTTONS */
.radio-row {
    display: flex;
    gap: 1.5em;
    margin-bottom: 1em;
    flex-wrap: wrap;
    font-size: 0.95em;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

/* LABELS */
label {
    display: block;
    margin-top: 1em;
    margin-bottom: 0.3em;
    font-weight: 500;
    color: #212529;
    line-height: 1.4;
}

.pflicht {
    color: red;
}

/* INPUTS */
input,
textarea {
    width: 100%;
    padding: 0.6em;
    border: 1px solid #adb5bd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: #7fb3db;
    box-shadow: 0 0 0 0.2rem rgba(127, 179, 219, 0.25);
    outline: none;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* RADIO + CHECKBOX */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 6px;
    transform: scale(1.1);
}

/* CHECKBOX FIX (WICHTIG) */
label input[type="checkbox"] {
    display: inline-block;
    margin-right: 8px;
    margin-top: 3px;
    vertical-align: top;
}

/* PLACEHOLDER */
::placeholder {
    font-style: italic;
    color: #666;
}

/* ARTIKEL BLOCK */
.artikel-block {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 0.8em 1em;
    margin-top: 1em;
    position: relative;
    transition: 0.3s;
}

.artikel-block h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.artikel-block.collapsed {
    max-height: 60px;
    overflow: hidden;
    opacity: 0.7;
    cursor: pointer;
}

/* X BUTTON */
.remove-artikel {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff6b6b;
    border: none;
    color: white;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.remove-artikel:hover {
    background: #e03131;
}

/* UPLOAD */
.upload-box {
    border: 2px dashed #adb5bd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
}

.upload-box:hover {
    border-color: #7fb3db;
    background: #f8fbff;
}

.upload-box input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
}

/* BUTTONS */
button {
    margin-top: 2em;
    padding: 0.8em 1.5em;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    background-color: #7fb3db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    font-weight: bold;
    letter-spacing: 0.5px;
}

button:hover {
    background-color: #3169a6;
}

/* SUBMIT BUTTON GRÖßER */
button[type="submit"] {
    font-size: 1.15em;
}

/* ADD BUTTON */
#add-artikel {
    background: #eee;
    color: #333;
    margin-top: 1em;
}

#add-artikel:hover {
    background: #ddd;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    #sonderbeschaffung {
        flex-direction: row;
        justify-content: center;
        gap: 2em;
    }

    .formular {
        flex: 1 1 auto;
        max-width: 700px;
        padding: 0 1em;
    }
}