/* =========================================================
   TOOLFLUX LAB
   CALCULATOR COMPONENTS
========================================================= */

.calculator-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 32px;

    margin-bottom: 48px;
}

.calc-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 28px;

    box-shadow: var(--shadow-sm);
}

/* =========================================================
   CALCULATOR TABS
========================================================= */

.calc-mode-tabs {
    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding-bottom: 8px;

    margin-bottom: 24px;

    border-bottom: 1px solid var(--border);

    scrollbar-width: none;
}

.calc-mode-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    background: var(--surface-soft);

    color: var(--text-secondary);

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;

    transition: all var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);

    border-color: var(--primary);

    color: #ffffff;
}

/* =========================================================
   ACTIONS
========================================================= */

.calc-actions {
    display: flex;

    gap: 12px;

    margin-top: 24px;
}

.calc-actions .btn-primary {
    flex: 1;
}

/* =========================================================
   RESULT
========================================================= */

.result-panel {
    background: var(--primary-light);

    border:
        1px solid
        rgba(37, 99, 235, 0.2);

    border-radius: var(--radius-md);

    padding: 24px;

    margin-top: 28px;

    display: none;
}

.result-panel.active {
    display: block;

    animation:
        fadeIn 200ms ease;
}

.result-label {
    font-size: 13px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    font-weight: 800;

    color: var(--primary);

    margin-bottom: 6px;
}

.result-value {
    font-size:
        clamp(28px, 5vw, 40px);

    font-weight: 900;

    color: var(--text);

    line-height: 1.1;

    margin-bottom: 12px;
}

.result-explanation {
    font-size: 14px;

    color: var(--text-secondary);

    margin: 0;
}

/* =========================================================
   VISUAL BAR
========================================================= */

.visual-bar-container {
    margin-top: 16px;

    height: 12px;

    background: var(--border);

    border-radius: 999px;

    overflow: hidden;
}

.visual-bar-fill {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--accent)
        );

    width: 0%;

    transition:
        width 300ms ease;
}