/* Tantal Metal Calculator - Premium Design */

/* Calculator Page Styles */
.calculator-page {
    padding: 40px 0 60px;
    min-height: 60vh;
}

.calculator-page__header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-page__title {
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    color: #1a1f2e;
    margin: 0 0 12px 0;
}

.calculator-page__subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    color: #666;
    margin: 0;
}

@media (max-width: 767px) {
    .calculator-page {
        padding: 24px 0 40px;
    }
    
    .calculator-page__header {
        margin-bottom: 24px;
    }
    
    .calculator-page__title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .calculator-page__subtitle {
        font-size: 16px;
        line-height: 24px;
    }
}

.tantal-metal-calculator {
    width: 100%;
    max-width: 1504px;
    margin: 0 auto;
    font-family: 'PT Root UI', Arial, sans-serif;
}

.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.calculator-header {
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
    background: linear-gradient(90deg, #404d6c 0%, #2f384f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

@media (max-width: 500px) {
    .calculator-header {
        font-size: 24px;
        line-height: 32px;
        letter-spacing: -0.24px;
    }
}

.calculator-main {
    display: flex;
    max-width: 1504px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.02);
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
}

@media (max-width: 500px) {
    .calculator-main {
        flex-direction: column;
        border-radius: 16px;
    }
}

/* Tabs */
.calculator-tabs {
    display: flex;
    gap: 40px;
    padding: 16px 32px 0;
    border-bottom: 1px solid #e6e6e6;
    overflow-x: auto;
}

@media (max-width: 500px) {
    .calculator-tabs {
        gap: 20px;
        padding: 16px 16px 0;
    }
}

.calculator-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: #b3b3b3;
    cursor: pointer;
    user-select: none;
    padding-bottom: 12px;
    position: relative;
    transition: color 0.3s ease;
}

@media (max-width: 500px) {
    .calculator-tab {
        font-size: 16px;
        line-height: 20px;
    }
}

.calculator-tab:hover:not(.active)::after {
    opacity: 1;
}

.calculator-tab::after {
    content: "";
    height: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #f0cf4c;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.calculator-tab.active {
    color: #1a1f2e;
}

.calculator-tab.active::after {
    opacity: 1;
}

/* Params Section */
.calculator-params {
    flex: 2 1 864px;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    overflow: hidden;
    background: #fff;
}

@media (max-width: 500px) {
    .calculator-params {
        border-radius: 16px;
    }
}

.calculator-content {
    padding: 24px 32px;
}

@media (max-width: 500px) {
    .calculator-content {
        padding: 16px;
    }
}

.calculator-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
}

.calculator-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 24px;
}

.calculator-products-title {
    color: #1a1f2e;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
}

@media (max-width: 500px) {
    .calculator-products-title {
        font-size: 16px;
        line-height: 20px;
    }
}

.calculator-products-list {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.calculator-product {
    border-radius: 16px;
    border: 1px solid #e6e6e6;
    aspect-ratio: 1;
    flex: 0 0 calc((100% - 32px) / 5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    min-width: 150px;
    transition: all 0.2s ease;
}

@media (max-width: 500px) {
    .calculator-product {
        flex: 0 0 calc((100% - 8px) / 2);
        min-width: unset;
    }
}

.calculator-product:hover {
    border-color: #f0cf4c;
    box-shadow: 0 4px 16px rgba(40, 51, 77, 0.1);
}

.calculator-product.selected {
    border: 1px solid #f0cf4c;
    box-shadow: 0 4px 16px rgba(40, 51, 77, 0.15), 0 1px 4px rgba(40, 51, 77, 0.23);
}

.calculator-product-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    left: 12px;
    transition: all 0.2s ease;
}

.calculator-product.selected .calculator-product-check {
    border-color: #f0cf4c;
    background-color: #f0cf4c;
}

.calculator-product.selected .calculator-product-check::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
}

.calculator-product-image {
    flex: 0 0 55%;
    max-width: 65px;
    max-height: 65px;
    aspect-ratio: 1;
}

@media (max-width: 500px) {
    .calculator-product-image {
        flex-basis: 50%;
    }
}

.calculator-product-name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    color: #1a1f2e;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}

/* Form Fields */
.calculator-form-section {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 24px;
}

@media (max-width: 500px) {
    .calculator-form-section {
        flex-direction: column;
        padding-top: 0;
    }
}

