/* Калькулятор металла — публичная страница kalkulyator-metalla.html.
   Палитра и шрифт берутся из style.css (переменные :root), здесь только
   раскладка самого калькулятора, схемы сечения и справочных таблиц. */

.mc-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr) minmax(260px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.mc-panel {
    background: var(--card-glass);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: blur(10px);
}

.mc-panel h3 {
    font-size: 13px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--metal-silver);
    margin-bottom: 16px;
    font-weight: 600;
}

/* ---- выбор металла ---- */

.mc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.mc-chip {
    font-family: 'Exo 2', sans-serif;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-chip:hover {
    color: var(--text-light);
    border-color: rgba(0, 229, 255, 0.35);
}

.mc-chip.active {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--accent-laser);
    color: var(--accent-laser);
}

/* ---- поля ---- */

.mc-field {
    margin-bottom: 14px;
}

.mc-field label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.mc-input,
.mc-select {
    width: 100%;
    font-family: 'Exo 2', sans-serif;
    font-size: 15px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(11, 12, 16, 0.7);
    color: var(--text-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.mc-input:focus,
.mc-select:focus {
    outline: none;
    border-color: var(--accent-laser);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.mc-input::-webkit-outer-spin-button,
.mc-input::-webkit-inner-spin-button {
    opacity: 0.35;
}

.mc-select option {
    background: var(--primary-steel);
    color: var(--text-light);
}

.mc-note {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-top: -6px;
    margin-bottom: 14px;
}

.mc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 0 16px;
}

.mc-preset {
    font-family: 'Exo 2', sans-serif;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed var(--card-border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-preset:hover {
    color: var(--accent-laser);
    border-color: var(--accent-laser);
    border-style: solid;
}

/* ---- схема сечения ---- */

.mc-scheme {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.mc-scheme-svg {
    width: 100%;
    height: auto;
    max-height: 320px;
}

.mc-shape {
    fill: rgba(0, 229, 255, 0.08);
    stroke: var(--accent-laser);
    stroke-width: 1.6;
    transition: fill 0.3s ease;
}

.mc-shape-top {
    fill: rgba(0, 229, 255, 0.18);
    stroke: rgba(0, 229, 255, 0.55);
    stroke-width: 1.2;
}

.mc-shape-side {
    fill: rgba(0, 229, 255, 0.26);
    stroke: rgba(0, 229, 255, 0.55);
    stroke-width: 1.2;
}

.mc-hole {
    fill: var(--bg-dark);
    stroke: var(--accent-laser);
    stroke-width: 1.4;
}

.mc-rib {
    stroke: rgba(0, 229, 255, 0.35);
    stroke-width: 1;
}

.mc-dim-line {
    stroke: var(--metal-silver);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.mc-dim-wall {
    stroke: var(--accent-orange);
    stroke-dasharray: none;
    stroke-width: 2;
}

.mc-dim {
    cursor: pointer;
}

.mc-dim-text {
    fill: var(--text-dim);
    font-family: 'Exo 2', sans-serif;
    font-size: 13px;
    transition: fill 0.2s ease;
}

.mc-dim:hover .mc-dim-text,
.mc-dim.active .mc-dim-text {
    fill: var(--accent-laser);
    font-weight: 600;
}

.mc-scheme-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* ---- результат ---- */

.mc-result {
    position: sticky;
    top: 90px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.07), rgba(255, 90, 31, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.mc-result-main {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 16px;
}

.mc-result-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.mc-result-value {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    color: var(--accent-laser);
    line-height: 1.1;
    text-shadow: 0 0 24px var(--accent-laser-glow);
}

.mc-result-sub {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 4px;
}

.mc-result-price .mc-result-value {
    color: var(--accent-orange);
    text-shadow: 0 0 24px rgba(255, 133, 0, 0.3);
    font-size: clamp(24px, 3.4vw, 32px);
}

.mc-price-note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
    line-height: 1.45;
}

.mc-price-note.mc-approx {
    color: var(--accent-orange);
}

.mc-extra {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.mc-extra li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.mc-extra li:last-child {
    border-bottom: none;
}

.mc-extra span {
    color: var(--text-dim);
}

.mc-extra b {
    color: var(--text-light);
    font-weight: 600;
}

.mc-our-price {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.mc-our-price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
}

.mc-our-price p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-top: 4px;
}

.mc-updated {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 18px;
}

.mc-cta-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 90, 31, 0.12);
    border: 1px solid rgba(255, 90, 31, 0.3);
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mc-cta-link:hover {
    background: rgba(255, 90, 31, 0.2);
    transform: translateY(-1px);
}

/* ---- справочные таблицы в SEO-блоке ---- */

.mc-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 460px;
}

.mc-table th,
.mc-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mc-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--metal-silver);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.4px;
}

.mc-table td {
    color: var(--text-dim);
}

.mc-table td:first-child {
    color: var(--text-light);
}

.mc-table tr:last-child td {
    border-bottom: none;
}

.mc-formula {
    display: inline-block;
    font-family: 'Consolas', 'Courier New', monospace;
    background: rgba(0, 229, 255, 0.07);
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 8px;
    padding: 4px 10px;
    color: var(--accent-laser);
    font-size: 14px;
}

@media (max-width: 1060px) {
    .mc-layout {
        grid-template-columns: 1fr 1fr;
    }

    .mc-result {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 720px) {
    .mc-layout {
        grid-template-columns: 1fr;
    }

    .mc-panel {
        padding: 18px;
    }

    .mc-scheme {
        min-height: 220px;
    }
}
