/* ===================================================================
   SirusMed – Anamnesebogen Styles
   Digital Maturity Assessment
   =================================================================== */

/* ===== HERO ===== */
.anamnese-hero {
    padding: 8rem 0 3rem;
    background: linear-gradient(165deg, var(--bg-white) 0%, var(--blue-50) 50%, var(--bg-white) 100%);
    text-align: center;
    position: relative;
}

.anamnese-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.anamnese-hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

.anamnese-hero .section-label {
    justify-content: center;
}


/* ===== PROGRESS ===== */
.progress-container {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0 1rem;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    flex-shrink: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-section);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--blue-primary);
    color: #fff;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 4px rgba(26, 143, 196, 0.15);
}

.progress-step.active .step-label {
    color: var(--blue-primary);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.progress-step.completed .step-label {
    color: #16a34a;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
    margin-bottom: 1.2rem;
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #16a34a;
    border-radius: 1px;
    transition: width 0.4s ease;
}

.progress-bar-track {
    height: 4px;
    background: var(--bg-section);
    border-radius: 2px;
    overflow: hidden;
}

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


/* ===== FORM SECTION ===== */
.anamnese-form-section {
    padding: 3rem 0 4rem;
    min-height: 60vh;
}


/* ===== FORM STEPS ===== */
.form-step {
    display: none;
    animation: fadeStepIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeStepIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ===== STEP HEADER ===== */
.step-header {
    margin-bottom: 2rem;
}

.step-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--blue-primary);
    background: var(--blue-pale);
    border: 1px solid rgba(26, 143, 196, 0.15);
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.result-badge {
    background: #dcfce7;
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.15);
}

.step-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}


/* ===== FORM CARD ===== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.card-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blue-primary);
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-subtitle.negative-label {
    color: #dc2626;
    border-bottom-color: rgba(220, 38, 38, 0.15);
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}


/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 2rem;
}

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

.form-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.negative-question {
    background: #fef2f2;
    border: 1px solid rgba(220, 38, 38, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

.negative-question .form-label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    margin-right: 0.5rem;
    vertical-align: middle;
}


/* ===== RADIO CARDS (Demographics) ===== */
.radio-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.radio-card {
    cursor: pointer;
    flex: 1;
    min-width: 100px;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-inner {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: all 0.2s ease;
}

.radio-card:hover .radio-card-inner {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

.radio-card.selected .radio-card-inner,
.radio-card input:checked + .radio-card-inner {
    border-color: var(--blue-primary);
    background: var(--blue-pale);
    color: var(--blue-primary);
    font-weight: 600;
}


/* ===== LIKERT SCALE ===== */
.likert-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.likert-option {
    cursor: pointer;
    flex: 1;
    min-width: 100px;
    position: relative;
}

.likert-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.likert-option span {
    display: block;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: all 0.2s ease;
    line-height: 1.3;
}

.likert-option:hover span {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

.likert-option.selected span,
.likert-option input:checked + span {
    border-color: var(--blue-primary);
    background: var(--blue-primary);
    color: #fff;
    font-weight: 600;
}

.negative-question .likert-option.selected span,
.negative-question .likert-option input:checked + span {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}


/* ===== SLIDERS ===== */
.slider-container {
    padding: 0.5rem 0;
}

.form-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #fecaca 0%, #fde68a 25%, #bae6fd 50%, #bbf7d0 75%, #16a34a 100%);
    outline: none;
    cursor: pointer;
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue-primary);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.form-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.form-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue-primary);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.slider-value-display {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.slider-value-display strong {
    font-size: 1.2rem;
    color: var(--blue-primary);
    font-family: 'JetBrains Mono', monospace;
}


/* ===== TEXTAREA ===== */
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-white);
    resize: vertical;
    transition: border-color 0.2s ease;
    line-height: 1.6;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(26, 143, 196, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}


/* ===== FORM NAVIGATION ===== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}


/* ===== RESULT SECTION ===== */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-md);
}

.result-score-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.result-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
}

.result-circle svg {
    width: 100%;
    height: 100%;
}

.result-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.result-percent {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.result-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-level {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}


/* ===== CATEGORY BREAKDOWN ===== */
.result-categories {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.result-category {
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.result-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-cat-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-cat-percent {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.result-cat-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.result-cat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}


/* ===== EMAIL SECTION ===== */
.result-email-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.result-email-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.result-email-section p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.email-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.form-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(26, 143, 196, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.email-status {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    display: none;
}

.email-status.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.email-status.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.15);
}

.email-status.sending {
    display: block;
    background: var(--blue-pale);
    color: var(--blue-primary);
    border: 1px solid rgba(26, 143, 196, 0.15);
}

.email-status.info {
    display: block;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}


/* ===== RESULT ACTIONS ===== */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .progress-steps {
        gap: 0;
    }

    .progress-line {
        width: 24px;
        margin: 0 0.2rem;
    }

    .step-label {
        font-size: 0.55rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .form-card {
        padding: 1.25rem;
    }

    .radio-group-inline {
        flex-direction: column;
    }

    .radio-card {
        min-width: unset;
    }

    .likert-group {
        flex-direction: column;
    }

    .likert-option {
        min-width: unset;
    }

    .likert-option span {
        padding: 0.7rem 1rem;
        text-align: left;
    }

    .email-form-row {
        flex-direction: column;
    }

    .result-circle {
        width: 130px;
        height: 130px;
    }

    .result-percent {
        font-size: 2rem;
    }

    .anamnese-hero h1 {
        font-size: 1.4rem;
    }

    .negative-question {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .progress-container {
        top: 56px;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        width: 16px;
    }
}
