/* ═══════════════════════════════════
   SparkLab — Tool-specific styles
   Requires: toolbox-theme.css
   ═══════════════════════════════════ */

/* ── Electrical input grid ── */
.elec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.elec-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elec-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.elec-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.elec-icon.volt { background: #eab30822; border: 1px solid #eab30844; }
.elec-icon.amp  { background: #00e5ff22; border: 1px solid #00e5ff44; }
.elec-icon.ohm  { background: #a855f722; border: 1px solid #a855f744; }
.elec-icon.watt { background: #22c55e22; border: 1px solid #22c55e44; }

.elec-unit {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── Formula result ── */
.elec-formula {
    background: var(--bg-input);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent);
    text-align: center;
    box-shadow: 0 0 20px var(--accent-dim);
    line-height: 1.8;
}

/* ── Resistor mode toggle ── */
.res-mode-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}

.res-mode-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}

.res-mode-btn:hover { border-color: var(--accent-mid); }

.res-mode-btn.active {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-dim);
}

/* ── Resistor input rows ── */
.res-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.res-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 36px;
}

.res-row .field-input {
    flex: 1;
}

/* ── Resistor result ── */
.res-total {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.res-formula-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    word-break: break-all;
}

/* ── Color code band selects ── */
.color-band-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.band-select-group {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.band-select-group .elec-label {
    font-size: 0.72rem;
    text-align: center;
    justify-content: center;
}

/* ── Resistor visual ── */
.resistor-visual {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.resistor-body {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(180deg, #d4c4a0, #b8a87a, #d4c4a0);
    border-radius: 6px 6px 6px 6px;
    position: relative;
    min-width: 220px;
    justify-content: center;
}

.resistor-body::before,
.resistor-body::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 3px;
    background: var(--text-muted);
}

.resistor-body::before { left: -30px; }
.resistor-body::after { right: -30px; }

.resistor-band {
    width: 12px;
    height: 36px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.resistor-band.tol {
    margin-left: 12px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .elec-grid { grid-template-columns: 1fr; }
    .color-band-row { flex-direction: column; }
    .band-select-group { min-width: 100%; }
    .res-mode-toggle { flex-direction: column; }
}
