/* --- Стили для Drywall Calculator (Violet Theme) --- */
:root {
    --accent-violet: #8B5CF6;
    --accent-violet-light: #F5F3FF;
    --gradient-violet-card: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

/* (Остальные базовые стили input-group, calc-grid остаются те же...) */
.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input { width: 100%; padding: 14px; padding-right: 60px; font-size: 16px; font-weight: 500; border: 1px solid #E5E7EB; border-radius: 12px; outline: none; transition: all 0.2s; font-family: var(--font-main); }
.input-wrapper input:focus { border-color: var(--accent-violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); font-size: 13px; pointer-events: none; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

/* --- Option Cards (Radio Buttons) --- */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-card { position: relative; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; width: 0; height: 0; } /* Скрываем нативный радио */
.option-content { border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; transition: all 0.2s; height: 100%; }
.opt-title { font-weight: 700; font-size: 16px; color: var(--text-primary); margin-bottom: 2px; }
.opt-desc { font-size: 12px; color: var(--text-secondary); }
.option-card input:checked + .option-content { border-color: var(--accent-violet); background: var(--accent-violet-light); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15); }
.option-card input:checked + .option-content .opt-title { color: var(--accent-violet); }

/* --- Checkbox Styled --- */
.checkbox-card-styled { display: block; cursor: pointer; position: relative; }
.checkbox-card-styled input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.chk-content { border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; background: #fff; transition: all 0.2s; }
.chk-icon { color: var(--text-secondary); background: #F3F4F6; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s;}
.chk-text { display: flex; flex-direction: column; flex-grow: 1; }
.chk-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.chk-desc { font-size: 12px; color: var(--text-secondary); }

.chk-check-icon { color: var(--accent-violet); opacity: 0; transform: scale(0.5); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }

.checkbox-card-styled input:checked + .chk-content { border-color: var(--accent-violet); background: var(--accent-violet-light); }
.checkbox-card-styled input:checked + .chk-content .chk-icon { background: var(--accent-violet); color: #fff; }
.checkbox-card-styled input:checked + .chk-content .chk-title { color: var(--accent-violet); }
.checkbox-card-styled input:checked + .chk-content .chk-check-icon { opacity: 1; transform: scale(1); }

/* --- Result Card & Visual --- */
.card--violet { background: var(--gradient-violet-card); color: #fff; border: none; }
.card--violet h2 { color: #fff; font-size: 18px; margin-bottom: 16px; opacity: 0.95; }

.drywall-visual-box {
    background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 24px;
    height: 320px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
#wall-svg { width: 100%; height: 100%; }

/* АНИМАЦИЯ ДЛЯ SVG ЭЛЕМЕНТОВ */
#wall-svg rect, 
#wall-svg line, 
#wall-svg circle {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Легенда */
.visual-legend { 
    display: flex; 
    gap: 16px; 
    font-size: 11px; 
    color: #4B5563; /* Более темный текст */
    margin-top: 16px; 
    justify-content: center; 
    width: 100%; 
    flex-wrap: wrap; 
}
.visual-legend span { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-weight: 600; 
    background: #F3F4F6;
    padding: 4px 8px;
    border-radius: 6px;
}
.dot-cd { width: 10px; height: 10px; background: #EF4444; border-radius: 2px; }
.dot-ud { width: 10px; height: 10px; background: #3B82F6; border-radius: 2px; }
.dot-h { width: 8px; height: 8px; background: #374151; border-radius: 50%; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; background: rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; }
.sum-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sum-col span { font-size: 11px; opacity: 0.8; margin-bottom: 4px; }
.sum-col strong { font-size: 18px; font-weight: 700; }
.mt-4 { margin-top: 16px; }
.detail-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.detail-row:last-child { border-bottom: none; }
.detail-row strong { font-weight: 600; }
.detail-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 12px 0; }


/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ (Адаптация под Violet/Drywall) --- */

.info-wrapper {
    padding: 60px 0 60px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.info-wrapper .container {
    max-width: 800px;
    margin: 0 auto;
}

/* Заголовки с иконками */
.icon-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    flex-shrink: 0;
    margin-top: -4px;
}

.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

/* Цвета иконок */
.blue-icon svg { color: #2563EB; }
.orange-icon svg { color: #F59E0B; }
.green-icon svg { color: #10B981; }
.red-icon svg { color: #EF4444; }

/* Маленькие подзаголовки */
.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.intro-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* --- Секция Формул --- */
.formulas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.formula-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg); 
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* Вертикальный хедер (бейдж сверху) */
.formula-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.formula-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Бейджи */
.badge-blue {
    background: #2563EB; color: #fff;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}
.badge-green {
    background: #10B981; color: #fff;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}

.formula-card p {
    font-size: 14px; color: var(--text-secondary);
    margin: 0; line-height: 1.5; font-weight: 500;
}

.formula-card small {
    display: block; margin-top: 12px; font-size: 12px; color: var(--text-secondary); opacity: 0.7;
}

.math-expression {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--accent-violet); /* Violet Accent */
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Разделитель */
.soft-divider {
    border: none; height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Описание */
.calc-description p {
    font-size: 16px; line-height: 1.7;
    color: var(--text-secondary); margin-bottom: 24px;
}
.calc-description strong { color: var(--text-primary); }

/* FAQ (Новый стиль под Violet) */
.faq-section .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--accent-violet); 
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15); /* Violet Shadow */
}

summary.faq-question {
    padding: 16px 20px; cursor: pointer;
    font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative;
    display: flex; justify-content: space-between;
    align-items: center; transition: background 0.2s;
}

summary.faq-question:hover { background-color: #F9FAFB; }

.faq-section .faq-item[open] summary.faq-question {
    color: var(--accent-violet);
    background: var(--accent-violet-light);
}

.faq-question::after {
    content: '+'; font-size: 20px;
    color: var(--text-secondary); font-weight: 400; line-height: 1;
}
.faq-question .icon-plus { display: none; }

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−'; color: var(--accent-violet);
}

.faq-answer {
    padding: 20px; color: var(--text-secondary);
    line-height: 1.6; font-size: 15px;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; border-radius: 12px; }
    .header-icon svg { width: 20px; height: 20px; }
    
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}