/* ============================================
   SEPTIC CALCULATOR STYLES
   Based on Fire Calculator Styles
   ============================================ */

:root {
    --septic-primary: #2e7d32;
    --septic-primary-light: #4caf50;
    --septic-primary-dark: #1b5e20;
    --septic-accent: #e67e22;
    --septic-bg: #f6fcf7;
    --septic-border: #dcedc8;
}

.septic-calc-page {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Ubuntu', Arial, sans-serif;
}

/* Hero Section */
.septic-calc-hero {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 2px solid var(--septic-primary);
    border-radius: 16px;
    color: #333;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.hero-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero-label {
    display: inline-block;
    background: var(--septic-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.septic-calc-hero h1 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: #333;
}

.hero-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Wizard Container */
.septic-calc-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #eee;
    opacity: 0.5;
    transition: all 0.3s;
}

.wizard-step.active {
    opacity: 1;
    border-color: var(--septic-primary);
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.wizard-step.active .step-num {
    background: var(--septic-primary);
    color: #fff;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.wizard-step.active .step-label {
    color: #333;
}

/* Wizard Panels */
.wizard-panel {
    display: none;
    padding: 30px;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-panel h2 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #333;
}

.step-hint {
    color: #666;
    margin: 0 0 25px 0;
}

/* Form Elements */
.form-row {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e0e0e0;
    border-radius: 50%;
    font-size: 10px;
    color: #666;
    cursor: help;
    margin-left: 5px;
}

.residents-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 200px;
}

.septic-input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}

