/* ==============================================================================
   FireDOMUS — CALC SCHEMATICS & INFOGRAPHIC COMPONENTS
   Estilos unificados para diagramas técnicos, gráficas interactivas y esquemas
   ============================================================================== */

:root {
    --brand-red: #E63946;
    --brand-red-dark: #AF2B2E;
    --brand-navy: #1a1a2e;
    --brand-slate: #0f172a;
    --brand-teal: #00A896;
    --brand-teal-light: #e6fffa;
    --brand-amber: #F4A261;
    --brand-blue: #2563eb;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --surface-bg: #f8fafc;
}

/* Container for visual diagrams */
.schematic-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.25rem;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.schematic-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08);
}

.schematic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.schematic-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-slate);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schematic-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Canvas & Diagram Wrappers */
.canvas-wrapper {
    position: relative;
    width: 100%;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.canvas-wrapper.light {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.schematic-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Normative Guide Card (Collapsible) */
.norm-guide-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--brand-red);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.25rem;
}

.norm-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-slate);
}

.norm-guide-body {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
}

.norm-guide-body ul {
    margin: 0.4rem 0 0 1.2rem;
    padding: 0;
}

.norm-guide-body li {
    margin-bottom: 0.35rem;
}

/* Technical Gauge / Speedometer */
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.gauge-svg {
    width: 180px;
    height: 100px;
}

.gauge-value-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: -0.5rem;
}

.gauge-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

/* Timeline Comparison Bar (ASET / RSET) */
.timeline-comparison {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.timeline-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.timeline-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
}

.timeline-bar-bg {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.timeline-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.4s ease;
}

.timeline-bar-fill.safe { background: linear-gradient(90deg, #10b981, #059669); }
.timeline-bar-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.timeline-bar-fill.danger { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.timeline-bar-fill.info { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }

/* SVG Tech Icons & Badges */
.metric-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.metric-chip.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.metric-chip.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Legend items below canvas */
.diagram-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
