/* ============================================
   SPD CALCULATOR STYLES
   Калькулятор станции повышения давления (СПД)
   Water pressure booster station calculator
   ============================================ */

/* ===================== CSS VARIABLES ===================== */
:root {
    --spd-primary: #00649b;
    --spd-primary-light: #0080c7;
    --spd-primary-dark: #004d78;
    --spd-accent: #00b0d8;
    --spd-accent-light: #33c4e5;
    --spd-success: #2e7d32;
    --spd-warning: #e67e22;
    --spd-danger: #dc2626;
    --spd-text: #333333;
    --spd-text-light: #666666;
    --spd-text-muted: #888888;
    --spd-bg: #e8f4fd;
    --spd-bg-light: #f0f8ff;
    --spd-border: #c5ddef;
    --spd-border-light: #e0eef7;
    --spd-white: #ffffff;
    --spd-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --spd-shadow-hover: 0 8px 30px rgba(0, 100, 155, 0.12);
    --spd-radius: 12px;
    --spd-radius-sm: 8px;
    --spd-transition: 0.3s ease;
}


/* ===================== PAGE LAYOUT ===================== */
.spd-calc-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--spd-text);
    line-height: 1.5;
}

.spd-calc-page *,
.spd-calc-page *::before,
.spd-calc-page *::after {
    box-sizing: border-box;
}


/* ===================== HERO SECTION ===================== */
.spd-calc-hero {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 2px solid var(--spd-primary);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 100, 155, 0.08);
}

.spd-hero-icon {
    font-size: 52px;
    margin-bottom: 16px;
    display: block;
}

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

.spd-hero-subtitle {
    font-size: 16px;
    color: #555;
    margin: 0 0 16px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.spd-hero-standard {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
}


/* ===================== WIZARD CONTAINER ===================== */
.spd-calc-container {
    background: var(--spd-white);
    border-radius: var(--spd-radius);
    box-shadow: var(--spd-shadow);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--spd-border-light);
}


/* ===================== WIZARD PROGRESS (3 steps) ===================== */
.spd-calc-page .wizard-progress {
    display: flex;
    padding: 20px;
    background: var(--spd-bg-light);
    border-bottom: 1px solid var(--spd-border-light);
    gap: 10px;
}

.spd-calc-page .wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--spd-white);
    border-radius: var(--spd-radius-sm);
    border: 2px solid var(--spd-border-light);
    opacity: 0.5;
    transition: all var(--spd-transition);
    cursor: default;
}

.spd-calc-page .wizard-step.active {
    opacity: 1;
    border-color: var(--spd-primary);
    background: var(--spd-white);
}

.spd-calc-page .wizard-step.completed {
    opacity: 1;
    border-color: var(--spd-success);
    background: #f0fff0;
}

.spd-calc-page .step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--spd-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--spd-text-light);
    flex-shrink: 0;
    transition: all var(--spd-transition);
}

.spd-calc-page .wizard-step.active .step-num {
    background: var(--spd-primary);
    color: var(--spd-white);
}

.spd-calc-page .wizard-step.completed .step-num {
    background: var(--spd-success);
    color: var(--spd-white);
}

.spd-calc-page .step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--spd-text-light);
    line-height: 1.3;
}

.spd-calc-page .wizard-step.active .step-label {
    color: var(--spd-text);
    font-weight: 600;
}

.spd-calc-page .wizard-step.completed .step-label {
    color: var(--spd-text);
}


/* ===================== WIZARD PANELS ===================== */
.spd-calc-page .wizard-panel {
    display: none;
    padding: 30px;
}

.spd-calc-page .wizard-panel.active {
    display: block;
    animation: spdFadeIn 0.3s ease;
}

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

.spd-calc-page .wizard-panel h2 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: var(--spd-text);
    font-weight: 700;
}

.spd-calc-page .step-hint {
    color: var(--spd-text-light);
    margin: 0 0 25px 0;
    font-size: 14px;
    line-height: 1.6;
}


/* ===================== MODE TOGGLE (simple/pro) ===================== */
.spd-calc-page .mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
    padding: 16px 24px;
    background: var(--spd-bg-light);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
}

.spd-calc-page .mode-hint {
    flex-basis: 100%;
    text-align: center;
    margin: 0;
    font-size: 13px;
    color: var(--spd-text-light);
}

.spd-calc-page .mode-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--spd-text-light);
    transition: color var(--spd-transition);
    cursor: pointer;
    user-select: none;
}

.spd-calc-page .mode-toggle-label.active {
    color: var(--spd-primary);
    font-weight: 700;
}

.spd-calc-page .toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.spd-calc-page .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.spd-calc-page .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #b0c4de;
    border-radius: 28px;
    transition: background var(--spd-transition);
}

.spd-calc-page .toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--spd-white);
    border-radius: 50%;
    transition: transform var(--spd-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.spd-calc-page .toggle-switch input:checked + .toggle-slider {
    background: var(--spd-primary);
}

.spd-calc-page .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.spd-calc-page .toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 100, 155, 0.2);
}

.spd-calc-page .toggle-simple {
    display: inline;
}

.spd-calc-page .toggle-pro {
    display: inline;
}

/* When toggle is unchecked (simple mode), highlight simple label */
.spd-calc-page .toggle-switch input:not(:checked) ~ .toggle-simple,
.spd-calc-page .mode-toggle:has(.toggle-switch input:not(:checked)) .toggle-simple-label {
    color: var(--spd-primary);
    font-weight: 700;
}

