/* dupontAnalysis.css - Professional Financial SaaS Version */

/* ===== MAIN WRAPPER ===== */
.dupont-analysis-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #1f2937;
    padding: 0;
    background: #FFFFFF;
    border-radius: 6px;

    max-width: 1200px; /* Maximum width for readability */
    margin: 0 auto; /* Center the content */}

/* ===== DUPONT DIAGRAM ===== */
.dupont-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #FFFFFF;
    max-width: 900px;
}

/* ===== COLUMNS ===== */
.dupont-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.dupont-column.result {
    margin-left: 1rem;
}

/* ===== COMPONENT GROUPS ===== */
.dupont-component-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== METRIC BOXES ===== */
.dupont-metric-box {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    text-align: center;
    min-width: 180px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.dupont-metric-box:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dupont-metric-box.roa-intermediate {
    background-color: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.dupont-metric-box.final-roe {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

/* ===== LABELS ===== */
.dupont-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.final-roe .dupont-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== VALUES ===== */
.dupont-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    color: #1f2937;
    line-height: 1.2;
}

.final-roe .dupont-value {
    color: white;
    font-weight: 400;
}

.dupont-value.large-value {
    font-size: 1.875rem;
}

/* ===== CONNECTORS & OPERATORS ===== */
.dupont-connector-group {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0;
}

.dupont-operator {
    font-size: 1.5rem;
    font-weight: 500;
    color: #3b82f6;
    padding: 0 0.75rem;
}

.dupont-operator.large {
    font-size: 2rem;
}

.dupont-connector-main,
.dupont-connector-final {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

/* ===== EXPLANATIONS SECTION ===== */
.dupont-explanations {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.dupont-explanations h4 {
    margin: 0 0 0.75rem 0;
    color: #1f2937;
    font-size: 1.0625rem;
    font-weight: 500;
}

.dupont-explanations ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.dupont-explanations li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #374151;
}

/* ===== COMPONENTS SUMMARY ===== */
.dupont-components-summary {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    font-size: 0.875rem;
}

.dupont-components-summary h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.0625rem;
    color: #1f2937;
    font-weight: 500;
}

.dupont-components-summary p {
    margin: 0.5rem 0;
    color: #374151;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
}

.dupont-components-summary p strong {
    font-weight: 500;
    color: #1f2937;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .dupont-diagram {
        max-width: 100%;
        padding: 1.25rem;
    }

    .dupont-metric-box {
        min-width: 160px;
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 800px) {
    .dupont-diagram {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .dupont-connector-main,
    .dupont-connector-final {
        transform: rotate(90deg);
        padding: 1rem 0;
    }

    .dupont-column.result {
        margin-left: 0;
        margin-top: 1rem;
    }

    .dupont-metric-box {
        min-width: 140px;
    }

    .dupont-value {
        font-size: 1.375rem;
    }

    .dupont-value.large-value {
        font-size: 1.625rem;
    }

    .dupont-operator {
        font-size: 1.375rem;
    }

    .dupont-operator.large {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .dupont-diagram {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .dupont-metric-box {
        min-width: 120px;
        padding: 0.75rem;
    }

    .dupont-value {
        font-size: 1.25rem;
    }

    .dupont-value.large-value {
        font-size: 1.5rem;
    }

    .dupont-explanations,
    .dupont-components-summary {
        padding: 1rem;
        margin-top: 1rem;
    }

    .dupont-explanations h4,
    .dupont-components-summary h4 {
        font-size: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .dupont-analysis-wrapper {
        background: white;
    }

    .dupont-diagram,
    .dupont-metric-box,
    .dupont-explanations,
    .dupont-components-summary {
        border: 1px solid #d1d5db;
        page-break-inside: avoid;
    }

    .dupont-metric-box.final-roe {
        background-color: #3b82f6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .dupont-metric-box:hover {
        box-shadow: none;
    }
}

/* ===== ACCESSIBILITY ===== */
.dupont-metric-box:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