.calculator-form-title {
    flex: 1 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

@media (max-width: 500px) {
    .calculator-form-title {
        flex: unset;
    }
}

.calculator-form-title-text {
    color: #1a1f2e;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
}

@media (max-width: 500px) {
    .calculator-form-title-text {
        font-size: 16px;
        line-height: 20px;
    }
}

.calculator-form-title-desc {
    color: #999;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.calculator-form-fields {
    flex: 0 2 360px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 500px) {
    .calculator-form-fields {
        flex: unset;
    }
}

.calculator-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.calculator-field-label {
    color: #1a1f2e;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.calculator-field-label.required::after {
    content: " *";
    color: #e04c4c;
}

.calculator-field-input {
    display: flex;
    padding: 8px 16px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    height: 40px;
    position: relative;
    outline: none;
    transition: border-color 0.2s ease;
}

.calculator-field-input:focus {
    border-color: #b3b3b3;
}

.calculator-field-input.error {
    border-color: #ce0015;
}

.calculator-field-input input {
    flex: 1;
    color: #1a1f2e;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    border: none;
    outline: none;
    background-color: transparent;
}

.calculator-field-input input::placeholder {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
}

.calculator-field-unit {
    color: #1a1f2e;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
}

.calculator-field-desc {
    color: #999;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.calculator-button {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    background-color: #f0cf4c;
    border: none;
    outline: none;
    cursor: pointer;
    color: #1a1f2e;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    transition: all 0.2s ease;
    min-height: 44px;
}

@media (max-width: 500px) {
    .calculator-button {
        font-size: 14px;
        line-height: 20px;
    }
}

.calculator-button:hover:not(:disabled) {
    background-color: #e8c040;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 207, 76, 0.3);
}

.calculator-button:disabled {
    opacity: 0.7;
    pointer-events: none;
}

.calculator-footer {
    padding: 24px 32px;
    border-top: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 500px) {
    .calculator-footer {
        padding: 16px;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 8px;
    }
    
    .calculator-footer .calculator-button {
        width: 100%;
    }
}

/* Result Section */
.calculator-result {
    flex: 1 2 640px;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    background-color: #f8f8f8;
    overflow: hidden;
    min-width: 380px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 500px) {
    .calculator-result {
        display: none;
        flex-direction: column;
        align-items: stretch;
        border-radius: 16px;
        min-width: unset;
    }
    
    .calculator-result.has-result {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        min-height: 100vh;
        border-radius: 0;
        z-index: 5;
    }
}

.calculator-result:not(.has-result) .calculator-result-weight {
    visibility: hidden;
}

.calculator-result-header {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    background: linear-gradient(90deg, #404d6c 0%, #2f384f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 500px) {
    .calculator-result-header {
        padding: 16px;
        font-size: 16px;
        line-height: 20px;
    }
}

.calculator-result-close {
    display: none;
    background-color: transparent;
    border: none;
    outline: none;
    padding: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #1a1f2e;
}

@media (max-width: 500px) {
    .calculator-result-close {
        display: block;
    }
}

.calculator-result-image {
    aspect-ratio: 1.5;
    object-fit: cover;
    width: 100%;
    flex: 1;
}

.calculator-result-values {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 24px 32px;
}

@media (max-width: 500px) {
    .calculator-result-values {
        padding: 16px;
        border-top: 1px solid #e6e6e6;
        flex: 1;
    }
}

.calculator-result-values:empty {
    display: none;
}

.calculator-result-row {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.calculator-result-name {
    color: #999;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

@media (max-width: 500px) {
    .calculator-result-name {
        font-size: 14px;
        line-height: 20px;
    }
}

.calculator-result-dots {
    flex: 1;
    border-bottom: 1px dotted #b3b3b3;
    margin-bottom: 7px;
}

.calculator-result-value {
    color: #1a1f2e;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

@media (max-width: 500px) {
    .calculator-result-value {
        font-size: 14px;
        line-height: 20px;
    }
}

.calculator-result-footer {
    display: flex;
    padding: 0 32px 24px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}

@media (max-width: 500px) {
    .calculator-result-footer {
        padding: 16px;
        border-top: 1px solid #e6e6e6;
    }
}

.calculator-result-weight {
    color: #999;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
}

@media (max-width: 500px) {
    .calculator-result-weight {
        font-size: 14px;
        line-height: 20px;
    }
}

.calculator-result-weight span {
    color: #2f384f;
    font-weight: 700;
}

/* ==========================================================
   Tantal Premium Pipe Calculator (NEW UI, test page only)
   Uses local root SVG icons: /copy.svg /cross.svg /chevron_down.svg
   ========================================================== */

.calculator-page {
    padding: 28px 0 56px;
}

.tmcalc-root {
    --tmcalc-bg: #0b0f18;
    --tmcalc-surface: rgba(255, 255, 255, 0.04);
    --tmcalc-border: rgba(255, 255, 255, 0.10);
    --tmcalc-text: rgba(255, 255, 255, 0.92);
    --tmcalc-muted: rgba(255, 255, 255, 0.62);
    --tmcalc-accent-rgb: 240 207 76; /* default (yellow-gold) */
    --tmcalc-accent: rgb(var(--tmcalc-accent-rgb));
    --tmcalc-accent2: #2f384f;
    --tmcalc-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --tmcalc-radius: 22px;
    --tmcalc-radius-sm: 14px;
    --tmcalc-gap: 14px;

    color: var(--tmcalc-text);
}

.tmcalc {
    border-radius: var(--tmcalc-radius);
    overflow: hidden;
    border: 1px solid var(--tmcalc-border);
    box-shadow: var(--tmcalc-shadow);
    background:
        radial-gradient(1000px 600px at 20% 0%, rgba(240, 207, 76, 0.10), transparent 55%),
        radial-gradient(900px 600px at 90% 20%, rgba(90, 196, 255, 0.10), transparent 55%),
        linear-gradient(180deg, rgba(14, 18, 28, 0.96), rgba(9, 12, 18, 0.96));
}

.tmcalc__hero {
    position: relative;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--tmcalc-border);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.00)),
        radial-gradient(900px 380px at 0% 0%, rgba(240, 207, 76, 0.12), transparent 60%);
}

.tmcalc__hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-size: cover;
    background-position: center;
    filter: saturate(0.9) contrast(1.05);
    pointer-events: none;
}

.tmcalc__hero-top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tmcalc__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 28px;
    letter-spacing: -0.2px;
}

