/* =========================
   ДИАГНОСТИКА ЭЛЕКТРОПРОВОДКИ
   Namespace dg-* — чтобы не пересекаться с cp-* (calculator-pro) и
   остальными классами сайта. Использует существующие дизайн-токены
   (--accent, --primary, --radius, --shadow) — визуально в одном стиле
   с остальным сайтом, как и calculator-pro.css.
========================= */

.dg-hero {
    padding-top: 40px;
}

.dg-section {
    padding: 20px 0 80px;
}

.dg-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- Экран приветствия ---------- */

#dg-screen-intro {
    text-align: center;
}

.dg-intro-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.dg-intro-icon svg {
    width: 48px;
    height: 48px;
}

#dg-screen-intro h2 {
    margin-bottom: 12px;
}

#dg-screen-intro p {
    color: var(--text);
    margin-bottom: 28px;
}

.dg-btn-lg {
    padding: 16px 40px;
    font-size: 17px;
}

.dg-intro-time {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text);
}

/* ---------- Прогресс ---------- */

.dg-progress-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.dg-progress-header span {
    white-space: nowrap;
    font-size: 14px;
    color: var(--text);
}

.dg-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #ececec;
    overflow: hidden;
}

.dg-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width var(--transition);
}

/* ---------- Шаг вопроса ---------- */

.dg-step-header {
    margin-bottom: 24px;
}

.dg-step-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.dg-step-subtitle {
    color: var(--text);
    font-size: 15px;
}

.dg-step-body {
    min-height: 120px;
    margin-bottom: 32px;
}

.dg-loading {
    color: var(--text);
    padding: 24px 0;
}

.dg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dg-option {
    border: 2px solid #ececec;
    background: var(--white);
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.dg-option:hover {
    border-color: var(--accent);
}

.dg-option-selected {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.dg-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.dg-error {
    color: #c0392b;
}

/* ---------- Отчёт ---------- */

.dg-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.dg-result-title {
    font-size: 24px;
    font-weight: 700;
}

.dg-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
}

.dg-risk-low {
    background: #e5f7ea;
    color: #1e8a4c;
}

.dg-risk-medium {
    background: #fdf1de;
    color: #b96a10;
}

.dg-risk-high {
    background: #fbe7e5;
    color: #c0392b;
}

.dg-result-block {
    padding: 24px 0;
    border-top: 1px solid #ececec;
}

.dg-result-block:first-of-type {
    border-top: none;
}

.dg-result-block h3 {
    font-size: 18px;
    margin-bottom: 14px;
}

.dg-findings-list,
.dg-norms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dg-findings-list li::before {
    content: "✔";
    color: var(--accent);
    margin-right: 10px;
    font-weight: 700;
}

.dg-norms-list li {
    font-size: 14px;
    color: var(--text);
}

.dg-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dg-recommendation-item {
    background: var(--bg);
    border-radius: 14px;
    padding: 16px 20px;
}

.dg-recommendation-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.dg-recommendation-item p {
    font-size: 14px;
    color: var(--text);
    margin: 0;
}

/* ---------- CTA / контактная форма ---------- */

.dg-cta-block {
    padding-top: 28px;
    border-top: 1px solid #ececec;
}

.dg-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.dg-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
}

.dg-contact-form input,
.dg-contact-form textarea {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
}

.dg-contact-note {
    font-size: 12px;
    color: var(--text);
}

.dg-contact-note a {
    color: var(--text);
    text-decoration: underline;
}

.dg-download-block {
    text-align: center;
}

.dg-contact-success {
    color: #1e8a4c;
    font-weight: 600;
}

.dg-contact-success p {
    margin: 0 0 12px;
}

/* .dg-cta-buttons/.dg-contact-form/.dg-contact-success set an explicit
   display value above (flex/block) so they can lay out their children.
   That explicit `display` wins over the browser's native `[hidden]{display:none}`
   rule in the cascade (same specificity, our stylesheet loads later) — so
   toggling el.hidden = true/false from diagnostics-wizard.js never actually
   hid them, the contact form and the CTA buttons just kept rendering on
   top of each other with no gap. Re-assert display:none for [hidden] with
   higher specificity so the attribute actually works again. */
.dg-cta-buttons[hidden],
.dg-contact-form[hidden],
.dg-contact-success[hidden] {
    display: none;
}

.dg-restart-btn {
    display: block;
    margin: 24px auto 0;
    background: none;
    border: none;
    color: var(--text);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* ---------- Карточка-приглашение (в шапке страницы прайса, рядом
   с заголовком — см. price-hero-inner в prices.css) ---------- */

.dg-cta-card {
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
}

.dg-cta-card-icon {
    color: var(--accent);
    margin-bottom: 12px;
}

.dg-cta-card-icon svg {
    width: 32px;
    height: 32px;
}

.dg-cta-card h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 10px;
}

.dg-cta-card p {
    color: #cbd2df;
    font-size: 14px;
    margin-bottom: 18px;
}

.dg-cta-card-list {
    list-style: none;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dg-cta-card-list li {
    font-size: 14px;
    color: #e6e9ee;
}

.dg-cta-card-list li::before {
    content: "✔";
    color: var(--accent);
    margin-right: 8px;
    font-weight: 700;
}

.dg-cta-card .btn {
    width: 100%;
    text-align: center;
}

.dg-cta-card-time {
    margin-top: 14px;
    font-size: 13px;
    color: #9aa4b5;
    text-align: center;
}

/* ---------- Адаптив ---------- */

@media (max-width: 767px) {
    .dg-card {
        padding: 24px 20px;
    }

    .dg-nav-buttons {
        flex-direction: column-reverse;
    }

    .dg-nav-buttons .btn {
        width: 100%;
    }

    .dg-cta-buttons {
        flex-direction: column;
    }

    .dg-cta-buttons .btn {
        width: 100%;
    }
}
