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

/* ===== CONTAINER & LAYOUT ===== */
.debt-leverage-wrapper {
    font-family: var(--liq-font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--liq-text);
    padding: 0;
    border: none;
    background: var(--liq-surface);
    border-radius: 6px;

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

/* ===== HEADER SECTION ===== */
.debt-leverage-wrapper .report-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 0.625rem 0.625rem 0.375rem;
    color: var(--liq-text);
}

.debt-leverage-wrapper .report-subtitle {
    font-size: 0.875rem;
    text-align: center;
    margin: 0;
    padding: 0.375rem 0.625rem 0.625rem;
    font-style: normal;
    color: var(--liq-text-muted);
    font-weight: 400;
}

.oe-chart-container .liq-apex-host[id^="dl-chart-"] {
    width: 100%;
    min-height: 100%;
}

.dl-apex-tooltip {
    background: #1C1917;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 190px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.dl-apex-tooltip-title {
    color: #FAFAF9;
    font: 600 12px var(--liq-font-body);
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dl-apex-tooltip-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin: 4px 0;
}

.dl-apex-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.dl-apex-tooltip-label {
    color: #D6D3D1;
    font: 500 11px var(--liq-font-body);
}

.dl-apex-tooltip-value {
    color: #FAFAF9;
    font: 600 11px var(--liq-font-mono);
}

.dl-apex-tooltip-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #A8A29E;
    font: 500 10px var(--liq-font-body);
}

/* ===== METRICS GRID ===== */
.debt-leverage-wrapper .cvp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    padding: 0.625rem;
    margin: 0;
}

/* ===== METRIC CARDS ===== */
.dl-metric-card {
    background: var(--liq-surface);
    border-radius: 6px;
    padding: 0.625rem;
    border: 1px solid var(--liq-border);
    transition: box-shadow 0.2s ease;
}

.dl-metric-card:hover {
    box-shadow: var(--liq-shadow-md);
}

.dl-metric-card .metric-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--liq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.dl-metric-card .metric-value {
    font-size: 1.15rem;
    font-weight: 400;
    font-family: var(--liq-font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--liq-accent);
    margin-bottom: 0.375rem;
    display: block;
    line-height: 1.2;
}

.dl-metric-card .metric-interpretation {
    font-size: 0.8125rem;
    color: var(--liq-text-muted);
    line-height: 1.5;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--liq-bg);
}

/* ===== METRIC STATUS INDICATORS ===== */
.dl-metric-card .metric-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.dl-metric-card .metric-status.good {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.dl-metric-card .metric-status.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.dl-metric-card .metric-status.alert {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ===== COMPONENTS SUMMARY SECTION ===== */
.dl-components-summary {
    margin: 0.625rem;
    padding: 0.625rem;
    background: var(--liq-surface);
    border-radius: 6px;
    border: 1px solid var(--liq-border);
    border-left: 3px solid var(--liq-accent);
}

.dl-components-summary h4 {
    margin: 0 0 0.625rem 0;
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--liq-text);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dl-components-summary p {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--liq-bg);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--liq-text-secondary);
    font-family: var(--liq-font-mono);
    font-variant-numeric: tabular-nums;
}

.dl-components-summary p strong {
    color: var(--liq-text);
    font-weight: 500;
}

/* ===== DATA PILLS ===== */
.debt-leverage-wrapper .data-pill {
    display: inline-block;
    padding: 0.375rem 0.625rem;
    margin: 0.25rem;
    background: rgba(59, 130, 246, 0.05);
    color: var(--liq-accent);
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.debt-leverage-wrapper .data-pill:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===== ACCOUNT IDENTIFICATION SECTION ===== */
.dl-account-identification {
    margin: 0.625rem;
    padding: 0.625rem;
    background: var(--liq-surface);
    border-radius: 6px;
    border: 1px solid var(--liq-border);
}

.dl-account-identification h4 {
    margin: 0 0 0.625rem 0;
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--liq-text);
}

.dl-account-identification .account-group {
    margin-bottom: 0.625rem;
    padding: 0.625rem;
    background: var(--liq-bg);
    border-radius: 6px;
    border: 1px solid var(--liq-border);
}

/* ===== LOADING STATE ===== */
.dl-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--liq-surface);
    border-radius: 6px;
    margin: 0.625rem;
}

.dl-loading .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--liq-border);
    border-top-color: var(--liq-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.dl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--liq-surface);
    border-radius: 6px;
    margin: 0.625rem;
    padding: 1rem;
    text-align: center;
}

.dl-empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 0.625rem;
    opacity: 0.3;
}

.dl-empty h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--liq-text);
    margin: 0 0 0.375rem 0;
}

.dl-empty p {
    font-size: 1rem;
    color: var(--liq-text-muted);
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .debt-leverage-wrapper .cvp-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.625rem;
        padding: 0.625rem;
    }

    .debt-leverage-wrapper .report-title {
        font-size: 1.1rem;
        padding: 0.75rem 0.75rem 0.375rem;
    }
}

@media (max-width: 768px) {
    .debt-leverage-wrapper .cvp-metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        padding: 0.5rem;
    }

    .debt-leverage-wrapper .report-title {
        font-size: 1.05rem;
        padding: 0.625rem 0.625rem 0.375rem;
    }

    .dl-metric-card {
        padding: 0.75rem;
    }

    .dl-metric-card .metric-value {
        font-size: 1.25rem;
    }

    .dl-components-summary,
    .dl-account-identification {
        margin: 0.5rem;
        padding: 0.625rem;
    }
}

@media (max-width: 480px) {
    .dl-metric-card .metric-value {
        font-size: 1.125rem;
    }

    .dl-components-summary h4 {
        font-size: 0.9375rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .debt-leverage-wrapper {
        background: var(--liq-surface);
    }

    .dl-metric-card,
    .dl-components-summary {
        border: 1px solid var(--liq-border);
        page-break-inside: avoid;
    }

    .dl-metric-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ===== ACCESSIBILITY ===== */
.dl-metric-card:focus-within {
    outline: 2px solid var(--liq-accent);
    outline-offset: 2px;
}
