/* ===========================================================
   Профессиональный калькулятор — визард (calculator/pro.html +
   static/js/calculator-pro.js). Namespace cp- чтобы не пересекаться
   с классами calc-* простого калькулятора (pages/calculator.html).
=========================================================== */

.cp-hero{
    padding:60px 0 10px;
}

.cp-quick-link{
    margin-top:8px;
    font-size:14px;
    color:#8a8f98;
}

.cp-quick-link a{
    color:var(--accent);
    font-weight:600;
}

.cp-section{
    padding:20px 0 90px;
}

/* ===========================================================
   LAYOUT
=========================================================== */

.cp-layout{
    display:grid;
    grid-template-columns:1.35fr 1fr;
    gap:32px;
    align-items:start;
}

.cp-main{
    min-width:0;
}

/* ===========================================================
   STEP NAV (прогресс)
=========================================================== */

.cp-steps-nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:18px;
}

.cp-step-dot{
    display:flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    border-radius:50%;
    background:#fff;
    border:1.5px solid rgba(0,0,0,.1);
    font-size:13px;
    font-weight:700;
    color:#8a8f98;
    cursor:pointer;
    transition:.2s;
    flex-shrink:0;
}

.cp-step-dot:hover{
    border-color:var(--accent);
}

.cp-step-dot.done{
    background:var(--accent);
    border-color:var(--accent);
    color:#fff;
}

.cp-step-dot.active{
    border-color:var(--primary);
    color:var(--primary);
    box-shadow:0 0 0 3px rgba(31,43,68,.12);
}

/* ===========================================================
   CARD
=========================================================== */

.cp-card{
    background:#fff;
    border-radius:var(--radius, 24px);
    padding:32px;
    box-shadow:var(--shadow, 0 20px 60px rgba(0,0,0,.06));
}

.cp-step-header{
    margin-bottom:22px;
}

.cp-step-index{
    display:inline-block;
    font-size:13px;
    font-weight:700;
    color:var(--accent);
    text-transform:uppercase;
    letter-spacing:.5px;
    margin-bottom:6px;
}

.cp-step-title{
    margin:0 0 6px;
}

.cp-step-hint{
    color:#8a8f98;
    font-size:14px;
    margin:0;
}

.cp-loading{
    color:#8a8f98;
    font-size:14px;
    padding:30px 0;
    text-align:center;
}

.cp-step-body{
    display:flex;
    flex-direction:column;
    gap:22px;
    min-height:120px;
}

/* ===========================================================
   ПОЛЯ ОБЩЕГО НАЗНАЧЕНИЯ
=========================================================== */

.cp-field label,
.cp-field-label{
    display:block;
    font-size:14px;
    font-weight:600;
    margin-bottom:10px;
    color:#3a3f47;
}

.cp-field-sub{
    font-size:13px;
    color:#8a8f98;
    margin:-4px 0 10px;
}

.cp-chip-group{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.cp-chip{
    padding:10px 18px;
    border-radius:12px;
    border:1.5px solid rgba(0,0,0,.1);
    background:#fff;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
    transition:.2s;
    line-height:1.3;
}

.cp-chip span{
    display:block;
    font-size:11px;
    font-weight:400;
    opacity:.65;
    margin-top:2px;
}

.cp-chip:hover{
    border-color:var(--accent);
}

.cp-chip.active{
    background:var(--accent);
    border-color:var(--accent);
    color:#fff;
}

.cp-chip:disabled,
.cp-chip.disabled{
    opacity:.4;
    cursor:not-allowed;
}

.cp-input,
.cp-select{
    width:100%;
    max-width:280px;
    background:#fff;
    border:1px solid #dfe6ef;
    border-radius:14px;
    padding:14px 18px;
    font-size:15px;
    font-family:inherit;
    color:var(--primary);
    transition:.2s;
    outline:none;
}

.cp-input:focus,
.cp-select:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 4px rgba(var(--accent-rgb,244,160,36),.12);
}

.cp-input-wide{
    max-width:none;
}

.cp-hint-suggest{
    display:inline-block;
    margin-top:8px;
    font-size:13px;
    color:var(--accent);
    font-weight:600;
    cursor:pointer;
    background:none;
    border:none;
    padding:0;
}

.cp-hint-suggest:hover{
    text-decoration:underline;
}

/* ===========================================================
   TOGGLE (да/нет)
=========================================================== */

.cp-toggle-row{
    display:flex;
    align-items:center;
    gap:12px;
    cursor:pointer;
    user-select:none;
}

.cp-toggle{
    position:relative;
    width:46px;
    height:26px;
    border-radius:999px;
    background:#e2e5ea;
    flex-shrink:0;
    transition:.2s;
}

.cp-toggle::after{
    content:"";
    position:absolute;
    top:3px;
    left:3px;
    width:20px;
    height:20px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 2px 6px rgba(0,0,0,.15);
    transition:.2s;
}

.cp-toggle-row.on .cp-toggle{
    background:var(--accent);
}

.cp-toggle-row.on .cp-toggle::after{
    transform:translateX(20px);
}

.cp-toggle-label{
    font-size:15px;
    font-weight:600;
    color:var(--primary);
}

/* ===========================================================
   СЧЁТЧИКИ (комнаты)
=========================================================== */

.cp-counter-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.cp-counter-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--bg, #f6f5f2);
    border-radius:14px;
    padding:12px 14px;
}

.cp-counter-title{
    font-size:14px;
    font-weight:500;
}

.cp-counter-controls{
    display:flex;
    align-items:center;
    gap:10px;
}