/* When toggle is checked (pro mode), highlight pro label */
.spd-calc-page .toggle-switch input:checked ~ .toggle-pro,
.spd-calc-page .mode-toggle:has(.toggle-switch input:checked) .toggle-pro-label {
    color: var(--spd-primary);
    font-weight: 700;
}


/* ===================== FORM ELEMENTS ===================== */
.spd-calc-page .spd-form-section {
    margin-bottom: 30px;
}

.spd-calc-page .spd-form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--spd-primary);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--spd-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.spd-calc-page .spd-form-section-title .icon {
    font-size: 22px;
}

.spd-calc-page .form-row {
    margin-bottom: 22px;
}

.spd-calc-page .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--spd-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.spd-calc-page .form-label .required {
    color: var(--spd-danger);
    margin-left: 2px;
}

.spd-calc-page .spd-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--spd-accent);
    color: var(--spd-white);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    transition: background var(--spd-transition);
    vertical-align: middle;
    line-height: 1;
}

.spd-calc-page .spd-help-trigger:hover {
    background: var(--spd-primary);
}

.spd-calc-page .form-hint {
    font-size: 13px;
    color: var(--spd-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* Two-column row */
.spd-calc-page .form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.spd-calc-page .form-half {
    width: 100%;
}

/* Input fields */
.spd-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--spd-text);
    background: var(--spd-white);
    transition: border-color var(--spd-transition), box-shadow var(--spd-transition);
}

.spd-input:focus {
    outline: none;
    border-color: var(--spd-accent);
    box-shadow: 0 0 0 3px rgba(0, 176, 216, 0.15);
}

.spd-input:hover:not(:focus) {
    border-color: var(--spd-primary);
}

.spd-input::placeholder {
    color: #aab;
}

.spd-input.small {
    width: 100px;
    text-align: center;
}

.spd-input[type="number"] {
    -moz-appearance: textfield;
}

.spd-input[type="number"]::-webkit-inner-spin-button,
.spd-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Select fields */
.spd-select {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--spd-text);
    background: var(--spd-white);
    cursor: pointer;
    transition: border-color var(--spd-transition), box-shadow var(--spd-transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.spd-select:focus {
    outline: none;
    border-color: var(--spd-accent);
    box-shadow: 0 0 0 3px rgba(0, 176, 216, 0.15);
}

.spd-select:hover:not(:focus) {
    border-color: var(--spd-primary);
}

/* Textarea */
.spd-calc-page .spd-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--spd-text);
    background: var(--spd-white);
    resize: vertical;
    transition: border-color var(--spd-transition), box-shadow var(--spd-transition);
}

.spd-calc-page .spd-textarea:focus {
    outline: none;
    border-color: var(--spd-accent);
    box-shadow: 0 0 0 3px rgba(0, 176, 216, 0.15);
}

/* Input with unit suffix */
.spd-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spd-input-group .spd-input {
    flex: 1;
}

.spd-input-unit {
    font-size: 14px;
    color: var(--spd-text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* Error state */
.spd-error-field {
    border-color: var(--spd-danger) !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.spd-error-message {
    color: var(--spd-danger);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}


/* ===================== RADIO GROUP ===================== */
.spd-calc-page .radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.spd-calc-page .radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--spd-white);
    flex: 1;
    min-width: 140px;
}

.spd-calc-page .radio-item:hover {
    border-color: var(--spd-accent);
    background: var(--spd-bg-light);
}

.spd-calc-page .radio-item.selected,
.spd-calc-page .radio-item:has(input[type="radio"]:checked) {
    border-color: var(--spd-primary);
    background: var(--spd-bg);
    box-shadow: 0 0 0 3px rgba(0, 100, 155, 0.08);
}

.spd-calc-page .radio-item input[type="radio"] {
    accent-color: var(--spd-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.spd-calc-page .radio-item input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--spd-primary);
}

.spd-calc-page .radio-item span {
    font-size: 14px;
    color: var(--spd-text);
}


/* ===================== CHECKBOX ===================== */
.spd-calc-page .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--spd-border-light);
    border-radius: var(--spd-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--spd-white);
    font-size: 14px;
    color: var(--spd-text);
    line-height: 1.5;
}

.spd-calc-page .checkbox-label:hover {
    border-color: var(--spd-accent);
    background: var(--spd-bg-light);
}

.spd-calc-page .checkbox-label input[type="checkbox"] {
    accent-color: var(--spd-primary);
    width: 18px;
    height: 18px;
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
}

.spd-calc-page .checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 500;
}


/* ===================== OPTIONS GRID (2 columns) ===================== */
.spd-calc-page .options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.spd-calc-page .option-card {
    padding: 18px 16px;
    border: 2px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--spd-white);
}

.spd-calc-page .option-card:hover {
    border-color: var(--spd-accent);
    background: var(--spd-bg-light);
}

.spd-calc-page .option-card.selected {
    border-color: var(--spd-primary);
    background: var(--spd-bg);
    box-shadow: 0 0 0 3px rgba(0, 100, 155, 0.1);
}

.spd-calc-page .option-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.spd-calc-page .option-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--spd-text);
    margin-bottom: 4px;
}

.spd-calc-page .option-card-desc {
    font-size: 12px;
    color: var(--spd-text-muted);
    line-height: 1.4;
}


/* ===================== PRO PARAMS ===================== */
.spd-calc-page .pro-params {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background: var(--spd-bg-light);
    border: 1px dashed var(--spd-border);
    border-radius: var(--spd-radius);
}

.spd-calc-page .pro-params.visible {
    display: block;
    animation: spdFadeIn 0.3s ease;
}

.spd-calc-page .pro-params-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--spd-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spd-calc-page .pro-params-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--spd-accent);
    border-radius: 2px;
}

