/* calc/assets/css/calculators/window_heat_loss.css */

:root {
    --bg-thermo-card: #FFF1F2; /* Rose 50 */
    --text-thermo-main: #9F1239; /* Rose 900 */
    --text-thermo-muted: #BE123C;
    --accent-thermo: #E11D48; /* Rose 600 */
    --cold-color: #3B82F6;
    --hot-color: #E11D48;
}

/* =========================================
   КАРКАС КАЛЬКУЛЯТОРА (СЕТКА)
   ========================================= */
.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: 16px; }
.group-title { font-size: 16px; font-weight: 700; color: #1E293B; margin: 24px 0 12px; border-bottom: 2px solid #F1F5F9; padding-bottom: 8px;}
.group-title:first-child { margin-top: 0; }

.input-group { margin-bottom: 16px; }
.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[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.input-wrapper select,
.input-wrapper input {
    width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit; background: #fff; appearance: none; 
}
.input-wrapper input { padding-right: 40px; }
.input-wrapper select { cursor: pointer; }
.input-wrapper input:focus, .input-wrapper select:focus { 
    border-color: var(--accent-thermo); 
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15); 
}

.suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 14px; color: var(--text-secondary); }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Подсказка */
.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    background: #FFF1F2; border: 1px solid #FECDD3;
    padding: 16px; border-radius: 12px; margin-top: 24px;
    color: #9F1239; font-size: 13px; line-height: 1.5;
}
.info-alert svg { flex-shrink: 0; color: #E11D48; margin-top: -2px; }

/* =========================================
   ПРАВАЯ КАРТОЧКА (Thermo Theme)
   ========================================= */
.card--thermo { 
    background: var(--bg-thermo-card); color: var(--text-thermo-main); 
    border: 1px solid #FFE4E6; border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(225, 29, 72, 0.15);
    overflow: hidden; padding: 24px 0 0 0; 
}
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }
.card--thermo h2 { color: var(--text-thermo-main); margin: 0 24px 20px; font-size: 18px; text-align: center; }

/* 3D Контейнер и Легенда */
.scene-container-wrapper {
    width: 100%; height: 350px; 
    background: #0F172A; /* Темный фон для контраста тепловизора */
    position: relative;
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.5);
}
#scene-3d {
    width: 100%; height: 100%;
    cursor: grab; touch-action: none;
}
#scene-3d:active { cursor: grabbing; }

.thermo-legend {
    position: absolute; bottom: 16px; left: 16px; right: 16px;
    display: flex; justify-content: space-between;
    font-size: 12px; font-weight: 700; color: #fff;
    pointer-events: none;
}
.legend-cold { color: var(--cold-color); text-shadow: 0 0 8px var(--cold-color); }
.legend-hot { color: var(--hot-color); text-shadow: 0 0 8px var(--hot-color); }

/* Алерт конденсата */
.collision-warning {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
    background: #3B82F6; color: #fff; padding: 8px 16px; border-radius: 99px;
    font-size: 12px; font-weight: 700; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    display: flex; align-items: center; gap: 8px; z-index: 10;
    white-space: nowrap; animation: blinkWarning 2s infinite alternate;
}
@keyframes blinkWarning { from { opacity: 1; } to { opacity: 0.8; } }
.hidden { display: none !important; }

/* Результаты */
.summary-divider { height: 1px; background: rgba(225, 29, 72, 0.1); margin: 24px 24px; }
.thermo-result-main { text-align: center; margin-bottom: 24px; padding: 0 24px; }
.rec-label { font-size: 15px; color: var(--text-thermo-muted); font-weight: 600; margin-bottom: 8px; }
.rec-value { font-size: 48px; font-weight: 800; color: var(--text-thermo-main); line-height: 1; margin-bottom: 8px; text-shadow: 0 4px 10px rgba(225,29,72,0.1); }
.rec-subtext { font-size: 13px; color: var(--text-thermo-muted); }

/* Детали */
.details-list { display: flex; flex-direction: column; background: #fff; border-top: 1px solid #FFE4E6; margin: 0;}
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; font-size: 14px; border-bottom: 1px solid #FFF1F2; }
.detail-row:last-child { border-bottom: none; }
.detail-row strong { font-size: 16px; font-weight: 700; color: var(--accent-thermo); }

/* =========================================
   SEO ИНФОБЛОКИ
   ========================================= */
.info-wrapper { padding: 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.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; }

.rose-icon svg { color: var(--accent-thermo); }
.slate-icon svg { color: #475569; }

.intro-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }

/* SEO-ТАБЛИЦА */
.seo-table-container { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; padding: 24px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.seo-table-container h3 { margin-top: 0; margin-bottom: 20px; color: #1E293B; font-size: 18px; }
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { background: #F8FAFC; padding: 12px 16px; font-weight: 700; color: #475569; border-bottom: 2px solid #E2E8F0; }
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; color: #1E293B; font-weight: 500; }
.seo-table tr:last-child td { border-bottom: none; }

.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: 0 4px 20px rgba(0,0,0,0.03); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; }
.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-rose { background: var(--accent-thermo); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-blue { background: #3B82F6; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.math-expression { background: var(--bg-thermo-card); border: 1px solid #FECDD3; padding: 12px 16px; border-radius: 12px; font-weight: 700; color: var(--accent-thermo); 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; }

.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-thermo); box-shadow: 0 4px 20px rgba(225, 29, 72, 0.15); }
summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
summary.faq-question:hover { background-color: #FFF1F2; }
.faq-section .faq-item[open] summary.faq-question { color: var(--accent-thermo); background: #FFF1F2; }
.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-thermo); }
.faq-answer, .faq-item div[itemprop="text"] { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

@media (max-width: 900px) {
    .row-2-col { grid-template-columns: 1fr; }
    .scene-container-wrapper { height: 280px; }
    .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; }
    .seo-table-container { padding: 16px; overflow-x: auto; }
    .seo-table th, .seo-table td { padding: 12px 10px; font-size: 14px; }
}