/* ==========================================================================
   Интерактивный калькулятор пересадки волос для doktorvolos.ru
   ========================================================================== */

.dv-calc-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 40px auto 45px;
    padding: 36px 32px 30px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 14px 45px rgba(16, 42, 67, 0.08);
    border: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #102a43;
}

.dv-calc-wrap *,
.dv-calc-wrap *::before,
.dv-calc-wrap *::after {
    box-sizing: border-box;
}

/* Header */
.dv-calc-header {
    text-align: center;
    margin-bottom: 26px;
}

.dv-calc-title {
    font-size: 28px;
    font-weight: 700;
    color: #102a43;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.dv-calc-subtitle {
    font-size: 15px;
    color: #627d98;
    margin: 0;
    line-height: 1.45;
}

/* Step 1: Gender Tabs */
.dv-calc-gender-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.dv-calc-step-heading {
    font-size: 16px;
    font-weight: 700;
    color: #102a43;
    margin: 0;
}

.dv-calc-gender-tabs {
    display: inline-flex;
    background: #f0f4f8;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.dv-calc-gender-btn {
    padding: 9px 26px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #486581;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.dv-calc-gender-btn.active {
    background: #008374;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 131, 116, 0.25);
}

/* Step 2: Cards Grid */
.dv-calc-step-cards {
    margin-bottom: 24px;
}

.dv-calc-step-cards > .dv-calc-step-heading {
    margin-bottom: 14px;
}

.dv-calc-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dv-calc-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 12px 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.dv-calc-card:hover {
    border-color: #92dcc8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 131, 116, 0.08);
}

.dv-calc-card.active {
    border-color: #008374;
    background: #f0fdf9;
    box-shadow: 0 6px 20px rgba(0, 131, 116, 0.12);
}

.dv-calc-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dv-calc-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #008374;
    background: #ffffff;
    border: 1px solid #ccebe5;
    border-radius: 20px;
}

.dv-calc-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dv-calc-card.active .dv-calc-check {
    background: #008374;
    border-color: #008374;
}

.dv-calc-check svg {
    display: none;
    width: 12px;
    height: 12px;
    stroke: #ffffff;
    stroke-width: 2.5;
    fill: none;
}

.dv-calc-card.active .dv-calc-check svg {
    display: block;
}

.dv-calc-card-img {
    height: 122px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 10px;
}

.dv-calc-card-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.dv-calc-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #102a43;
    margin: 0 0 6px;
    line-height: 1.3;
}

.dv-calc-card-desc {
    font-size: 12px;
    color: #627d98;
    margin: 0;
    line-height: 1.4;
}

/* Step 3 & 4: Result Box */
.dv-calc-result-box {
    background: #f0fdf9;
    border: 1px solid #ccebe5;
    border-radius: 18px;
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
}

.dv-calc-summary-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.dv-calc-metric {
    display: flex;
    flex-direction: column;
}

.dv-calc-metric-lbl {
    font-size: 12px;
    color: #627d98;
    margin-bottom: 4px;
}

.dv-calc-metric-val {
    font-size: 16px;
    font-weight: 700;
    color: #102a43;
    line-height: 1.25;
}

.dv-calc-price-val {
    font-size: 26px;
    font-weight: 800;
    color: #008374;
}

.dv-calc-installment-wrap {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dv-calc-installment-badge {
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}

.dv-calc-installment-text {
    font-size: 13px;
    font-weight: 600;
    color: #334e68;
}

.dv-calc-installment-sub {
    font-size: 12px;
    color: #829ab1;
}

.dv-calc-included-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px dashed #a7f3d0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #334e68;
    line-height: 1.4;
}

.dv-calc-included-box svg {
    flex-shrink: 0;
    color: #008374;
}

/* Form */
.dv-calc-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.dv-calc-phone-input {
    flex: 1;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 13px 18px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #102a43 !important;
    height: 48px !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.dv-calc-phone-input:focus {
    border-color: #008374 !important;
    box-shadow: 0 0 0 3px rgba(0, 131, 116, 0.12) !important;
}

.dv-calc-btn-submit {
    flex-shrink: 0;
    background: #008374 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0 32px !important;
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.dv-calc-btn-submit:hover {
    background: #086b5e !important;
    box-shadow: 0 4px 14px rgba(0, 131, 116, 0.28) !important;
    color: #ffffff !important;
}

.dv-calc-privacy {
    font-size: 11px;
    color: #829ab1;
    line-height: 1.4;
    margin: 0;
}

.dv-calc-privacy a {
    color: #627d98;
    text-decoration: underline;
}

.dv-calc-privacy a:hover {
    color: #008374;
}

/* Checkbox согласия на обработку ПД */
.dv-calc-agree-wrap {
    margin-top: 12px;
    text-align: left;
}

.dv-calc-agree-wrap input.checkbox_input {
    display: none;
}

.dv-calc-agree-wrap label.lab_agree {
    display: inline-block;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    color: #486581;
    background-image: url(/images/design/uncheck.png);
    background-repeat: no-repeat;
    background-position: left 1px;
    background-size: 16px 16px;
    padding-left: 24px;
    user-select: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.dv-calc-agree-wrap input.checkbox_input:checked + label.lab_agree {
    background-image: url(/images/design/check.png);
    color: #102a43;
}

.dv-calc-agree-wrap label.lab_agree a {
    color: #008374;
    text-decoration: underline;
    transition: color 0.15s ease;
}

.dv-calc-agree-wrap label.lab_agree a:hover {
    color: #086b5e;
}

.dv-calc-agree-wrap .pr_error {
    color: #e53e3e;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Success & Loading Overlay (matches doktorvolos site standards) */
.dv-calc-result-box .wrap-box {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
    padding: 20px;
    text-align: center;
}

.dv-calc-result-box .suc-message {
    font-size: 18px;
    font-weight: 700;
    color: #008374;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 680px) {
    .dv-calc-wrap {
        padding: 24px 16px 20px;
        margin: 24px auto 30px;
        border-radius: 18px;
    }
    .dv-calc-title {
        font-size: 22px;
    }
    .dv-calc-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .dv-calc-card {
        padding: 14px 16px;
    }
    .dv-calc-card-img {
        height: 96px;
    }
    .dv-calc-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .dv-calc-form-row {
        flex-direction: column;
    }
    .dv-calc-phone-input,
    .dv-calc-btn-submit {
        width: 100% !important;
    }
}