.spd-calc-page .pro-params .form-row {
    margin-bottom: 18px;
}

.spd-calc-page .pro-params .form-row:last-child {
    margin-bottom: 0;
}


/* ===================== WIZARD NAVIGATION ===================== */
.spd-calc-page .wizard-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--spd-border-light);
    margin-top: 30px;
    gap: 12px;
}

.spd-calc-page .btn-wizard {
    padding: 14px 32px;
    border: none;
    border-radius: var(--spd-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spd-calc-page .btn-wizard.btn-back {
    background: #f0f4f8;
    color: var(--spd-text-light);
    border: 2px solid var(--spd-border);
}

.spd-calc-page .btn-wizard.btn-back:hover {
    background: var(--spd-border-light);
    border-color: var(--spd-primary);
    color: var(--spd-text);
}

.spd-calc-page .btn-wizard.btn-next {
    background: var(--spd-primary);
    color: var(--spd-white);
    border: 2px solid var(--spd-primary);
}

.spd-calc-page .btn-wizard.btn-next:hover {
    background: var(--spd-primary-dark);
    border-color: var(--spd-primary-dark);
}

.spd-calc-page .btn-wizard.btn-next:disabled {
    background: #b0c4de;
    border-color: #b0c4de;
    cursor: not-allowed;
    opacity: 0.7;
}

.spd-calc-page .btn-wizard.btn-calculate {
    background: var(--spd-success);
    color: var(--spd-white);
    border: 2px solid var(--spd-success);
    font-size: 16px;
    padding: 14px 40px;
}

.spd-calc-page .btn-wizard.btn-calculate:hover {
    background: #256b29;
    border-color: #256b29;
}


/* ===================== RESULT CARD ===================== */
.spd-calc-page .result-card {
    background: var(--spd-white);
    border-radius: var(--spd-radius);
    box-shadow: var(--spd-shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--spd-border-light);
}

.spd-calc-page .result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--spd-bg);
    margin-bottom: 25px;
}

.spd-calc-page .result-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.spd-calc-page .result-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--spd-text);
    line-height: 1.3;
}

.spd-calc-page .result-header-sub {
    font-size: 14px;
    color: var(--spd-text-light);
    margin-top: 4px;
}


/* ===================== RESULT CARDS GRID (3x2 metrics) ===================== */
.spd-calc-page .result-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.spd-calc-page .result-metric {
    background: var(--spd-bg-light);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spd-calc-page .result-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 100, 155, 0.08);
}

.spd-calc-page .result-metric.highlight {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0ebfa 100%);
    border-color: var(--spd-accent);
    border-width: 2px;
}

.spd-calc-page .result-metric.highlight .metric-value {
    color: var(--spd-primary);
}

.spd-calc-page .metric-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.spd-calc-page .metric-label {
    font-size: 12px;
    color: var(--spd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.spd-calc-page .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--spd-text);
    line-height: 1.2;
}

.spd-calc-page .metric-unit {
    font-size: 14px;
    color: var(--spd-text-light);
    font-weight: 400;
    margin-left: 4px;
}

.spd-calc-page .metric-designation {
    font-size: 13px;
    color: var(--spd-primary);
    margin-top: 6px;
    font-weight: 500;
    word-break: break-word;
}

.spd-calc-page .metric-note {
    font-size: 11px;
    color: var(--spd-text-muted);
    margin-top: 4px;
}


/* ===================== RESULT SECTIONS ===================== */
.spd-calc-page .result-section {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: var(--spd-radius);
    background: var(--spd-white);
}

.spd-calc-page .result-section:last-child {
    margin-bottom: 0;
}

.spd-calc-page .result-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--spd-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spd-calc-page .result-section h3 .icon {
    font-size: 20px;
}


