/* calc/assets/css/calculators/electrical_breaker.css */

:root {
    /* Cyber Spark Palette */
    --bg-spark: #EFF6FF; /* Blue 50 */
    --text-spark-main: #1E3A8A; /* Blue 900 */
    --text-spark-muted: #3B82F6; /* Blue 500 */
    
    --accent-blue: #2563EB; /* Blue 600 */
    --accent-blue-glow: rgba(37, 99, 235, 0.2);
    
    --accent-amber: #F59E0B; /* Amber 500 */
    --accent-red: #DC2626; /* Red 600 */
    --accent-green: #059669; /* Emerald 600 */
    
    --border-spark: #DBEAFE; /* Blue 100 */
}

.calc-header { margin-bottom: 32px; }

/* СЕТКА */
.calc-grid { 
    display: grid !important; grid-template-columns: 1fr; gap: 24px; align-items: start; 
    width: 100%; box-sizing: border-box; 
}
@media (min-width: 900px) { 
    .calc-grid { grid-template-columns: 1fr 1fr !important; } 
}

/* ФИКС ВЫСОТЫ КОНТЕЙНЕРА */
.calc-inputs, .calc-results { 
    min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; overflow: visible !important; height: auto !important; 
}

.group-title { 
    font-size: 14px; font-weight: 800; margin: 0 0 8px 0; 
    text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;
}
.input-hint { font-size: 13px; line-height: 1.5; margin-bottom: 16px; }

/* СЕТКА ПРИБОРОВ */
.appliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .appliance-grid { grid-template-columns: 1fr; } }

