/* basic reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

#survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 2rem;
    position: relative;
}

#progress-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    font-weight: bold;
    background: rgba(0,0,0,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}


.survey-page {
    display: none;
}
.survey-page.active {
    display: block;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.info-text p, .info-text li {
    margin-bottom: 0.75rem;
}

.info-text ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

#next-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    margin: 1rem 0 5rem;
}

#to-page-3-btn, #to-page-4-btn {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0; /* space above and below */
    font-size: 1rem;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

#to-page-3-btn:hover:not(:disabled), #to-page-4-btn:hover:not(:disabled) {
    background: #0056b3;
}
#next-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
#next-btn:not(:disabled):hover {
    background: #0056b3;
}

@media (max-width: 600px) {
    #survey-container {
        padding: 15px;
    }
    h1 {
        font-size: 1.5rem;
    }
    #next-btn, #to-page-3-btn, #to-page-4-btn, button[type="submit"] {
        width: 100%;
    }
}

/* additional controls */
label {
    font-size: 1rem;
}
input, select, textarea {
    font-size: 1rem;
    padding: 0.5rem;
    margin-top: 0.25rem;
    width: 100%;
    max-width: 100%;
}
fieldset {
    border: 1px solid #ccc;
    padding: 0.5rem;
    margin-bottom: 1rem;
}
legend {
    font-weight: bold;
}
button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 0.75rem;
}
button:hover:not(:disabled) {
    background: #0056b3;
}

.nav-btn {
    background: transparent;
    color: #007bff;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}
.nav-btn:hover {
    /* disable default button hover background and underline */
    text-decoration: none;
    opacity: 0.8;
    background: transparent !important;
    color: #0056b3; /* slight color shift on hover */
}

/* toggle switch for consent */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 12px; /* etwas mehr Abstand zum Text */
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: .4s;
    border-radius: 50%;
}
.toggle-switch input:checked + .slider {
    background: #007bff;
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

.consent-label {
    display: flex;
    align-items: center;
    margin: 3rem 0;
    font-size: 1rem;
}

.consent-text {
    line-height: 1.4;
}