/* ===================== FORMULAS BLOCK ===================== */
.spd-calc-page .formulas-block {
    background: var(--spd-bg-light);
    border: 1px dashed var(--spd-border);
    border-radius: var(--spd-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.spd-calc-page .formulas-block h3 {
    font-size: 15px;
    color: var(--spd-primary);
    margin: 0 0 16px 0;
}

.spd-calc-page .formula-item {
    margin-bottom: 14px;
    padding: 12px 16px;
    background: var(--spd-white);
    border-radius: var(--spd-radius-sm);
    border: 1px solid var(--spd-border-light);
}

.spd-calc-page .formula-item:last-child {
    margin-bottom: 0;
}

.spd-calc-page .formula-name {
    font-size: 13px;
    color: var(--spd-text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.spd-calc-page .formula-expression {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 14px;
    color: var(--spd-text);
    line-height: 1.6;
    word-break: break-all;
}

.spd-calc-page .formula-result {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 14px;
    color: var(--spd-primary);
    font-weight: 700;
    margin-top: 4px;
}


/* ===================== WARNINGS BLOCK ===================== */
.spd-calc-page .warnings-block {
    margin-bottom: 20px;
}

.spd-calc-page .warning-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--spd-radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.spd-calc-page .warning-item:last-child {
    margin-bottom: 0;
}

.spd-calc-page .warning-item.warning-orange {
    background: #fff8e1;
    border-left: 4px solid var(--spd-warning);
    color: #6d4c00;
}

.spd-calc-page .warning-item.warning-red {
    background: #ffebee;
    border-left: 4px solid var(--spd-danger);
    color: #8b1a1a;
}

.spd-calc-page .warning-item.warning-blue {
    background: var(--spd-bg);
    border-left: 4px solid var(--spd-accent);
    color: var(--spd-primary-dark);
}

.spd-calc-page .warning-item.warning-green {
    background: #e8f5e9;
    border-left: 4px solid var(--spd-success);
    color: #1b5e20;
}

.spd-calc-page .warning-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.spd-calc-page .warning-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.spd-calc-page .warning-text strong {
    font-weight: 600;
}


/* ===================== STATION BLOCK ===================== */
.spd-calc-page .station-block {
    background: var(--spd-bg);
    border: 1px solid var(--spd-border);
    border-radius: var(--spd-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.spd-calc-page .station-block h3 {
    font-size: 18px;
    color: var(--spd-primary);
    margin: 0 0 16px 0;
}

.spd-calc-page .station-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spd-calc-page .station-spec {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 14px;
    background: var(--spd-white);
    border-radius: var(--spd-radius-sm);
    font-size: 14px;
}

.spd-calc-page .station-spec-label {
    color: var(--spd-text-light);
}

.spd-calc-page .station-spec-value {
    font-weight: 700;
    color: var(--spd-text);
}

.spd-calc-page .station-designation {
    text-align: center;
    margin-top: 16px;
    padding: 14px;
    background: var(--spd-white);
    border: 2px solid var(--spd-primary);
    border-radius: var(--spd-radius-sm);
    font-size: 16px;
    font-weight: 700;
    color: var(--spd-primary);
    letter-spacing: 0.5px;
}


/* ===================== PRODUCTS BLOCK ===================== */
.spd-calc-page .products-block {
    background: var(--spd-bg-light);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.spd-calc-page .products-block h3 {
    font-size: 17px;
    color: var(--spd-text);
    margin: 0 0 16px 0;
}

.spd-calc-page .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}


/* ===================== PRODUCT CARDS ===================== */
.spd-calc-page .product-card {
    background: var(--spd-white);
    border-radius: var(--spd-radius);
    padding: 16px;
    border: 2px solid var(--spd-border-light);
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: var(--spd-text);
    transition: all 0.2s;
    align-items: flex-start;
}

.spd-calc-page .product-card:hover {
    border-color: var(--spd-primary);
    box-shadow: 0 4px 16px rgba(0, 100, 155, 0.1);
    text-decoration: none;
    color: var(--spd-text);
}

.spd-calc-page .product-card img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: var(--spd-radius-sm);
    background: #f8f9fa;
    flex-shrink: 0;
    padding: 4px;
}

.spd-calc-page .product-info {
    flex: 1;
    min-width: 0;
}

.spd-calc-page .product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    color: var(--spd-text);
}

.spd-calc-page .product-specs {
    font-size: 12px;
    color: var(--spd-text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.spd-calc-page .product-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--spd-primary);
}

.spd-calc-page .product-link {
    font-size: 13px;
    color: var(--spd-accent);
    text-decoration: none;
    font-weight: 500;
}

.spd-calc-page .product-link:hover {
    color: var(--spd-primary);
    text-decoration: underline;
}

.spd-calc-page .product-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--spd-text-muted);
    font-size: 14px;
}

.spd-calc-page .product-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--spd-text-muted);
    font-size: 14px;
    background: var(--spd-bg-light);
    border-radius: var(--spd-radius-sm);
}


/* ===================== EQUIPMENT CARDS (JS-generated) ===================== */
.spd-calc-page #products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.spd-calc-page .spd-equipment-card {
    background: var(--spd-white);
    border: 2px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s;
    height: 100%;
}

.spd-calc-page .spd-equipment-card:hover {
    border-color: var(--spd-primary);
    box-shadow: 0 4px 16px rgba(0, 100, 155, 0.12);
}

.spd-calc-page .spd-ec-header {
    background: #f8f9fa;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    color: var(--spd-text-light);
}

.spd-calc-page .spd-ec-body {
    padding: 16px;
    flex: 1;
}

.spd-calc-page .spd-ec-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #f5f7fa;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.spd-calc-page .spd-ec-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.spd-calc-page .ec-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--spd-text-muted);
    font-size: 13px;
}

.spd-calc-page .spd-ec-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--spd-text);
    margin-bottom: 10px;
}

.spd-calc-page .spd-ec-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--spd-bg-light);
    border-radius: 8px;
    padding: 10px;
}

.spd-calc-page .spd-ec-spec {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spd-calc-page .spd-ec-spec-label {
    font-size: 10px;
    color: var(--spd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.spd-calc-page .spd-ec-spec-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--spd-primary);
}

.spd-calc-page .spd-ec-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.spd-calc-page .spd-ec-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--spd-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;
    transition: background 0.2s;
}

.spd-calc-page .spd-ec-btn:hover {
    background: var(--spd-accent);
    color: #fff;
    text-decoration: none;
}

.spd-calc-page .no-equipment {
    text-align: center;
    padding: 24px;
    color: var(--spd-text-muted);
    font-size: 14px;
    background: var(--spd-bg-light);
    border-radius: var(--spd-radius-sm);
}

.spd-calc-page .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.spd-calc-page .badge-success {
    background: #2e7d32;
    color: #fff;
}

.spd-calc-page .badge-info {
    background: var(--spd-primary);
    color: #fff;
}