.app-card { cursor: pointer; }
.app-checkbox { display: none; }
.app-content {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 12px;
    transition: all 0.2s; height: 100%; box-sizing: border-box;
}
.app-card:hover .app-content { border-color: #BFDBFE; background: #FFF; }
.app-checkbox:checked + .app-content {
    border-color: var(--accent-blue); background: #EFF6FF;
    box-shadow: 0 4px 12px var(--accent-blue-glow);
}
.app-icon { font-size: 24px; line-height: 1; filter: grayscale(20%); transition: transform 0.2s;}
.app-checkbox:checked + .app-content .app-icon { filter: none; transform: scale(1.1);}

.app-info { display: flex; flex-direction: column; gap: 2px; }
.app-name { font-size: 13px; font-weight: 800; color: #334155; transition: color 0.2s;}
.app-power { font-size: 11px; font-weight: 700; color: #94A3B8;}
.app-checkbox:checked + .app-content .app-name { color: #1E3A8A; }
.app-checkbox:checked + .app-content .app-power { color: var(--accent-blue); }

/* РУЧНОЙ ВВОД */
.calc-input {
    width: 100%; padding: 14px 16px; font-size: 18px; font-weight: 800;
    border: 2px solid #E2E8F0; border-radius: 12px; background: #F8FAFC;
    color: #1E293B; outline: none; transition: all 0.3s; box-sizing: border-box;
    font-family: monospace; letter-spacing: 1px;
}
.calc-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 4px var(--accent-blue-glow); background: #FFF;}

/* ВЛАЖНАЯ ЗОНА ТОГГЛ */
.wet-room-toggle { display: block; cursor: pointer; margin-top: 16px; }
.wet-room-toggle input { display: none; }
.wrt-content {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    background: #FFF; border: 2px solid #E2E8F0; border-radius: 16px;
    transition: all 0.3s;
}
.wrt-icon { font-size: 28px; line-height: 1; opacity: 0.5; transition: all 0.3s;}
.wrt-text { display: flex; flex-direction: column; gap: 4px; flex: 1;}
.wrt-title { font-size: 14px; font-weight: 800; color: #334155;}
.wrt-desc { font-size: 11px; font-weight: 500; color: #64748B; line-height: 1.4;}

.wrt-switch {
    width: 44px; height: 24px; background: #E2E8F0; border-radius: 99px; position: relative;
    transition: background 0.3s; flex-shrink: 0;
}
.wrt-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    background: #FFF; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wet-room-toggle input:checked + .wrt-content { border-color: #38BDF8; background: #F0F9FF;}
.wet-room-toggle input:checked + .wrt-content .wrt-icon { opacity: 1; filter: drop-shadow(0 0 8px rgba(56,189,248,0.5));}
.wet-room-toggle input:checked + .wrt-content .wrt-title { color: #0284C7;}
.wet-room-toggle input:checked + .wrt-content .wrt-switch { background: #38BDF8;}
.wet-room-toggle input:checked + .wrt-content .wrt-switch::after { transform: translateX(20px);}


/* ========================================================
   ПРАВЫЙ БЛОК (CYBER SPARK - ЯДЕРНЫЙ ФИКС CMS)
   ======================================================== */
.calc-results { background: transparent !important; background-color: transparent !important; border: none !important; box-shadow: none !important; border-radius: 0 !important;}

div#result-card.card.card--result.card--cyber-spark { 
    background-color: var(--bg-spark) !important; 
    background-image: linear-gradient(135deg, #FFFFFF, #EFF6FF) !important;
    color: var(--text-spark-main) !important; 
    border: 1px solid var(--border-spark) !important; 
    border-radius: 24px !important; 
    box-shadow: 0 24px 48px -12px rgba(37, 99, 235, 0.15) !important;
    overflow: hidden !important; 
    padding: 32px 24px !important; 
    display: flex !important; 
    flex-direction: column !important;
    box-sizing: border-box !important;
    isolation: isolate !important; 
    -webkit-appearance: none !important;
    outline: none !important;
    position: relative !important;
    z-index: 1 !important;
    height: auto !important; 
    min-height: max-content !important;
}

div#result-card.card.card--result.card--cyber-spark::before, 
div#result-card.card.card--result.card--cyber-spark::after { display: none !important; content: none !important; background: transparent !important; box-shadow: none !important;}

.hidden { display: none !important; }

.spark-title { 
    color: var(--text-spark-muted); margin: 0 0 24px 0; 
    font-size: 13px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; text-align: center;
}

/* ОШИБКА ПЕРЕГРУЗКИ */
.overload-warning {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
    background: #FEF2F2; border: 2px dashed #F87171; padding: 32px 24px; border-radius: 16px;
    animation: pulseRed 2s infinite;
}
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.ow-icon { font-size: 40px; }
.ow-text { font-size: 14px; font-weight: 700; color: #991B1B; line-height: 1.5;}

/* ЭЛЕКТРОЩИТОК UI */
.result-board { width: 100%; display: flex; flex-direction: column; animation: fadeIn 0.4s ease;}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.rb-header {
    background: #1E293B; color: #F8FAFC; padding: 16px 24px; border-radius: 16px;
    font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.component-list { display: flex; flex-direction: column; align-items: center; width: 100%;}

.comp-item {
    display: flex; align-items: center; gap: 16px; width: 100%;
    background: #FFFFFF; border: 1px solid #E2E8F0; padding: 20px; border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02); z-index: 2; position: relative;
}
.comp-icon { 
    width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0; box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.comp-info { display: flex; flex-direction: column; gap: 4px; }
.comp-label { font-size: 11px; font-weight: 800; color: #64748B; text-transform: uppercase; letter-spacing: 0.05em;}
.comp-value { font-size: 24px; font-weight: 900; line-height: 1; letter-spacing: -0.5px;}
.comp-hint { font-size: 12px; font-weight: 500; color: #94A3B8; margin-top: 2px;}

.wire-connector {
    width: 6px; height: 20px; background: repeating-linear-gradient(45deg, #CBD5E1, #CBD5E1 4px, #94A3B8 4px, #94A3B8 8px);
    margin: 0; z-index: 1;
}


/* ========================================================
   SEO ИНФОБЛОКИ (БЕЗ ЧЕРНОГО)
   ======================================================== */
.info-wrapper { padding: 60px 0; margin-top: 60px; border-top: 1px solid #E2E8F0; margin-bottom: 20px; }
.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 900; line-height: 1.3; }

.header-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; margin-top: -4px; }

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; width: 100%; box-sizing: border-box;}
.formula-card { background: #FFFFFF; border: 2px solid #E2E8F0; border-radius: 24px; padding: 24px; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.02);}
.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: 800; line-height: 1.3; }

.badge { padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;}

.soft-divider { border: none; height: 2px; background: #E2E8F0; margin: 48px 0; }

.seo-table-container { background: #FFFFFF; border: 2px solid #E2E8F0; border-radius: 16px; padding: 24px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); overflow: hidden; }
.seo-table-container h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; font-weight: 900;}
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { padding: 12px 16px; font-weight: 800; border-bottom: 2px solid #CBD5E1;}
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; font-weight: 600; line-height: 1.5;}
.seo-table tr:last-child td { border-bottom: none; }

.faq-section .faq-item { background: #FFFFFF; border: 2px solid #E2E8F0; border-radius: 12px; margin-bottom: 12px; transition: all 0.2s; }
.faq-section .faq-item[open] { border-color: #2563EB; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1); }
summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
summary.faq-question:hover { background-color: #F8FAFC; }
.faq-question::after { content: '+'; font-size: 20px; font-weight: 400; line-height: 1; color: #2563EB;}
.faq-question .icon-plus { display: none; }
.faq-section .faq-item[open] summary.faq-question::after { content: '−'; color: #EF4444;}
.faq-answer, .faq-item div[itemprop="text"] { padding: 20px; line-height: 1.6; font-size: 15px; font-weight: 500;}

/* МОБИЛКИ */
@media (max-width: 900px) {
    .calc-grid { display: flex !important; flex-direction: column !important; gap: 16px !important; }
    .formulas-grid { grid-template-columns: 1fr !important; gap: 16px !important; margin-bottom: 32px !important; }
    div#result-card.card.card--result.card--cyber-spark { border-radius: 20px !important; padding: 24px 16px !important; margin-top: 16px !important;}
    .seo-table { display: block !important; width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
}