.tmcalc__subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--tmcalc-muted);
    max-width: 720px;
}

.tmcalc__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--tmcalc-accent-rgb), 0.28);
    background: rgba(var(--tmcalc-accent-rgb), 0.10);
    color: var(--tmcalc-accent);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.tmcalc__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    padding: 18px;
}

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

.tmcalc__panel {
    border: 1px solid var(--tmcalc-border);
    border-radius: var(--tmcalc-radius-sm);
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px);
}

.tmcalc__panel--inputs {
    padding: 16px;
}

.tmcalc__panel--result {
    padding: 16px;
}

.tmcalc__section-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.2px;
}

/* Make the "metal/grade" area feel like the screenshot (more air + subtle separators) */
.tmcalc__section-title + .tmcalc__mode {
    margin-top: 8px;
}

.tmcalc__fields {
    padding-top: 6px;
}

.tmcalc__fields + .tmcalc__section-title {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tmcalc__mode {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.tmcalc__seg {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--tmcalc-border);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.tmcalc__seg:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--tmcalc-accent-rgb), 0.35);
}

.tmcalc__seg.is-active {
    background: rgba(var(--tmcalc-accent-rgb), 0.12);
    border-color: rgba(var(--tmcalc-accent-rgb), 0.40);
    color: var(--tmcalc-accent);
}

.tmcalc__fields {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--tmcalc-gap);
}

.tmcalc__field {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tmcalc__field--full {
    grid-column: span 12;
}

.tmcalc__field--4 {
    grid-column: span 4;
}

.tmcalc__field--3 {
    grid-column: span 3;
}

@media (max-width: 720px) {
    .tmcalc__field,
    .tmcalc__field--4,
    .tmcalc__field--3 {
        grid-column: span 12;
    }
}

.tmcalc__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.tmcalc__control {
    position: relative;
}

.tmcalc__input,
.tmcalc__select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 12, 18, 0.55);
    color: rgba(255, 255, 255, 0.92);
    outline: none;
    font-size: 14px;
}