/* ===================== RESULT ACTIONS ===================== */
.spd-calc-page .result-actions {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.spd-calc-page .btn-action {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--spd-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.spd-calc-page .btn-action .action-icon {
    font-size: 18px;
}

/* PDF button - blue gradient */
.spd-calc-page .btn-pdf {
    background: linear-gradient(135deg, var(--spd-primary) 0%, var(--spd-accent) 100%);
    color: var(--spd-white);
    box-shadow: 0 4px 12px rgba(0, 100, 155, 0.2);
}

.spd-calc-page .btn-pdf:hover {
    background: linear-gradient(135deg, var(--spd-primary-dark) 0%, var(--spd-primary) 100%);
    box-shadow: 0 6px 18px rgba(0, 100, 155, 0.3);
    transform: translateY(-1px);
    color: var(--spd-white);
    text-decoration: none;
}

.spd-calc-page .btn-pdf:disabled {
    background: #b0c4de;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Consultation button - outlined */
.spd-calc-page .btn-consult {
    background: var(--spd-white);
    color: var(--spd-primary);
    border: 2px solid var(--spd-primary);
}

.spd-calc-page .btn-consult:hover {
    background: var(--spd-bg);
    color: var(--spd-primary-dark);
    border-color: var(--spd-primary-dark);
    text-decoration: none;
}

/* Recalculate button */
.spd-calc-page .btn-recalc {
    background: var(--spd-bg-light);
    color: var(--spd-text);
    border: 2px solid var(--spd-border);
}

.spd-calc-page .btn-recalc:hover {
    border-color: var(--spd-primary);
    background: var(--spd-bg);
}

/* Quote/RFQ button */
.spd-calc-page .btn-quote {
    background: var(--spd-success);
    color: var(--spd-white);
    border: 2px solid var(--spd-success);
}

.spd-calc-page .btn-quote:hover {
    background: #256b29;
    border-color: #256b29;
}


/* ===================== LEAD GATE (PDF download form) ===================== */
.spd-calc-page .lead-gate {
    margin-top: 24px;
    padding: 24px;
    background: var(--spd-bg-light);
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius);
    animation: spdFadeIn 0.3s ease;
}

.spd-calc-page .lead-gate-title {
    font-weight: 600;
    font-size: 17px;
    color: var(--spd-primary);
    margin-bottom: 6px;
}

.spd-calc-page .lead-gate-subtitle {
    font-size: 13px;
    color: var(--spd-text-muted);
    margin-bottom: 16px;
}

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

.spd-calc-page .lead-gate-fields .spd-input {
    flex: 1;
}

.spd-calc-page .lead-gate-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--spd-text-light);
    margin-bottom: 14px;
    cursor: pointer;
}

.spd-calc-page .lead-gate-consent input[type="checkbox"] {
    accent-color: var(--spd-primary);
    width: 16px;
    height: 16px;
}

.spd-calc-page .lead-gate-consent.spd-error-field {
    color: var(--spd-danger);
}

.spd-calc-page .lead-gate-consent a {
    color: var(--spd-primary);
    text-decoration: underline;
}

.spd-calc-page .lead-gate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--spd-primary) 0%, var(--spd-accent) 100%);
    color: var(--spd-white);
    border: none;
    border-radius: var(--spd-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.spd-calc-page .lead-gate-btn:hover {
    background: linear-gradient(135deg, var(--spd-primary-dark) 0%, var(--spd-primary) 100%);
}

.spd-calc-page .lead-gate-btn:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}

.spd-calc-page .lead-gate-success {
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--spd-radius-sm);
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
}

.spd-calc-page .lead-gate-success a {
    color: var(--spd-primary);
    font-weight: 600;
}

.spd-calc-page .lead-gate-error {
    padding: 14px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: var(--spd-radius-sm);
    color: var(--spd-danger);
    font-size: 14px;
    margin-top: 10px;
}


/* ===================== INFO BLOCK ===================== */
.spd-info-block {
    margin-bottom: 40px;
}

.spd-info-block h2 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
    color: var(--spd-text);
    font-weight: 700;
}

.spd-info-block .section-subtitle {
    text-align: center;
    color: var(--spd-text-light);
    font-size: 15px;
    margin-bottom: 28px;
}

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

.spd-calc-page .info-card {
    background: var(--spd-white);
    border-radius: var(--spd-radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--spd-shadow);
    border: 1px solid var(--spd-border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.spd-calc-page .info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--spd-shadow-hover);
}

.spd-calc-page .info-icon {
    font-size: 36px;
    margin-bottom: 14px;
    display: block;
}

.spd-calc-page .info-card h4 {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: var(--spd-text);
    font-weight: 600;
}

.spd-calc-page .info-card p {
    font-size: 13px;
    color: var(--spd-text-light);
    margin: 0;
    line-height: 1.6;
}


/* ===================== FAQ ACCORDION ===================== */
.spd-faq {
    margin-bottom: 40px;
}

.spd-faq h2 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 24px;
    color: var(--spd-text);
    font-weight: 700;
}

.spd-faq details {
    background: var(--spd-white);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.spd-faq details:hover {
    box-shadow: 0 2px 8px rgba(0, 100, 155, 0.06);
}

.spd-faq details[open] {
    border-color: var(--spd-border);
    box-shadow: 0 2px 12px rgba(0, 100, 155, 0.08);
}

.spd-faq summary {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--spd-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.2s;
    user-select: none;
}

.spd-faq summary::-webkit-details-marker {
    display: none;
}

.spd-faq summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--spd-accent);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--spd-bg-light);
    transition: all 0.2s;
}

.spd-faq details[open] summary::after {
    content: '\2212';
    background: var(--spd-bg);
    color: var(--spd-primary);
}

.spd-faq summary:hover {
    background: var(--spd-bg-light);
}

.spd-faq details[open] summary {
    border-bottom: 1px solid var(--spd-border-light);
    background: var(--spd-bg-light);
}

.spd-faq .faq-answer {
    padding: 20px 24px;
    font-size: 14px;
    color: var(--spd-text-light);
    line-height: 1.7;
}