.btn-minus, .btn-plus {
    width: 44px;
    height: 44px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-minus:hover, .btn-plus:hover {
    background: #e0e0e0;
}

/* Usage Type Grid */
.usage-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.usage-type-card {
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.usage-type-card:hover {
    border-color: var(--septic-primary-light);
}

.usage-type-card.selected {
    border-color: var(--septic-primary);
    background: var(--septic-bg);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.card-icon { font-size: 32px; margin-bottom: 10px; }
.card-title { font-weight: 600; margin-bottom: 5px; }
.card-desc { font-size: 12px; color: #888; margin-bottom: 5px; }
.card-coef { font-size: 11px; font-weight: 700; color: var(--septic-primary); }

/* Fixtures Grid */
.fixtures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.fixture-card {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
}

.fixture-card.active {
    border-color: var(--septic-primary);
    background: #fcfcfc;
}

.fixture-icon { font-size: 24px; margin-bottom: 8px; }
.fixture-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.fixture-flow { font-size: 11px; color: #888; margin-bottom: 10px; }

.fixture-qty {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #eee;
    border-radius: 4px;
    cursor: pointer;
}

.qty-value { font-weight: 700; font-size: 14px; min-width: 15px; }

/* Live Calc Box */
.live-calc-box {
    margin-top: 25px;
    padding: 15px 20px;
    background: var(--septic-bg);
    border: 1px solid var(--septic-border);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-calc-label {
    font-size: 14px;
    color: #555;
}

.live-calc-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--septic-primary);
}

/* Radio Group */
.radio-group { display: flex; gap: 15px; }
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}
.radio-item:hover { border-color: var(--septic-primary-light); }
.radio-item input:checked + span { font-weight: 600; color: var(--septic-primary); }

/* Wizard Nav */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-wizard {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-back { background: #f5f5f5; color: #666; }
.btn-next { background: var(--septic-primary); color: #fff; }
.btn-next:hover { background: var(--septic-primary-dark); }

/* Result Card - FIRE CALC STYLE */
.result-card { background: #fff; }

.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
}

.result-icon { font-size: 36px; }
.result-label {
    display: inline-block;
    background: var(--septic-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 18px;
    border-radius: 20px;
}
.result-header h2 { margin: 0; font-size: 24px; }

/* Collapsible Sections */
.collapsible-section {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.collapsible-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}
.collapsible-header:hover {
    background: #f0f0f0;
}
.collapsible-label {
    display: inline-block;
    background: var(--septic-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}
.collapsible-title {
    flex: 1;
    font-weight: 600;
    color: #333;
}
.collapsible-badge {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}
.collapsible-arrow {
    color: #999;
    transition: transform 0.3s;
}
.collapsible-content {
    padding: 20px;
    border-top: 1px solid #eee;
}
.collapsible-content.collapsed {
    display: none;
}

/* Info Label */
.info-label {
    display: inline-block;
    background: var(--septic-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.result-section {
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
}

.result-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1b5e20;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Calc Block (параметры расчёта) */
.result-section.calc-block {
    background: #f0f7f0;
    border: 1px solid var(--septic-border);
}

.calc-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e8f5e9;
    font-size: 15px;
}
.calc-row:last-child {
    border-bottom: none;
}

.calc-row.highlight {
    background: #e8f5e9;
    border-radius: 8px;
    border-bottom: none;
    margin-top: 4px;
    font-weight: 600;
}

.calc-label {
    color: #555;
}

.calc-value {
    font-weight: 700;
    color: #1b5e20;
    font-size: 16px;
}

.calc-row.highlight .calc-value {
    color: var(--septic-primary);
    font-size: 18px;
}

/* Формула */
.formula-box {
    background: #fff;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.formula {
    font-size: 20px;
    font-weight: 700;
    color: #1b5e20;
    font-family: 'Georgia', serif;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.formula-legend {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

/* Результирующий объём */
.result-volume-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fff;
    border-radius: 10px;
    border: 2px solid var(--septic-primary);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
}

.volume-label {
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.volume-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--septic-primary);
}

/* Legacy grid (не используется, но оставлен для совместимости) */
.calc-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.calc-item { display: flex; flex-direction: column; }
.calc-item .lbl { font-size: 12px; color: #777; margin-bottom: 4px; }
.calc-item strong { font-size: 16px; color: #333; }

.result-section.legal-block {
    background: #f0f7f0;
    border: 1px solid var(--septic-border);
}

/* PRODUCTS BLOCK */
.products-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Pool sections */
.pool-section {
    margin-bottom: 25px;
}
.pool-section:last-child {
    margin-bottom: 0;
}
.pool-section h4 {
    font-size: 16px;
    color: #1b5e20;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e9;
}
.pool-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Septic product cards */
.septic-product-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
}
.septic-product-card:hover {
    border-color: var(--septic-primary-light);
}
.septic-product-card.best-card {
    border-color: #2ecc71;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.1);
}
.septic-product-card.selected-for-pdf {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

/* Card header */
.spc-header {
    background: #f8f9fa;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.best-card .spc-header {
    background: rgba(46, 204, 113, 0.05);
    color: #27ae60;
}
.selected-for-pdf .spc-header {
    background: #e8f4fd;
    color: #0073aa;
}
.selected-for-pdf .spc-header::after {
    content: '-- выбран для PDF';
    font-size: 11px;
    font-weight: 400;
    color: #0073aa;
    margin-left: 8px;
}
.spc-badge {
    background: #2ecc71;
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Card body */
.spc-body {
    padding: 20px;
    flex: 1;
}
.spc-row {
    display: flex;
    gap: 15px;
    align-items: center;
}
.spc-row img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 5px;
}
.spc-info {
    flex: 1;
}
.spc-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}
.spc-specs {
    font-size: 13px;
    color: #666;
}

/* Card footer */
.spc-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}
.spc-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--septic-primary);
    margin-bottom: 10px;
}
.spc-price-note {
    display: inline;
    font-size: 11px;
    color: #888;
    font-weight: 400;
}
.spc-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--septic-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
}
.spc-btn:hover {
    background: var(--septic-primary-dark);
    color: #fff;
    text-decoration: none;
}
.spc-btn-grp {
    background: #193857;
}
.spc-btn-grp:hover {
    background: #0d2035;
}
.spc-btn-quote {
    background: #193857;
}
.spc-btn-quote:hover {
    background: #0d2035;
}

/* Responsive */
@media (max-width: 768px) {
    .pool-row { grid-template-columns: 1fr; }
    .result-volume-box {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .volume-value { font-size: 28px; }
    .calc-row { flex-wrap: wrap; gap: 4px; }
    .formula { font-size: 16px; }
}

/* Inline actions (под товарами) */
.result-actions-inline {
    margin-top: 20px;
}

/* Actions */
.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}
.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}
.btn-pdf { background: #0073aa; color: #fff; }
.btn-consult { background: var(--septic-primary); color: #fff; }

.error-card {
    text-align: center;
    padding: 40px;
    color: #d32f2f;
}

.error-label {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 15px;
}

/* Info Block */
.septic-info-block {
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

.septic-info-block h2 {
    text-align: center;
    font-size: 20px;
    margin: 0 0 25px 0;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
}

.info-card h4 {
    font-size: 15px;
    margin: 0 0 10px 0;
    color: var(--septic-primary);
}

.info-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
}

/* CTA Section */
.septic-cta {
    margin-top: 40px;
}

.cta-content {
    background: #e8f5e9; /* Green tint */
    border: 2px solid #a5d6a7;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.cta-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2e7d32;
}

.cta-content p {
    color: #555;
    margin-bottom: 20px;
}

/* Related Tools */
.related-tools {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.related-tools h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.tools-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 30px; /* Pill shape */
    text-decoration: none;
    color: #555;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tool-card:hover {
    border-color: #2e7d32;
    color: #2e7d32;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.15);
}

.tool-icon {
    font-size: 18px;
}

.tool-label {
    display: inline-block;
    background: var(--septic-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.tool-name {
    font-weight: 600;
    font-size: 14px;
}

/* ============================================
   LEAD GATE + SELECTED SUMMARY + PDF BUTTON
   ============================================ */

/* Error field highlight */
.error-field {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
}

/* PDF button standalone */
#btn-pdf-main {
    margin-top: 12px;
    width: 100%;
}

.btn-action.btn-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    background: #0073aa;
    color: #fff;
    font-size: 15px;
    width: 100%;
}

.btn-action.btn-pdf:hover {
    background: #005580;
}

/* Selected Variant Summary */
.selected-variant-summary {
    margin-top: 16px;
    padding: 16px 20px;
    background: #f0f7ff;
    border: 2px solid #b0cfe0;
    border-radius: 10px;
}

.svs-header {
    font-weight: 700;
    font-size: 15px;
    color: #0073aa;
    margin-bottom: 8px;
}

.svs-items {
    margin-bottom: 4px;
}

.svs-item {
    font-size: 14px;
    color: #333;
    padding: 2px 0;
}

.svs-label {
    color: #666;
}

/* Lead Gate */
.lead-gate {
    margin-top: 20px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
}

.lead-gate-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--septic-primary-dark);
    margin-bottom: 12px;
}

.lead-gate-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.lead-gate-fields input {
    flex: 1;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
}

.lead-gate-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    cursor: pointer;
}

.lead-gate-consent input[type="checkbox"] {
    accent-color: var(--septic-primary-dark);
}

.lead-gate-consent.error-field {
    color: #c62828;
    border: none !important;
    box-shadow: none;
}

.lead-gate-success {
    padding: 15px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
}

.lead-gate-success a {
    color: var(--septic-primary-dark);
    font-weight: 600;
}

@media (max-width: 600px) {
    .lead-gate-fields {
        flex-direction: column;
    }
}