.tmcalc__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.tmcalc__input:focus,
.tmcalc__select:focus {
    border-color: rgba(var(--tmcalc-accent-rgb), 0.52);
    box-shadow: 0 0 0 3px rgba(var(--tmcalc-accent-rgb), 0.12);
}

.tmcalc__select {
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
}

.tmcalc__chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.65);
    -webkit-mask: url(/chevron_down.svg) center / contain no-repeat;
    mask: url(/chevron_down.svg) center / contain no-repeat;
    pointer-events: none;
    opacity: 0.9;
}

.tmcalc__hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.56);
}

.tmcalc__error {
    font-size: 12px;
    color: rgba(255, 94, 94, 0.95);
}

.tmcalc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tmcalc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
    user-select: none;
}

.tmcalc__btn:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--tmcalc-accent-rgb), 0.35);
}

.tmcalc__btn--primary {
    border-color: rgba(var(--tmcalc-accent-rgb), 0.50);
    background: rgba(var(--tmcalc-accent-rgb), 0.14);
    color: var(--tmcalc-accent);
}

.tmcalc__btn:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}

.tmcalc__icon {
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.tmcalc__icon--copy { -webkit-mask-image: url(/copy.svg); mask-image: url(/copy.svg); }
.tmcalc__icon--close { -webkit-mask-image: url(/cross.svg); mask-image: url(/cross.svg); }

.tmcalc__kv {
    display: grid;
    gap: 10px;
}

.tmcalc__kvRow {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
}

.tmcalc__kvLabel {
    color: rgba(255, 255, 255, 0.70);
    font-size: 12px;
    font-weight: 650;
}

.tmcalc__kvValue {
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    text-align: right;
}

.tmcalc__kvValue small {
    font-size: 12px;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.70);
}

.tmcalc__note {
    margin-top: 12px;
    font-size: 12px;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.58);
}

/* Theme variants removed (per request). Keep a single premium look. */

/* ==========================================================
   tmcalc3 — UI like the reference screenshot (light, compact)
   ========================================================== */

.tmcalc3 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    background: #fff;
}

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

.tmcalc3__left {
    padding: 16px 18px 0;
}

.tmcalc3__right {
    border-left: 1px solid #ededed;
    padding: 16px 18px;
    background: #fafafa;
}

@media (max-width: 980px) {
    .tmcalc3__right {
        border-left: 0;
        border-top: 1px solid #ededed;
    }
}

.tmcalc3__tabs {
    display: flex;
    gap: 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid #ededed;
    margin-bottom: 14px;
}

.tmcalc3__tab {
    border: 0;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: #9aa0a6;
    cursor: pointer;
    position: relative;
}

.tmcalc3__tab.is-active {
    color: #111827;
}

.tmcalc3__tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 3px;
    background: #f0cf4c;
    border-radius: 3px 3px 0 0;
}

.tmcalc3__tab.is-disabled {
    cursor: default;
    opacity: 0.6;
}

.tmcalc3__blockTitle {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}

.tmcalc3__shapes {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
}

@media (max-width: 980px) {
    .tmcalc3__shapes {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

.tmcalc3__shape {
    border: 1px solid #e6e6e6;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    display: grid;
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    cursor: pointer;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tmcalc3__shape:hover {
    border-color: #d7d7d7;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
}

.tmcalc3__shape.is-selected {
    border-color: #2f384f;
    box-shadow: 0 6px 18px rgba(47, 56, 79, 0.15);
}

.tmcalc3__radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #d6d6d6;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 2px;
    position: relative;
}

.tmcalc3__shape.is-selected .tmcalc3__radio {
    border-color: #2f384f;
}

.tmcalc3__shape.is-selected .tmcalc3__radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #2f384f;
}

.tmcalc3__shapeGlyph {
    font-size: 34px;
    line-height: 1;
    color: #2f384f;
}

.tmcalc3__shapeLabel {
    grid-column: 2;
    font-size: 12px;
    color: #111827;
}

.tmcalc3__hr {
    height: 1px;
    background: #ededed;
    margin: 14px 0;
}

.tmcalc3__metalGrid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
}

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

