/* ==================================================
   LEI DE OHM - CALCULADORA E SIMULADOR
   TEMA CLARO / LIMPO / FUTURISTA (padrão do site)
   Paleta consistente com C-Trip / C-Trafo / C-WATT / C-CaboCERTO / C-CAP
   Todo identificador leva o prefixo "leideohm" para não colidir com as
   outras calculadoras do Bruxo Lab.
================================================== */

#leideohm-container {
    --ohm-bg: #ffffff;
    --ohm-panel: #f4f9fd;
    --ohm-panel-raised: #eaf3fb;
    --ohm-border: #d9e8f2;
    --ohm-blue: #0d6dbf;
    --ohm-blue-dark: #073b8a;
    --ohm-cyan: #17a9c9;
    --ohm-text: #16283a;
    --ohm-text-dim: #5c7488;
    --ohm-success: #1f9d5c;
    --ohm-danger: #c0392b;
    --ohm-radius: 14px;
    --ohm-glow: 0 4px 20px rgba(13, 109, 191, 0.15);
    --ohm-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

    max-width: 820px;
    margin: 0 auto 2rem auto;
    background: var(--ohm-bg);
    border: 1px solid var(--ohm-border);
    border-radius: var(--ohm-radius);
    box-shadow: var(--ohm-glow);
    padding: 0 0 1rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ohm-text);
    overflow: hidden;
}

#leideohm-container * {
    box-sizing: border-box;
}

/* ---------- HEADER ---------- */
.leideohm-header {
    background: linear-gradient(135deg, var(--ohm-blue) 0%, var(--ohm-cyan) 100%);
    padding: 0.9rem 1.4rem 0.8rem 1.4rem;
    color: #ffffff;
}

.leideohm-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leideohm-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.leideohm-logo h2 {
    margin: 0;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.leideohm-badge {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
}

.leideohm-subtitle {
    margin: 0.3rem 0 0 0;
    font-size: 0.8rem;
    opacity: 0.92;
}

/* ---------- CARD PRINCIPAL ---------- */
.leideohm-card {
    padding: 0.9rem 1.4rem 0.2rem 1.4rem;
}

/* ---------- CANVAS (mantém o "visor" escuro — contraste proposital) ---------- */
.leideohm-canvas-container {
    text-align: center;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ohm-border);
}

#leideohm-canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- TOGGLE DE MODO ---------- */
.leideohm-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
    padding: 0.35rem;
    background: var(--ohm-panel);
    border: 1px solid var(--ohm-border);
    border-radius: 999px;
}

.leideohm-mode-label {
    color: var(--ohm-text-dim);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0.2rem;
}

.leideohm-mode-btn {
    background: #ffffff;
    border: 1px solid var(--ohm-border);
    padding: 0.32rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 40px;
    color: var(--ohm-blue-dark);
    transition: all 0.2s;
}

.leideohm-mode-btn.active {
    background: linear-gradient(135deg, var(--ohm-blue), var(--ohm-cyan));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(13, 109, 191, 0.3);
}

.leideohm-mode-btn:hover:not(.active) {
    background: var(--ohm-panel-raised);
}

/* ---------- AVISO ---------- */
.leideohm-aviso {
    background: #fdf1ec;
    border: 1px solid #f3c9b8;
    color: var(--ohm-danger);
    border-radius: 9px;
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
    margin-bottom: 0.7rem;
}

/* ---------- LINHA DE INPUTS + RESULTADO ---------- */
.leideohm-inputs-line {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

@media (max-width: 640px) {
    .leideohm-inputs-line {
        grid-template-columns: 1fr;
    }
}

.leideohm-input-card {
    background: var(--ohm-panel);
    border: 1px solid var(--ohm-border);
    border-radius: 10px;
    padding: 0.6rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.leideohm-input-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0.35rem;
    color: var(--ohm-text-dim);
}

.leideohm-number-input {
    background: #ffffff;
    border: 1px solid var(--ohm-border);
    border-radius: 8px;
    padding: 0.4rem;
    font-size: 0.95rem;
    font-family: var(--ohm-mono);
    color: var(--ohm-blue-dark);
    text-align: center;
    width: 100%;
    max-width: 140px;
    margin: 0 auto;
    display: block;
    outline: none;
    font-weight: 700;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.leideohm-number-input:focus {
    border-color: var(--ohm-blue);
    box-shadow: 0 0 0 3px rgba(13, 109, 191, 0.15);
}

.leideohm-input-unit {
    font-size: 0.62rem;
    color: var(--ohm-text-dim);
    margin-top: 0.3rem;
}

/* ---------- CARD DE RESULTADO ---------- */
.leideohm-result-card {
    background: linear-gradient(135deg, var(--ohm-blue-dark), var(--ohm-blue));
    border-radius: 10px;
    padding: 0.6rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.leideohm-result-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.8);
}

.leideohm-result-value {
    font-size: 1.02rem;
    font-weight: 700;
    font-family: var(--ohm-mono);
    color: #ffffff;
}

/* ---------- POTÊNCIA ---------- */
.leideohm-power-line {
    text-align: center;
    background: var(--ohm-panel-raised);
    border: 1px solid var(--ohm-border);
    border-radius: 10px;
    padding: 0.4rem 1rem;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    color: var(--ohm-text-dim);
}

.leideohm-power-value {
    font-family: var(--ohm-mono);
    font-weight: 700;
    color: var(--ohm-blue-dark);
    margin-left: 0.35rem;
}

/* ---------- FÓRMULA ---------- */
.leideohm-formula {
    text-align: center;
    padding: 0.55rem 1rem;
    background: var(--ohm-panel);
    border: 1px dashed var(--ohm-border);
    border-radius: 10px;
}

.leideohm-formula-text {
    font-size: 0.9rem;
    font-family: var(--ohm-mono);
    font-weight: 700;
    color: var(--ohm-blue-dark);
    margin-bottom: 0.2rem;
}

.leideohm-formula-desc {
    font-size: 0.72rem;
    color: var(--ohm-text-dim);
}

/* ---------- RODAPÉ ---------- */
.leideohm-footer {
    text-align: center;
    color: var(--ohm-text-dim);
    margin-top: 0.7rem;
    padding: 0 1.4rem;
}

.leideohm-footer small {
    font-size: 0.78rem;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 480px) {
    .leideohm-logo h2 {
        font-size: 0.95rem;
    }
    .leideohm-number-input {
        font-size: 0.88rem;
    }
}