.spd-faq .faq-answer p {
    margin: 0 0 12px 0;
}

.spd-faq .faq-answer p:last-child {
    margin-bottom: 0;
}

.spd-faq .faq-answer ul {
    margin: 8px 0;
    padding-left: 20px;
}

.spd-faq .faq-answer li {
    margin-bottom: 6px;
}


/* ===================== CTA SECTION ===================== */
.spd-cta {
    background: linear-gradient(135deg, var(--spd-bg) 0%, #d6edf8 100%);
    border: 1px solid var(--spd-border);
    color: var(--spd-text);
    padding: 48px 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.spd-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 176, 216, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.spd-cta h3 {
    font-size: 24px;
    margin: 0 0 12px 0;
    font-weight: 700;
    color: var(--spd-text);
}

.spd-cta p {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: var(--spd-text-light);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
}

.spd-cta .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--spd-primary);
    color: var(--spd-white);
    border: none;
    border-radius: var(--spd-radius);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.spd-cta .btn-cta:hover {
    background: var(--spd-primary-dark);
    box-shadow: 0 4px 16px rgba(0, 100, 155, 0.25);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--spd-white);
}

.spd-cta .button {
    background: #B8FA2C !important;
    color: #000 !important;
}


/* ===================== RELATED TOOLS ===================== */
.spd-calc-page .related-tools {
    margin-bottom: 40px;
}

.spd-calc-page .related-tools h3 {
    font-size: 20px;
    margin-bottom: 18px;
    color: var(--spd-text);
    font-weight: 600;
}

.spd-calc-page .tools-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.spd-calc-page .tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--spd-white);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    text-decoration: none;
    color: var(--spd-text);
    transition: all 0.2s;
    flex: 1;
    min-width: 200px;
}

.spd-calc-page .tool-card:hover {
    border-color: var(--spd-primary);
    background: var(--spd-bg-light);
    box-shadow: 0 4px 12px rgba(0, 100, 155, 0.08);
    text-decoration: none;
    color: var(--spd-text);
}

.spd-calc-page .tool-icon {
    font-size: 28px;
    flex-shrink: 0;
}

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

.spd-calc-page .tool-desc {
    font-size: 12px;
    color: var(--spd-text-muted);
    margin-top: 2px;
}


/* ===================== ERROR CARD ===================== */
.spd-calc-page .error-card {
    text-align: center;
    padding: 48px 30px;
    background: var(--spd-white);
    border-radius: var(--spd-radius);
    border: 1px solid var(--spd-border-light);
    box-shadow: var(--spd-shadow);
    margin-bottom: 30px;
}

.spd-calc-page .error-icon {
    font-size: 52px;
    margin-bottom: 16px;
    display: block;
}

.spd-calc-page .error-card h3 {
    font-size: 22px;
    margin: 0 0 12px 0;
    color: var(--spd-warning);
    font-weight: 700;
}

.spd-calc-page .error-card p {
    color: var(--spd-text-light);
    margin: 0 0 24px 0;
    font-size: 15px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
    line-height: 1.6;
}

.spd-calc-page .error-card .btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--spd-primary);
    color: var(--spd-white);
    border: none;
    border-radius: var(--spd-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.spd-calc-page .error-card .btn-retry:hover {
    background: var(--spd-primary-dark);
}


/* ===================== RFQ PANEL (request for quotation) ===================== */
.spd-calc-page .spd-rfq-panel {
    background: var(--spd-bg-light);
    border: 2px solid var(--spd-border);
    border-radius: var(--spd-radius);
    padding: 28px;
    margin-top: 24px;
}

.spd-calc-page .spd-rfq-panel h3 {
    font-size: 18px;
    margin: 0 0 6px 0;
    color: var(--spd-primary);
    font-weight: 700;
}

.spd-calc-page .spd-rfq-subtitle {
    font-size: 13px;
    color: var(--spd-text-muted);
    margin: 0 0 20px 0;
}

.spd-calc-page .spd-rfq-summary {
    background: var(--spd-white);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.spd-calc-page .spd-rfq-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--spd-border-light);
}

.spd-calc-page .spd-rfq-summary-row:last-child {
    border-bottom: none;
}

.spd-calc-page .spd-rfq-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.spd-calc-page .spd-rfq-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--spd-text-light);
    margin-bottom: 16px;
    cursor: pointer;
}

.spd-calc-page .spd-rfq-consent input[type="checkbox"] {
    accent-color: var(--spd-primary);
}

.spd-calc-page .spd-rfq-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: var(--spd-radius-sm);
    padding: 20px;
    text-align: center;
    margin-top: 16px;
}

.spd-calc-page .spd-rfq-success h4 {
    color: var(--spd-success);
    margin: 0 0 8px 0;
}

.spd-calc-page .spd-rfq-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: var(--spd-radius-sm);
    padding: 14px;
    text-align: center;
    color: var(--spd-danger);
    margin-top: 12px;
    font-size: 14px;
}