.cp-counter-btn{
    width:28px;
    height:28px;
    border-radius:50%;
    border:1.5px solid rgba(0,0,0,.12);
    background:#fff;
    font-size:16px;
    line-height:1;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}

.cp-counter-btn:hover{
    border-color:var(--accent);
    color:var(--accent);
}

.cp-counter-value{
    min-width:20px;
    text-align:center;
    font-weight:700;
}

/* ===========================================================
   СТРОКИ УСЛУГ (электроточки/освещение/щит/допуслуги)
=========================================================== */

.cp-service-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:520px;
    overflow-y:auto;
    padding-right:4px;
}

.cp-service-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    background:var(--bg, #f6f5f2);
    border-radius:14px;
    padding:12px 16px;
}

.cp-service-row.cp-hidden-by-skip{
    display:none;
}

.cp-service-info{
    min-width:0;
}

.cp-service-title{
    font-size:14px;
    font-weight:600;
    color:var(--primary);
}

.cp-service-price{
    font-size:12.5px;
    color:#8a8f98;
    margin-top:2px;
}

.cp-service-qty{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

.cp-service-qty input{
    width:64px;
    text-align:center;
    border-radius:10px;
    border:1px solid #dfe6ef;
    padding:8px 6px;
    font-size:14px;
    font-family:inherit;
}

.cp-empty-note{
    color:#8a8f98;
    font-size:14px;
    padding:20px 0;
    text-align:center;
}

/* ===========================================================
   ФАКТОРЫ СЛОЖНОСТИ
=========================================================== */

.cp-factor-group{
    padding-bottom:16px;
    border-bottom:1px solid #eef0f3;
}

.cp-factor-group:last-child{
    border-bottom:none;
    padding-bottom:0;
}

/* ===========================================================
   ПРЕДУПРЕЖДЕНИЯ ДВИЖКА
=========================================================== */

.cp-warnings{
    margin-top:16px;
    background:#fff7e6;
    border:1px solid #ffe2a8;
    border-radius:14px;
    padding:14px 18px;
    font-size:13px;
    color:#8a6100;
}

.cp-warnings ul{
    margin:6px 0 0;
    padding-left:18px;
}

/* ===========================================================
   КНОПКИ НАВИГАЦИИ
=========================================================== */

.cp-nav-buttons{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-top:28px;
}

.cp-nav-buttons .btn{
    min-width:140px;
}

/* ===========================================================
   КОНТАКТНЫЙ ШАГ
=========================================================== */

.cp-contact-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.cp-contact-grid textarea{
    grid-column:1/-1;
    min-height:110px;
    resize:vertical;
}

.cp-submit-result{
    margin-top:18px;
    background:#eefaf0;
    border:1px solid #bdeccb;
    border-radius:14px;
    padding:18px 20px;
    font-size:14px;
}

.cp-submit-result a{
    color:var(--primary);
    font-weight:700;
    text-decoration:underline;
}

.cp-submit-error{
    margin-top:14px;
    background:#fdecec;
    border:1px solid #f6b8b8;
    border-radius:14px;
    padding:14px 18px;
    font-size:14px;
    color:#a12222;
}

/* ===========================================================
   ПАНЕЛЬ СУММЫ (живой пересчёт)
=========================================================== */

.cp-summary{
    position:sticky;
    top:120px;
}

.cp-summary-inner{
    background:#1a1d22;
    color:#fff;
    border-radius:var(--radius, 24px);
    padding:28px;
}

.cp-summary-label{
    font-size:13px;
    color:rgba(255,255,255,.6);
    text-transform:uppercase;
    letter-spacing:.5px;
}

.cp-summary-value{
    font-size:30px;
    font-weight:800;
    margin:12px 0 6px;
    line-height:1.15;
}

.cp-summary-note{
    font-size:12.5px;
    color:rgba(255,255,255,.55);
    margin-bottom:16px;
}

.cp-summary-toggle{
    width:100%;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.15);
    color:#fff;
    border-radius:12px;
    padding:10px 14px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.cp-summary-toggle:hover{
    background:rgba(255,255,255,.14);
}

.cp-summary-details{
    margin-top:16px;
    font-size:13px;
    max-height:420px;
    overflow-y:auto;
}

.cp-summary-group-title{
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.4px;
    color:rgba(255,255,255,.5);
    margin:14px 0 6px;
}

.cp-summary-group-title:first-child{
    margin-top:0;
}

.cp-summary-line{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:5px 0;
    border-bottom:1px dashed rgba(255,255,255,.1);
}

.cp-summary-line-title{
    color:rgba(255,255,255,.85);
}

.cp-summary-line-total{
    font-weight:600;
    white-space:nowrap;
}

.cp-summary-subtotal{
    display:flex;
    justify-content:space-between;
    font-weight:700;
    padding-top:6px;
}

.cp-summary-coef-line{
    display:flex;
    justify-content:space-between;
    padding:4px 0;
    color:rgba(255,255,255,.75);
}

/* ===========================================================
   RESPONSIVE
=========================================================== */

@media(max-width:992px){

    .cp-layout{
        grid-template-columns:1fr;
    }

    .cp-summary{
        position:static;
        order:-1;
    }

    .cp-contact-grid{
        grid-template-columns:1fr;
    }

    .cp-counter-grid{
        grid-template-columns:1fr;
    }

    .cp-card{
        padding:24px 20px;
    }

}

@media(max-width:560px){

    .cp-service-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .cp-nav-buttons .btn{
        min-width:0;
        flex:1;
    }

}
