/* rtn-app global styles */

:root {
    --rtn-green: #14532d;
    --rtn-green-light: #1d7a42;
}

.bg-rtn {
    background-color: var(--rtn-green);
}

/* Unit badges */
.unit-badge {
    font-weight: 500;
}
.unit-brl {
    background-color: #e7f1ff;
    color: #0a58ca;
}
.unit-brl_const {
    background-color: #fff3cd;
    color: #997404;
}
.unit-pct_gdp {
    background-color: #d1e7dd;
    color: #146c43;
}

/* Account tree */
.account-tree {
    margin-bottom: 0;
}
.account-tree .account-tree {
    margin-left: 1.25rem;
    border-left: 1px solid #dee2e6;
    padding-left: 0.75rem;
}
.account-node {
    padding: 0.15rem 0;
}
.account-link {
    text-decoration: none;
}
.account-link:hover {
    text-decoration: underline;
}
.account-node.level-1 > .account-link {
    font-weight: 600;
}

/* Editorial content */
.content-article {
    max-width: 760px;
}
.content-article img {
    max-width: 100%;
    height: auto;
}

/* Active account in hierarchy tree */
.account-link.active-account {
    background-color: rgba(20, 83, 45, 0.08); /* Light green tint */
    color: var(--rtn-green) !important;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border-left: 3px solid var(--rtn-green);
    display: inline-block;
}

/* Adjustments for the sticky chart panel in desktop layout */
.sticky-lg-top {
    position: -webkit-sticky;
    position: sticky;
    top: 1.5rem;
}

/* Dark-mode overrides (Bootstrap 5.3 data-bs-theme handles the rest) */
[data-bs-theme="dark"] .unit-brl {
    background-color: #0d2b52;
    color: #7db3ff;
}
[data-bs-theme="dark"] .unit-brl_const {
    background-color: #3a2e08;
    color: #ffd75e;
}
[data-bs-theme="dark"] .unit-pct_gdp {
    background-color: #0e3524;
    color: #63c78f;
}
[data-bs-theme="dark"] .account-tree .account-tree {
    border-left-color: #3a4149;
}
[data-bs-theme="dark"] .account-link.active-account {
    background-color: rgba(63, 164, 106, 0.15);
    color: #63c78f !important;
    border-left-color: #3fa46a;
}

/* --------------------------------------------------------------------------
   Chart containers & async states (loading / erro / vazio)
   -------------------------------------------------------------------------- */
.chart-box {
    position: relative;
    width: 100%;
}

.chart-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.chart-overlay i {
    font-size: 1.5rem;
    opacity: 0.6;
}

