/* ============================================
   CLEARFUNERALCOSTS - QUESTIONNAIRE STYLES
   Стили для анкеты
   ============================================ */

/* CSS VARIABLES - Brandbook Compliant */
:root {
    /* Primary Colors from Brandbook */
    --primary-navy: #1e3a5f;
    --primary-navy-light: #2d5a8a;
    --primary-navy-dark: #152c47;
    
    /* Accent Colors from Brandbook */
    --accent-sage: #5a7a5f;
    --accent-sage-light: #7a9a7f;
    --accent-sage-pale: #e8f3ea;
    --accent-sage-dark: #4a6a4f;
    
    /* Neutral Colors from Brandbook */
    --neutral-900: #1a202c;
    --neutral-800: #2d3748;
    --neutral-700: #4a5568;
    --neutral-600: #718096;
    --neutral-500: #a0aec0;
    --neutral-400: #cbd5e0;
    --neutral-300: #e2e8f0;
    --neutral-200: #edf2f7;
    --neutral-100: #f7fafc;
    --neutral-50: #fafbfc;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    /* Typography from Brandbook */
    --text-base: 20px;
    --text-sm: 16px;
    --text-md: 18px;
    --text-lg: 24px;
    --text-xl: 28px;
    --text-h1: 48px;
    --text-h2: 36px;
    --text-h3: 28px;
    --text-h4: 24px;
    --text-h5: 20px;
    
    /* Button Sizes from Brandbook */
    --btn-height-md: 48px;
    --btn-height-lg: 56px;
    --btn-padding-md: 16px 28px;
    --btn-padding-lg: 20px 32px;
    
    /* Legacy variables for compatibility */
    --burgundy-accent: var(--accent-sage);
    --burgundy-hover: var(--accent-sage-dark);
    --pure-white: var(--bg-primary);
    --warm-grey-bg: var(--bg-secondary);
    --navy-primary: var(--primary-navy);
    --sage-green: var(--accent-sage);
    --border-subtle: var(--neutral-300);
}

/* QUESTIONNAIRE SPECIFIC STYLES */

/* Progress Indicator */
.progress-container {
    position: sticky;
    top: 0;
    background: white;
    padding: 16px 0;
    margin-bottom: 24px;
    z-index: 100;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-sage) 0%, var(--primary-navy) 100%);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: var(--text-base);
    color: var(--neutral-600);
    font-weight: 600;
    line-height: 1.4;
}

/* Save & Continue Later */
.save-for-later {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.save-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(90, 122, 95, 0.15);
}

.save-icon {
    font-size: 1rem;
}

.save-description {
    font-size: var(--text-xs);
    color: var(--neutral-600);
    margin: 4px 0 0 0;
    text-align: center;
    line-height: 1.3;
}

/* Back Navigation */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #e9ecef;
    color: #495057;
}

/* Validation Errors */
.validation-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
}

.validation-error ul {
    margin: 0;
    padding-left: 20px;
}

.validation-error li {
    margin: 4px 0;
}

/* Incomplete Data Prompt */
.incomplete-data-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff3cd;
    border-bottom: 1px solid #ffeaa7;
    padding: 16px;
    z-index: 1000;
    text-align: center;
}

.prompt-content h3 {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 1.1rem;
}

.prompt-content p {
    margin: 0 0 12px 0;
    color: #856404;
    font-size: 0.9rem;
}

.prompt-button {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 12px;
}

.prompt-button:hover {
    background: #0056b3;
    color: white;
}

.prompt-dismiss {
    background: none;
    border: 1px solid #856404;
    color: #856404;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.prompt-dismiss:hover {
    background: #856404;
    color: white;
}
.question-card {
    background: var(--pure-white);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-subtle);
}

.question-header {
    margin-bottom: 24px;
}

.question-title {
    font-size: var(--text-h3);
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 12px;
    line-height: 1.3;
}

.question-subtitle {
    color: var(--neutral-600);
    font-size: var(--text-base);
    margin: 0;
    line-height: 1.5;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    background: var(--bg-secondary);
    border: 2px solid var(--neutral-300);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: var(--accent-sage);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 122, 95, 0.15);
}

.option.selected {
    border-color: var(--accent-sage) !important;
    background: var(--bg-primary) !important;
    box-shadow: 0 4px 12px rgba(90, 122, 95, 0.2) !important;
    transform: translateY(-2px) !important;
}

.option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-text {
    flex: 1;
}

.option-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 6px;
    line-height: 1.3;
}

.option-description {
    color: var(--neutral-600);
    font-size: var(--text-base);
    margin-bottom: 6px;
    line-height: 1.4;
}

.option-meta {
    color: var(--accent-sage);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
}

