/* --- Wire Size Theme --- */
:root {
    --w-bg: #FFEDD5;         /* Light Orange */
    --w-card-bg: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    --w-accent: #EA580C;     /* Dark Orange */
    --w-copper: #B45309;     /* Copper Color */
    --w-alum: #94A3B8;       /* Aluminum Color */
    --w-sheath-black: #1F2937;
}

/* --- ЗАГОЛОВОК --- */
.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.1fr 0.9fr; } }

/* Inputs */
.section-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    color: #9CA3AF; margin-bottom: 12px; font-weight: 700;
}

.input-group { margin-bottom: 24px; position: relative; }
.input-group label { display: block; font-size: 14px; font-weight: 700; color: #4B5563; margin-bottom: 8px; }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input {
    width: 100%; padding: 14px; padding-right: 40px; font-size: 16px; font-weight: 600;
    border: 2px solid #E5E7EB; border-radius: 12px; outline: none; transition: border 0.2s;
    background: #fff; font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--w-accent); }
.suffix { position: absolute; right: 14px; color: #9CA3AF; font-weight: 500; pointer-events: none; }

/* Radio Chips */
.radio-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; border: 2px solid #E5E7EB; border-radius: 12px;
    padding: 10px; background: #fff; height: 100%;
    font-weight: 700; font-size: 14px; color: #374151; transition: all 0.2s;
}
.chip span small { font-weight: 500; font-size: 11px; color: #9CA3AF; margin-top: 2px; }

.chip input:checked + span {
    border-color: var(--w-accent); background: #FFF7ED;
    color: var(--w-accent); box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}
.chip input:checked + span small { color: var(--w-accent); opacity: 0.8; }

/* Quick Pills */
.quick-pills { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pill-btn {
    background: #F3F4F6; border: none; padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600; color: #4B5563; cursor: pointer; transition: all 0.2s;
}
.pill-btn:hover { background: #FFEDD5; color: var(--w-accent); }

/* Custom Select */
.custom-select-wrapper { position: relative; user-select: none; }
.custom-select-trigger {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px; font-size: 15px; font-weight: 600; color: var(--text-primary);
    background: #fff; border: 2px solid #E5E7EB; border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}
.selected-text { 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 12px; flex-grow: 1;
}
.arrow-icon { font-size: 20px; color: #9CA3AF; flex-shrink: 0; }
.custom-select-wrapper.open .custom-select-trigger { border-color: var(--w-accent); }
.custom-select-wrapper.open .arrow-icon { transform: rotate(180deg); color: var(--w-accent); }

.custom-options {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 2px solid #E5E7EB; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 100;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.2s;
}
.custom-select-wrapper.open .custom-options { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-option {
    padding: 12px 14px; font-size: 14px; font-weight: 500; cursor: pointer;
    border-bottom: 1px solid #F9FAFB;
}
.custom-option:hover { background: #FFF7ED; color: var(--w-accent); }
.custom-option.selected { background: #FFEDD5; color: var(--w-accent); font-weight: 700; }

/* Чекбокс */
.length-section { margin-top: 16px; }

label.checkbox-simple {
    display: flex !important; /* Принудительно Flex */
    align-items: center;
    gap: 10px;
    font-size: 14px; font-weight: 600; color: #4B5563; cursor: pointer;
    margin-bottom: 0;
}
.checkbox-simple input {
    width: 18px; height: 18px; accent-color: var(--w-accent); cursor: pointer;
    margin: 0; padding: 0;
}

.mt-2 { margin-top: 10px; }

/* --- RESULT CARD --- */
.card--wire {
    background: var(--w-card-bg);
    color: #fff; border: none;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
    position: relative; overflow: hidden;
}
.card--wire h2 { color: #fff !important; font-size: 16px; margin-bottom: 4px; text-align: center; opacity: 1; }
.card--wire .result-desc { 
    color: #fff !important; opacity: 1;
    text-align: center; font-size: 15px; margin-bottom: 24px; font-weight: 500;
}

.result-big { text-align: center; font-size: 56px; font-weight: 800; line-height: 1; margin: 16px 0; color: #fff; }
.unit { font-size: 24px; font-weight: 600; opacity: 0.9; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 20px 0; }

.card--wire h3 { font-size: 13px; text-align: center; margin-bottom: 12px; opacity: 0.9; text-transform: uppercase; color: #fff !important; }

/* VISUAL WIRE */
.wire-visual {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.15); border-radius: 12px; padding: 20px;
    margin-bottom: 12px; position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.cable-sheath {
    width: 140px; height: 140px;
    background: #334155;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    border: 4px solid #475569;
}

.core-wrapper {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
}

.wire-core {
    width: 20px; height: 20px; 
    background: var(--w-copper);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.core-label {
    position: absolute; top: 110%; 
    font-size: 10px; opacity: 0.9; white-space: nowrap; color: #fff; font-weight: 600;
}

.ruler-scale {
    margin-top: 10px; width: 140px; border-top: 1px solid rgba(255,255,255,0.4);
    display: flex; justify-content: center;
    font-size: 9px; opacity: 0.8; padding-top: 4px; color: #fff;
}

/* Recommendations */
.reco-block { display: flex; flex-direction: column; gap: 8px; }
.reco-item { display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; color: #fff; }
.reco-item:last-child { border: none; padding: 0; }
.reco-val { font-weight: 700; font-size: 16px; }

.warning-badge {
    margin-top: 8px;
    font-size: 11px; background: rgba(0,0,0,0.2); padding: 4px 8px; border-radius: 4px;
    color: #fff; text-align: center;
}


/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ --- */

.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: var(--w-accent); }
.green-icon svg { color: #10B981; }
.red-icon svg { color: #DC2626; }

/* Маленькие подзаголовки */
.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: var(--w-bg); /* Светло-оранжевый фон */
    border: 1px solid #FDBA74;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--w-copper); /* Медный цвет */
    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 (Стиль Wire) */
.faq-wire-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-wire-style .faq-item[open] {
    border-color: var(--w-accent); 
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.1);
}

.faq-wire-style 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;
}

.faq-wire-style summary.faq-question:hover { background-color: #F9FAFB; }

.faq-wire-style .faq-item[open] summary.faq-question {
    color: var(--w-copper);
    background: var(--w-bg);
}

.faq-question::after {
    content: '+'; font-size: 20px;
    color: var(--text-secondary); font-weight: 400; line-height: 1;
}
.faq-question .icon-plus { display: none; }

.faq-wire-style .faq-item[open] summary.faq-question::after {
    content: '−'; color: var(--w-accent);
}

.faq-answer {
    padding: 20px; color: var(--text-secondary);
    line-height: 1.6; font-size: 15px;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 900px) {
    /* Сетка в 1 колонку */
    .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; }
}