.tmcalc3__metalHint {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.tmcalc3__metalFields {
    display: grid;
    gap: 10px;
}

.tmcalc3__label {
    font-size: 12px;
    color: #111827;
    font-weight: 600;
}

.tmcalc3__selectWrap {
    position: relative;
}

.tmcalc3__select {
    width: 100%;
    height: 40px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 0 38px 0 12px;
    background: #fff;
    appearance: none;
    font-size: 13px;
    color: #111827;
}

.tmcalc3__chev {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background-color: #9aa0a6;
    -webkit-mask: url(/chevron_down.svg) center / contain no-repeat;
    mask: url(/chevron_down.svg) center / contain no-repeat;
    pointer-events: none;
}

.tmcalc3__sizes {
    display: grid;
    gap: 12px;
    max-width: 360px;
}

.tmcalc3__field {
    display: grid;
    gap: 6px;
}

.tmcalc3__req {
    color: #e04c4c;
}

.tmcalc3__inputWrap {
    display: flex;
    align-items: center;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    height: 40px;
    padding: 0 10px 0 12px;
    background: #fff;
}

.tmcalc3__input {
    border: 0;
    outline: none;
    flex: 1;
    font-size: 13px;
    color: #111827;
    background: transparent;
}

.tmcalc3__unit {
    font-size: 12px;
    color: #6b7280;
}

.tmcalc3__helper {
    font-size: 11px;
    color: #9aa0a6;
}

.tmcalc3__warn {
    font-size: 12px;
    color: #c2410c;
}

.tmcalc3__footer {
    display: flex;
    justify-content: center;
    padding: 16px 0 18px;
}

.tmcalc3__btn {
    width: min(420px, 100%);
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #ffdf88;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

.tmcalc3__btn:hover {
    background: #f7d26f;
}

.tmcalc3__rightTitle {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
}

.tmcalc3__diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 16px;
}

.tmcalc3__diagram img {
    width: min(420px, 100%);
    height: auto;
    display: block;
}

.tmcalc3__result {
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.tmcalc3__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: baseline;
}

.tmcalc3__rowName {
    font-size: 13px;
    color: #6b7280;
}

.tmcalc3__dots {
    border-bottom: 1px dotted #cfcfcf;
    transform: translateY(-3px);
}

.tmcalc3__rowVal {
    font-size: 13px;
    color: #111827;
    font-weight: 600;
    text-align: right;
    min-width: 64px;
}

.tmcalc3__row--weight .tmcalc3__rowName {
    font-weight: 700;
    color: #111827;
}

.tmcalc3__rightFooter {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
}

.tmcalc3__btnPdf {
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 0;
    background: #ffdf88;
    color: #111827;
    font-weight: 700;
    opacity: 0.7;
}

.tmcalc3__iconBtn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tmcalc3__iconBtn:disabled {
    opacity: 0.5;
    cursor: default;
}

.tmcalc3__icon {
    width: 18px;
    height: 18px;
    background-color: #111827;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.tmcalc3__icon--copy { -webkit-mask-image: url(/copy.svg); mask-image: url(/copy.svg); }

/* ==========================================================
   tmcalc4 — reference-like layout with OUR premium styling
   ========================================================== */

.tmcalc4 {
    border-radius: var(--tmcalc-radius);
    overflow: hidden;
}

.tmcalc4__flex {
    display: flex;
    max-width: 1504px;
    border-radius: var(--tmcalc-radius);
    overflow: hidden;
}

@media (max-width: 980px) {
    .tmcalc4__flex {
        flex-direction: column;
    }
}

.tmcalc4__params {
    flex: 2 1 864px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--tmcalc-border);
}

@media (max-width: 980px) {
    .tmcalc4__params {
        border-right: 0;
        border-bottom: 1px solid var(--tmcalc-border);
    }
}

.tmcalc4__head {
    padding: 14px 18px 0;
    border-bottom: 1px solid var(--tmcalc-border);
}

.tmcalc4__tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.tmcalc__tab_label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 16px;
    font-weight: 750;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.55);
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
}