.option-selector {
    width: 24px;
    height: 24px;
    border: 2px solid var(--neutral-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option.selected .option-selector {
    border-color: var(--accent-sage) !important;
    background: var(--accent-sage) !important;
}

.option-selector-inner {
    width: 10px;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option.selected .option-selector-inner {
    opacity: 1 !important;
}

.progress-section {
    margin: 24px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--burgundy-accent), var(--sage-green));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: var(--pure-white);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.service-definition {
    background: var(--warm-grey-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    border-left: 4px solid var(--burgundy-accent);
}

.service-definition h4 {
    color: var(--navy-primary);
    font-size: var(--font-size-h4);
    font-weight: 600;
    margin-bottom: 12px;
}

.service-definition p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.service-definition p:last-child {
    margin-bottom: 0;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Optimized for mobile readability */
    }
    
    .question-card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .question-title {
        font-size: var(--text-h4); /* Optimized for mobile */
    }
    
    .option {
        padding: 20px;
        min-height: 70px;
    }
    
    .option-title {
        font-size: var(--text-base);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .nav-button {
        padding: var(--btn-padding-md);
        height: var(--btn-height-md);
        font-size: var(--text-sm);
        min-width: 100px;
    }
    
    .save-for-later {
        top: 10px;
        right: 10px;
    }
    
    .save-button {
        padding: 10px 12px;
        font-size: var(--text-xs);
    }
}

/* QUESTIONNAIRE COLOR PALETTE - Variables inherited from main.css */

/* QUESTIONNAIRE CONTAINER */
.questionnaire-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* LEGAL DISCLAIMER BANNER */
.legal-disclaimer-banner {
    background: rgba(245, 158, 11, 0.95);
    color: #78350f;
    padding: 16px 20px;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--soft-amber);
    font-weight: 500;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* HEADER */
.questionnaire-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.company-logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--navy-primary);
    margin-bottom: 8px;
}

.questionnaire-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--charcoal-text);
    margin-bottom: 12px;
}

.questionnaire-subtitle {
    font-size: 1.1rem;
    color: var(--muted-blue);
    max-width: 600px;
    margin: 0 auto;
}

/* PROGRESS INDICATOR */
.progress-container {
    background: var(--pure-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-primary);
    margin-bottom: 16px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--burgundy-accent), var(--navy-primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--muted-blue);
    font-size: 0.9rem;
}

/* QUESTIONNAIRE FORM */
.questionnaire-form {
    background: var(--pure-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--navy-primary);
    margin-bottom: 20px;
    text-align: center;
}

.step-description {
    font-size: 1.1rem;
    color: var(--muted-blue);
    text-align: center;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--charcoal-text);
    margin-bottom: 12px;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--pure-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--burgundy-accent);
    box-shadow: 0 0 0 3px rgba(116, 76, 44, 0.1);
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--pure-white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--burgundy-accent);
    box-shadow: 0 0 0 3px rgba(116, 76, 44, 0.1);
}

/* RADIO BUTTONS */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--pure-white);
}

.radio-item:hover {
    border-color: var(--burgundy-accent);
    background: var(--warm-grey-bg);
}

.radio-item.selected {
    border-color: var(--burgundy-accent);
    background: rgba(116, 76, 44, 0.05);
}

.radio-input {
    margin-right: 12px;
    transform: scale(1.2);
}

.radio-label {
    font-weight: 500;
    color: var(--charcoal-text);
    cursor: pointer;
}

.radio-description {
    font-size: 0.9rem;
    color: var(--muted-blue);
    margin-top: 4px;
}

/* CHECKBOXES */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--pure-white);
}

.checkbox-item:hover {
    border-color: var(--burgundy-accent);
    background: var(--warm-grey-bg);
}

.checkbox-item.selected {
    border-color: var(--burgundy-accent);
    background: rgba(116, 76, 44, 0.05);
}

.checkbox-input {
    margin-right: 8px;
    transform: scale(1.1);
}

.checkbox-label {
    font-size: 0.95rem;
    color: var(--charcoal-text);
    cursor: pointer;
}

/* TEXTAREA */
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
    background: var(--pure-white);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--burgundy-accent);
    box-shadow: 0 0 0 3px rgba(116, 76, 44, 0.1);
}

/* NAVIGATION BUTTONS */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.nav-button {
    padding: var(--btn-padding-lg);
    height: var(--btn-height-lg);
    border: 2px solid var(--accent-sage);
    border-radius: 8px;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.nav-button.prev {
    background: var(--bg-primary);
    color: var(--accent-sage);
    border-color: var(--accent-sage);
}

.nav-button.prev:hover {
    background: var(--accent-sage);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 122, 95, 0.2);
}

.nav-button.next {
    background: var(--accent-sage) !important;
    color: var(--bg-primary) !important;
    border: 2px solid var(--accent-sage) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.nav-button.next:hover {
    background: var(--accent-sage-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 122, 95, 0.2);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ERROR MESSAGES */
.error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626;
}

/* SUCCESS MESSAGE */
.success-message {
    background: #d1fae5;
    color: var(--success-green);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
    text-align: center;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .questionnaire-container {
        padding: 16px;
    }
    
    .questionnaire-form {
        padding: 24px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px; /* Consistent mobile typography */
    }
    
    .questionnaire-header {
        margin-bottom: 24px;
    }
    
    .questionnaire-title {
        font-size: 1.75rem; /* Optimized for small mobile */
    }
    
    .questionnaire-form {
        padding: 20px;
    }
    
    .step-title {
        font-size: 1.4rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px 14px;
    }
}
