/* Autoconsumo PV simulator — page-specific styles.
   Shared .sim-card / .sim-card-header live in simulator-shared.css. */

.stat-value { font-size: 1.5rem; font-weight: 700; color: #1e40af; }
.stat-label { font-size: 0.7rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }

.summary-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f3f4f6; }
.summary-table tr:last-child td { border-bottom: none; font-weight: 700; }
.summary-table .value-col { text-align: right; font-weight: 600; white-space: nowrap; }
.summary-table .negative { color: #dc2626; }
.summary-table .positive { color: #16a34a; }

.range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.range-value { text-align: center; font-size: 1.1rem; font-weight: 700; color: #2563eb; margin-top: 0.25rem; }

input[type="range"] {
    -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
    background: #e5e7eb; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: #2563eb; cursor: pointer;
}

.tier-card {
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s;
}
.tier-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.tier-card:hover { border-color: #93c5fd; }

.compare-bar {
    height: 32px; border-radius: 6px; overflow: hidden;
    display: flex; background: #e5e7eb; position: relative;
}
.compare-bar-fill {
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 0.85rem;
    transition: width 0.5s ease;
}

.chart-wrapper { position: relative; height: 280px; }
.chart-wrapper-tall { position: relative; height: 360px; }

.input-num {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db;
    border-radius: 0.5rem; font-size: 0.875rem;
}

.badge-promo {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-best  { background: #dcfce7; color: #166534; }
.badge-popular { background: #dbeafe; color: #1e40af; }

/* ============================================================
   PRINT STYLESHEET — for Ctrl+P / "Esporta PDF" button.
   Hides chrome, restructures for A4, ensures charts/tables print well.
   ============================================================ */
.print-only { display: none; }

@media print {
    @page { size: A4; margin: 12mm 10mm; }
    html, body { background: white !important; font-size: 10pt; }
    aside, header[role="banner"], nav, footer, button, .no-print { display: none !important; }
    .print-only { display: block !important; }
    .sim-card {
        page-break-inside: avoid; box-shadow: none !important;
        border: 1px solid #d1d5db !important; padding: 0.6rem !important;
        margin-bottom: 0.6rem !important; border-radius: 4px !important;
    }
    .sim-card-header { font-size: 11pt; padding-bottom: 0.3rem; margin-bottom: 0.5rem; }
    .stat-value { font-size: 12pt !important; }
    .stat-label { font-size: 7pt !important; }
    h1 { font-size: 14pt !important; margin: 0 0 4mm 0 !important; }
    h2 { font-size: 12pt !important; }
    h3 { font-size: 11pt !important; }
    table {
        font-size: 7pt !important; page-break-inside: avoid;
        width: 100% !important; table-layout: auto !important;
    }
    table th, table td { padding: 1pt 2pt !important; word-break: break-word; }
    .overflow-x-auto { overflow: visible !important; }
    .chart-wrapper, .chart-wrapper-tall { height: 180px !important; page-break-inside: avoid; }
    canvas { max-width: 100% !important; height: auto !important; }
    a { color: #1e40af !important; text-decoration: none !important; }
    .grid { display: block !important; }
    .grid > * { margin-bottom: 0.5rem !important; }
    .print-header {
        border-bottom: 2px solid #2563eb; padding-bottom: 4mm;
        margin-bottom: 6mm; display: flex !important; justify-content: space-between;
        align-items: flex-end;
    }
    .print-header .brand { font-size: 16pt; font-weight: 700; color: #2563eb; }
    .print-header .meta { text-align: right; font-size: 8pt; color: #6b7280; line-height: 1.4; }
    .print-footer {
        font-size: 7pt; color: #6b7280; text-align: center;
        border-top: 1px solid #e5e7eb; padding-top: 2mm; margin-top: 6mm;
    }
    .no-print-input { display: none !important; }
}
