/* umfragetool/style.css */

@font-face {
    font-family: 'Univers 55';
    src: url('fonts/Univers.eot');
    src: url('fonts/Univers.eot?#iefix') format('embedded-opentype'),
        url('fonts/Univers.woff2') format('woff2'),
        url('fonts/Univers.woff') format('woff'),
        url('fonts/Univers.ttf') format('truetype'),
        url('fonts/Univers.svg#Univers') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Allgemeines Layout */
body {
    font-family: 'Univers 55', sans-serif;
    background-color: #f4f4f4;
    margin: 50px 0;
    line-height: 150%;
    color: #333;
}

/* Container für Formulare (Backend/Login) */
.container,
.login_container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: auto;
    text-align: center;
    box-sizing: border-box;
}

.login_container {
    width: 90%;
    max-width: 400px;
}

.container {
    width: 95%;
    max-width: 900px;
}

/* Listenstil */
li.textausgabe {
    list-style: none;
    padding: 10px 20px;
    text-align: left;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, .05);
    border-radius: 4px;
}

li.textausgabe:nth-child(odd) {
    background: white;
    border: 1px solid #eee;
}

/* Formularfelder Backend */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: #DD0015;
    outline: none;
}

input[type="submit"],
.btn-submit {
    background-color: #76B729;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
    border: none;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.3s;
    margin-top: 20px;
}

input[type="submit"]:hover,
.btn-submit:hover {
    background-color: #DD0015;
}

/* Kopfzeilen */
h1,
h2,
h3 {
    color: #DD0015;
}

/* Diagramm */
canvas {
    margin-top: 20px;
    max-width: 100%;
}

/* Buttons */
.backbutton,
button {
    background-color: #76B729;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.backbutton:hover,
button:hover {
    background-color: #DD0015;
}


/* =========================================================================
   UMFRAGE FRONTEND (Boxed Layout, horizontales Radio-Design)
   ========================================================================= */

.survey-page {
    margin: 0;
    padding: 30px 10px;
    background-color: #eef2f5;
}

.survey-container {
    max-width: 800px;
    padding: 40px 30px;
}

.logo-wrapper {
    margin-bottom: 20px;
}

.survey-logo {
    max-width: 250px;
    height: auto;
}

.survey-header {
    margin-bottom: 40px;
}

.survey-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.anonym-hint {
    color: #76B729;
    font-size: 16px;
    margin-bottom: 20px;
}

.info-box {
    background: #f9f9f9;
    border-left: 4px solid #DD0015;
    padding: 15px;
    border-radius: 6px;
    text-align: left;
}

.legend-scale {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.legend-badge.good {
    background-color: #76B729;
}

.legend-badge.bad {
    background-color: #DD0015;
}

/* Box für jede Frage */
.question-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.question-legend {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding: 0;
    width: 100%;
}

/* Radiobuttons horizontal anordnen */
.radio-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Bricht auf ganz schmalen Displays um */
    gap: 25px;
    /* Abstand zwischen den einzelnen Noten-Blöcken */
    margin-top: 10px;
}

/* Klickbarer Bereich für Radio + Zahl */
.radio-label {
    display: flex;
    align-items: center;
    /* Zentriert Radiobutton und Zahl vertikal */
    cursor: pointer;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: background-color 0.2s, border-color 0.2s;
}

.radio-label:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Styling des nativen Radiobuttons */
.radio-label input[type="radio"] {
    margin: 0 10px 0 0;
    /* Sorgt für den gewünschten Abstand zwischen Auswahlkreis und Zahl */
    transform: scale(1.3);
    /* Macht den Punkt für Mobile etwas besser treffbar */
    cursor: pointer;
}

.radio-text {
    font-size: 18px;
    font-weight: bold;
    color: #444;
}

/* Freitextfeld */
.box-textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 15px;
    font-size: 16px;
    background: #fafafa;
    box-sizing: border-box;
    resize: vertical;
}

.box-textarea:focus {
    border-color: #76B729;
    background: white;
    outline: none;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .survey-container {
        padding: 25px 15px;
    }

    .question-box {
        padding: 15px;
    }

    .question-legend {
        font-size: 16px;
    }

    .radio-row {
        gap: 10px;
    }

    .radio-label {
        padding: 8px 12px;
    }
}

/* --- Fix für die horizontale Ausrichtung der Radiobuttons --- */
fieldset {
    display: flex;
    flex-direction: column;
}

.radio-group,
.radio-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label,
.radio-row label,
fieldset label {
    display: inline-flex !important;
    /* Hebt den störenden Zeilenumbruch auf */
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 15px 0 0 !important;
    cursor: pointer;
}

input[type="radio"] {
    margin: 0 8px 0 0 !important;
    /* Abstand zwischen Kreis und Zahl */
    transform: scale(1.3);
    /* Macht den Punkt etwas größer/besser klickbar */
    display: inline-block !important;
}
