/* STOP-BANG Test Styling */

/* Reset & Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg,
        rgba(235, 220, 216, 0.2) 0%,
        rgba(253, 253, 252, 1) 50%,
        rgba(200, 225, 208, 0.15) 100%
    );
}

/* Header */
.test-header {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.test-logo {
    height: 40px;
    width: auto;
}

/* Main Container */
.test-container {
    flex: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 4vw, 2rem);
    width: 100%;
}

/* Progress Bar */
.progress-wrapper {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(53, 94, 84, 0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 100px;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Step Content */
.step-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    box-shadow: var(--shadow-md);
    min-height: 400px;
    margin-bottom: 2rem;
    position: relative;
}

.step {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-family: var(--font-display);
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.step-description {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.step-question {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(53, 94, 84, 0.2);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(53, 94, 84, 0.1);
}

.form-group input.error {
    border-color: var(--danger);
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Checkbox (DSGVO) */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 2rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-group label a {
    color: var(--primary);
    text-decoration: underline;
}

/* Answer Buttons */
.answer-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .answer-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

.answer-btn {
    padding: 1.25rem 2rem;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-btn:hover {
    background: rgba(53, 94, 84, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.answer-btn.selected {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.answer-btn:active {
    transform: translateY(0);
}

/* BMI Calculator */
.bmi-calculator {
    background: rgba(200, 225, 208, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.bmi-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bmi-result {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.bmi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-display);
}

.bmi-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.navigation .btn {
    flex: 1;
    max-width: 200px;
}

#btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Thank You Page */
.thank-you {
    text-align: center;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
}

.thank-you h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.thank-you-email {
    background: rgba(200, 225, 208, 0.3);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    font-weight: 500;
}

.thank-you-steps {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.thank-you-steps h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.thank-you-steps ol {
    margin-left: 1.5rem;
}

.thank-you-steps li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.thank-you-ctas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .thank-you-ctas {
        flex-direction: row;
        justify-content: center;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--white);
    margin-top: 1rem;
    font-size: 1.125rem;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 10000;
    border-top: 3px solid var(--primary);
}

.cookie-consent.hidden {
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    .test-container {
        padding-top: 1rem;
    }

    .step-content {
        padding: 1.5rem;
    }

    .navigation {
        flex-direction: column-reverse;
    }

    .navigation .btn {
        max-width: 100%;
    }
}
