/* =========================================================
   SIMULADOR DE CONSUMO DE ENERGIA
   Ajustes específicos da ferramenta
   ========================================================= */


/* =========================================================
   ÁREA PRINCIPAL
   ========================================================= */

.energy-tool {
    max-width: 960px;
    margin: 0 auto;
}


/* =========================================================
   ORIENTAÇÃO
   ========================================================= */

.energy-orientation {
    padding-top: 0;
}

.energy-orientation-note,
.energy-information-note {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding: 14px 16px;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.55;
}

.energy-information h3 {
    margin-top: 28px;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 1.08rem;
}


/* =========================================================
   TABELAS
   ========================================================= */

.equipment-table-wrapper {
    overflow-x: auto;
    margin-top: 22px;
}

.equipment-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.equipment-table th,
.equipment-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.82rem;
}

.equipment-table th {
    color: #0f172a;
    font-weight: 700;
    background: #f8fafc;
}

.equipment-table th:last-child,
.equipment-table td:last-child {
    text-align: right;
}

.equipment-table tbody tr:last-child td {
    border-bottom: 0;
}

.remove-button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.remove-button:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
}


/* =========================================================
   RESULTADO
   ========================================================= */

.result {
    display: none;
    margin-top: 32px;
}

.result.active {
    display: block;
}

.result-total {
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.result-total-label {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.92rem;
}

.result-total-value {
    color: #0f172a;
    font-size: 2.8rem;
    line-height: 1.1;
    font-weight: 700;
}

.result-total-note {
    margin-top: 11px;
    color: #64748b;
    font-size: 0.83rem;
    line-height: 1.5;
}


/* =========================================================
   RESUMO
   ========================================================= */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.summary-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.summary-label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

.summary-value {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 700;
}


/* =========================================================
   GRÁFICO
   ========================================================= */

.chart-box {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.chart-box h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.12rem;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

#energyChart {
    display: block;
    width: 100%;
    height: 100%;
}


/* =========================================================
   COMPARAÇÃO DE CENÁRIOS
   ========================================================= */

.scenario-box {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.scenario-box h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.12rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.comparison-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.comparison-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 0.92rem;
}

.comparison-label {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.76rem;
}

.comparison-value {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
}

.scenario-result {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.scenario-result.active {
    display: block;
}


/* =========================================================
   MEMÓRIA DE CÁLCULO
   ========================================================= */

.calculation-box {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.calculation-box h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.12rem;
}

.calculation-item {
    padding: 11px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.87rem;
    line-height: 1.55;
}

.calculation-item:last-child {
    border-bottom: 0;
}

.calculation-title {
    display: block;
    margin-bottom: 3px;
    color: #0f172a;
    font-weight: 700;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 720px) {

    .form-grid,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .energy-orientation-note,
    .energy-information-note {
        flex-direction: column;
        gap: 4px;
    }

}


@media (max-width: 520px) {

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .tool-button {
        width: 100%;
    }

    .result-total {
        padding: 22px 16px;
    }

    .result-total-value {
        font-size: 2.25rem;
    }

    .chart-container {
        height: 240px;
    }

    .chart-box,
    .scenario-box,
    .calculation-box {
        padding: 16px;
    }

}


/* =========================================================
   IMPRESSÃO
   ========================================================= */

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-header,
    .energy-input-section,
    .energy-orientation,
    .energy-information,
    .actions,
    .result-actions,
    .ad-container {
        display: none !important;
    }

    .result {
        display: block !important;
        margin-top: 0;
    }

    body {
        background: #fff;
    }

    .result-total,
    .summary-card,
    .section-card,
    .chart-box,
    .scenario-box,
    .calculation-box {
        box-shadow: none;
    }

}