/* ===================== LEGAL / NORMATIVE BLOCK ===================== */
.spd-calc-page .spd-legal-block {
    background: var(--spd-bg);
    border: 1px solid var(--spd-border);
    border-radius: var(--spd-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.spd-calc-page .spd-legal-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 16px;
}

.spd-calc-page .spd-legal-text strong {
    color: var(--spd-primary);
}

.spd-calc-page .spd-legal-text:last-child {
    margin-bottom: 0;
}


/* ===================== TECH BLOCK ===================== */
.spd-calc-page .spd-tech-block {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--spd-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.spd-calc-page .spd-tech-text {
    font-size: 14px;
    line-height: 1.6;
    color: #5d4037;
    margin-bottom: 12px;
}

.spd-calc-page .spd-tech-text:last-child {
    margin-bottom: 0;
}


/* ===================== LOADING SPINNER ===================== */
.spd-calc-page .spd-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.spd-calc-page .spd-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 4px solid var(--spd-border);
    border-top-color: var(--spd-primary);
    border-radius: 50%;
    animation: spdSpin 0.8s linear infinite;
}

@keyframes spdSpin {
    to {
        transform: rotate(360deg);
    }
}

.spd-calc-page .spd-spinner-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--spd-border-light);
    border-top-color: var(--spd-primary);
    border-radius: 50%;
    animation: spdSpin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}


/* ===================== PUMP SELECTION TABLE ===================== */
.spd-calc-page .spd-pump-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
    background: var(--spd-white);
    border-radius: var(--spd-radius-sm);
    overflow: hidden;
    border: 1px solid var(--spd-border-light);
}

.spd-calc-page .spd-pump-table thead {
    background: var(--spd-bg);
}

.spd-calc-page .spd-pump-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--spd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--spd-border);
}

.spd-calc-page .spd-pump-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--spd-border-light);
    color: var(--spd-text);
}

.spd-calc-page .spd-pump-table tbody tr:hover {
    background: var(--spd-bg-light);
}

.spd-calc-page .spd-pump-table tbody tr:last-child td {
    border-bottom: none;
}

.spd-calc-page .spd-pump-table tbody tr.recommended {
    background: #e8f5e9;
    font-weight: 500;
}


/* ===================== SCHEME / DIAGRAM ===================== */
.spd-calc-page .spd-scheme {
    background: var(--spd-white);
    border: 1px solid var(--spd-border-light);
    border-radius: var(--spd-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.spd-calc-page .spd-scheme img {
    max-width: 100%;
    height: auto;
    border-radius: var(--spd-radius-sm);
}

.spd-calc-page .spd-scheme-caption {
    font-size: 13px;
    color: var(--spd-text-muted);
    margin-top: 10px;
}


/* ===================== CART SUCCESS BANNER ===================== */
.spd-calc-page .spd-cart-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--spd-radius);
    margin-bottom: 16px;
    animation: spdSlideDown 0.3s ease;
}

.spd-calc-page .spd-cart-banner-text {
    font-weight: 600;
    color: #166534;
    font-size: 14px;
}

.spd-calc-page .spd-cart-banner-link {
    color: var(--spd-primary);
    font-weight: 600;
    text-decoration: underline;
    font-size: 14px;
}

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


/* ===================== LEGAL NOTE (bottom disclaimer) ===================== */
.spd-calc-page .spd-legal-note {
    margin-top: 30px;
    padding: 20px;
    background: #fff8e1;
    border-radius: var(--spd-radius);
    border-left: 4px solid var(--spd-warning);
    font-size: 13px;
    color: var(--spd-text);
    line-height: 1.6;
}

.spd-calc-page .spd-legal-note a {
    color: var(--spd-primary);
    text-decoration: underline;
}


/* ===================== TOOLTIP ===================== */
.spd-calc-page .spd-tooltip {
    position: relative;
    display: inline-block;
}

.spd-calc-page .spd-tooltip .spd-tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: var(--spd-white);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.spd-calc-page .spd-tooltip .spd-tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a2e;
}

.spd-calc-page .spd-tooltip:hover .spd-tooltip-text {
    visibility: visible;
    opacity: 1;
}


/* ===================== COMPARISON TABLE ===================== */
.spd-calc-page .spd-comparison {
    margin-bottom: 24px;
    overflow-x: auto;
}

.spd-calc-page .spd-comparison table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--spd-white);
    border-radius: var(--spd-radius-sm);
    overflow: hidden;
}

.spd-calc-page .spd-comparison th {
    background: var(--spd-bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--spd-text);
    border-bottom: 2px solid var(--spd-border);
}

.spd-calc-page .spd-comparison td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--spd-border-light);
}

.spd-calc-page .spd-comparison tbody tr:last-child td {
    border-bottom: none;
}

.spd-calc-page .spd-comparison tbody tr:hover {
    background: var(--spd-bg-light);
}


/* ===================== PRINT STYLES ===================== */
@media print {
    .spd-calc-page {
        max-width: 100%;
        padding: 0;
    }

    .spd-calc-hero {
        background: var(--spd-white) !important;
        color: var(--spd-text) !important;
        border: 2px solid var(--spd-primary);
        box-shadow: none;
    }

    .spd-calc-hero h1,
    .spd-hero-subtitle {
        color: var(--spd-text) !important;
    }

    .spd-calc-page .wizard-progress,
    .spd-calc-page .wizard-nav,
    .spd-calc-page .mode-toggle,
    .spd-calc-page .result-actions,
    .spd-calc-page .lead-gate,
    .spd-rfq-panel,
    .spd-cta,
    .spd-calc-page .related-tools,
    .spd-calc-page .btn-wizard,
    .spd-calc-page .btn-action {
        display: none !important;
    }

    .spd-calc-page .result-card,
    .spd-calc-page .result-metric,
    .spd-calc-page .info-card {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }

    .spd-calc-page .wizard-panel {
        display: block !important;
    }

    .spd-faq details {
        border: 1px solid #ccc;
    }

    .spd-faq details[open] summary {
        border-bottom: 1px solid #ccc;
    }
}