.tmcalc__tab_label::after {
    content: "";
    height: 3px;
    border-radius: 3px 3px 0 0;
    background-color: rgba(var(--tmcalc-accent-rgb), 1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tmcalc__tab_label.active {
    color: rgba(255, 255, 255, 0.92);
}

.tmcalc__tab_label.active::after {
    opacity: 1;
}

.tmcalc__tab_label.disabled {
    opacity: 0.35;
    cursor: default;
}

.tmcalc4__content {
    padding: 16px 18px;
}

.tmcalc4__title,
.tmcalc4__title2 {
    font-size: 14px;
    font-weight: 750;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 10px;
}

.tmcalc4__products {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tmcalc-border);
    margin-bottom: 16px;
}

.tmcalc4__list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tmcalc__product {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.10);
    width: 140px;
    height: 140px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tmcalc__product:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--tmcalc-accent-rgb), 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tmcalc__product.selected {
    border-color: rgba(var(--tmcalc-accent-rgb), 0.55);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.tmcalc__check {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.20);
    position: absolute;
    top: 12px;
    left: 12px;
}

.tmcalc__product.selected .tmcalc__check {
    border-color: rgba(var(--tmcalc-accent-rgb), 0.75);
}

.tmcalc__product.selected .tmcalc__check::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--tmcalc-accent-rgb), 1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tmcalc__product_image {
    width: 56px;
    height: 56px;
    opacity: 0.95;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
}

.tmcalc__product_name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
    text-align: center;
}

.tmcalc4__formula_selects,
.tmcalc4__formula_inputs {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tmcalc-border);
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
}

@media (max-width: 980px) {
    .tmcalc4__formula_selects,
    .tmcalc4__formula_inputs {
        flex-direction: column;
    }
}

.tmcalc4__title_desc {
    flex: 1 1 55%;
}

.tmcalc4__desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 16px;
}

.tmcalc4__fields {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tmcalc4__fieldBlock .tmcalc4__name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 650;
    margin-bottom: 6px;
}

.tmcalc4__selectWrap {
    position: relative;
}

.tmcalc4__select {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 12, 18, 0.55);
    color: rgba(255, 255, 255, 0.92);
    padding: 0 38px 0 12px;
    outline: none;
    appearance: none;
}

.tmcalc4__inputField {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 12, 18, 0.55);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}

.tmcalc4__inputField input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

.tmcalc4__unit {
    color: rgba(255, 255, 255, 0.60);
    font-size: 12px;
}

.tmcalc4__desc2 {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.52);
}

.tmcalc4__warn {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 159, 67, 0.95);
}

.tmcalc4__footer {
    padding: 16px 18px;
    border-top: 1px solid var(--tmcalc-border);
    display: flex;
    justify-content: flex-end;
}

.tmcalc4__button {
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(var(--tmcalc-accent-rgb), 0.50);
    background: rgba(var(--tmcalc-accent-rgb), 0.14);
    color: rgba(var(--tmcalc-accent-rgb), 1);
    font-weight: 750;
    cursor: pointer;
}

.tmcalc4__button--secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.86);
}

.tmcalc4__button:disabled {
    opacity: 0.55;
    cursor: default;
}

.tmcalc4__result {
    flex: 1 1 560px;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 18px;
}

.tmcalc4__resultHead {
    font-size: 16px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 10px;
}

.tmcalc4__imageWrapper {
    display: flex;
    justify-content: center;
    padding: 8px 0 14px;
}

.tmcalc4__image {
    width: min(460px, 100%);
    height: auto;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.22));
}

.tmcalc4__values {
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.tmcalc4__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: baseline;
}

.tmcalc4__rowName {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.62);
}

.tmcalc4__dots {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.28);
    transform: translateY(-3px);
}

.tmcalc4__rowValue {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 650;
    min-width: 60px;
    text-align: right;
}

.tmcalc4__resultFooter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--tmcalc-border);
    margin-top: 14px;
}

.tmcalc4__weight {
    margin-right: auto;
    color: rgba(255, 255, 255, 0.70);
    font-size: 14px;
    font-weight: 650;
}

.tmcalc4__weight span {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
}

.tmcalc4__iconBtn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tmcalc4__iconBtn:disabled {
    opacity: 0.55;
    cursor: default;
}

.tmcalc4__icon {
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.tmcalc4__icon--chev { -webkit-mask-image: url(/chevron_down.svg); mask-image: url(/chevron_down.svg); color: rgba(255, 255, 255, 0.55); position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.tmcalc4__icon--download { -webkit-mask-image: url(/download.svg); mask-image: url(/download.svg); color: rgba(255, 255, 255, 0.75); }
.tmcalc4__icon--copy { -webkit-mask-image: url(/copy.svg); mask-image: url(/copy.svg); color: rgba(255, 255, 255, 0.85); }