/* ===================== RESPONSIVE: TABLET (max-width: 992px) ===================== */
@media (max-width: 992px) {
    .spd-calc-page {
        max-width: 100%;
        padding: 16px;
    }

    .spd-calc-page .result-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spd-calc-page .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spd-calc-page .station-specs {
        grid-template-columns: 1fr;
    }

    .spd-calc-page .spd-rfq-contacts {
        grid-template-columns: 1fr 1fr;
    }
}


/* ===================== RESPONSIVE: MOBILE (max-width: 768px) ===================== */
@media (max-width: 768px) {
    .spd-calc-page {
        padding: 12px;
    }

    .spd-calc-page #products-grid {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .spd-calc-hero {
        padding: 32px 20px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .spd-calc-hero h1 {
        font-size: 22px;
    }

    .spd-hero-subtitle {
        font-size: 14px;
    }

    .spd-hero-icon {
        font-size: 40px;
    }

    /* Wizard progress - vertical on mobile */
    .spd-calc-page .wizard-progress {
        flex-direction: column;
        padding: 14px;
        gap: 8px;
    }

    .spd-calc-page .wizard-step {
        padding: 10px 14px;
    }

    .spd-calc-page .step-label {
        font-size: 12px;
    }

    .spd-calc-page .step-num {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    /* Panels */
    .spd-calc-page .wizard-panel {
        padding: 20px 16px;
    }

    .spd-calc-page .wizard-panel h2 {
        font-size: 18px;
    }

    /* Form elements */
    .spd-calc-page .form-row--half {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .spd-input,
    .spd-select {
        height: 44px;
        font-size: 14px;
    }

    /* Radio group - stack vertically */
    .spd-calc-page .radio-group {
        flex-direction: column;
    }

    .spd-calc-page .radio-item {
        min-width: unset;
    }

    /* Options grid - single column */
    .spd-calc-page .options-grid {
        grid-template-columns: 1fr;
    }

    /* Mode toggle */
    .spd-calc-page .mode-toggle {
        padding: 12px 16px;
        gap: 10px;
    }

    .spd-calc-page .mode-toggle-label {
        font-size: 13px;
    }

    /* Results */
    .spd-calc-page .result-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .spd-calc-page .result-metric {
        padding: 16px 14px;
    }

    .spd-calc-page .metric-value {
        font-size: 24px;
    }

    .spd-calc-page .metric-label {
        font-size: 11px;
    }

    .spd-calc-page .result-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .spd-calc-page .result-header h2 {
        font-size: 20px;
    }

    /* Products grid - single column */
    .spd-calc-page .products-grid {
        grid-template-columns: 1fr;
    }

    .spd-calc-page .product-card img {
        width: 70px;
        height: 70px;
    }

    /* Actions - stack vertically */
    .spd-calc-page .result-actions {
        flex-direction: column;
    }

    .spd-calc-page .btn-action {
        min-width: unset;
        width: 100%;
    }

    /* Lead gate */
    .spd-calc-page .lead-gate-fields {
        flex-direction: column;
    }

    /* Info grid - single column */
    .spd-calc-page .info-grid {
        grid-template-columns: 1fr;
    }

    /* Station specs - single column */
    .spd-calc-page .station-specs {
        grid-template-columns: 1fr;
    }

    /* RFQ contacts - single column */
    .spd-calc-page .spd-rfq-contacts {
        grid-template-columns: 1fr;
    }

    /* CTA */
    .spd-cta {
        padding: 32px 20px;
    }

    .spd-cta h3 {
        font-size: 20px;
    }

    /* Tools grid - stack */
    .spd-calc-page .tools-grid {
        flex-direction: column;
    }

    .spd-calc-page .tool-card {
        min-width: unset;
    }

    /* FAQ */
    .spd-faq summary {
        padding: 14px 18px;
        font-size: 14px;
    }

    .spd-faq .faq-answer {
        padding: 16px 18px;
        font-size: 13px;
    }

    /* Wizard navigation */
    .spd-calc-page .wizard-nav {
        padding-top: 16px;
        margin-top: 20px;
    }

    .spd-calc-page .btn-wizard {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Pro params */
    .spd-calc-page .pro-params {
        padding: 18px;
    }

    /* Cart banner */
    .spd-calc-page .spd-cart-banner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* Table horizontal scroll */
    .spd-calc-page .spd-pump-table {
        display: block;
        overflow-x: auto;
    }

    /* Error card */
    .spd-calc-page .error-card {
        padding: 32px 20px;
    }

    .spd-calc-page .error-icon {
        font-size: 42px;
    }

    .spd-calc-page .error-card h3 {
        font-size: 18px;
    }

    /* Formulas block */
    .spd-calc-page .formula-expression {
        font-size: 12px;
        word-break: break-all;
    }
}


/* ===================== RESPONSIVE: SMALL MOBILE (max-width: 480px) ===================== */
@media (max-width: 480px) {
    .spd-calc-hero h1 {
        font-size: 19px;
    }

    .spd-hero-subtitle {
        font-size: 13px;
    }

    .spd-calc-page .wizard-panel {
        padding: 16px 12px;
    }

    .spd-calc-page .result-card {
        padding: 20px 16px;
    }

    .spd-calc-page .metric-value {
        font-size: 22px;
    }

    .spd-calc-page .products-block {
        padding: 16px;
    }

    .spd-cta {
        padding: 24px 16px;
    }

    .spd-cta h3 {
        font-size: 18px;
    }

    .spd-calc-page .btn-wizard {
        padding: 10px 16px;
        font-size: 13px;
    }

    .spd-calc-page .lead-gate {
        padding: 18px;
    }

    .spd-calc-page .mode-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
}
