/* Red Eagle Account Portal — portal-specific styles layered on the estate
   design system (ret-design-system.css + dark-mode.css, transplanted from
   RedEagle.Identity). Colours and spacing come from the design system's
   --ret-* tokens; dark mode is Bootstrap 5.3's data-bs-theme attribute, so
   most components adapt via the token overrides in dark-mode.css. Only
   styles unique to the portal live here. */

/* --- layout chrome -------------------------------------------------------- */

/* The design system's admin navbar assumes a single fixed 56px row; the
   portal navbar carries its links inline and collapses them on mobile, so it
   must be allowed to grow. */
.navbar.admin-navbar.portal-navbar {
    height: auto;
    min-height: 56px;
    padding: 0.375rem 0;
}

.portal-navbar .navbar-brand img {
    height: 30px;
    width: auto;
}

.portal-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

    .portal-navbar .navbar-nav .nav-link:hover,
    .portal-navbar .navbar-nav .nav-link.active {
        color: #ffffff;
    }

/* Clears the fixed navbar */
main.portal-main {
    padding-top: 5.5rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 8rem);
}

.site-footer {
    border-top: 1px solid var(--ret-border);
    padding: 1rem 0;
    color: var(--ret-text-secondary);
    font-size: 0.9rem;
}

/* --- page heroes (estate background images) ------------------------------- */

/* Slim title band on inner pages: PublicWebsite's dark data-texture backdrop
   with Identity's ::before-scrim technique (image on the container, a flat
   rgba wash above it, content lifted with z-index). The image is dark in both
   themes; dark mode just deepens the scrim (end of this file). */
.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ret-radius-lg, 0.75rem);
    background-color: #2b1a1a; /* the image's dominant tone — paints before the webp lands */
    background-image: url('/img/bg/black-data-hero.webp');
    background-size: cover;
    background-position: center;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

    .page-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
    }

    .page-hero > * {
        position: relative;
        z-index: 1;
    }

    .page-hero h1 {
        color: #ffffff;
        font-size: 1.75rem;
        margin: 0;
    }

/* Landing hero: MeldEagle's red-gold brand backdrop, responsive variants
   swapped at the same breakpoints MeldEagle used, same scrim technique. */
.landing-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ret-radius-lg, 0.75rem);
    background-color: #373737;
    background-image: url('/img/bg/bg-red-gold-4_small.webp');
    background-size: cover;
    background-position: center;
    padding: 3.5rem 2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

@media (min-width: 768px) {
    .landing-hero {
        background-image: url('/img/bg/bg-red-gold-4_medium.webp');
        padding: 4.5rem 3rem;
    }
}

@media (min-width: 1024px) {
    .landing-hero {
        background-image: url('/img/bg/bg-red-gold-4.webp');
    }
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.landing-hero h1 {
    color: #ffffff;
}

.landing-hero .lead {
    color: rgba(255, 255, 255, 0.9);
    max-width: 40rem;
}

/* --- portal components ----------------------------------------------------- */

/* Copy-paste OAuth2/claim grids (credentials pages) */
.claim-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--ret-border);
    border-radius: var(--ret-radius-md, 0.5rem);
    background: var(--ret-bg-light);
    max-width: 44rem;
    margin-bottom: 1rem;
}

    .claim-list dt {
        font-family: Consolas, "Courier New", monospace;
        color: var(--ret-text-secondary);
        font-weight: 400;
    }

    .claim-list dd {
        margin: 0;
        font-family: Consolas, "Courier New", monospace;
        overflow-wrap: anywhere;
    }

/* The one-time client secret — select-all so it can't be half-copied */
.secret-value {
    font-weight: 600;
    user-select: all;
}

/* "dev only" marker on development-stand-in features */
.dev-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ret-primary);
    border-radius: var(--ret-radius-sm, 0.25rem);
    padding: 0.15rem 0.45rem;
    vertical-align: middle;
}

/* Dashboard headline figures */
.stat-figure {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.25rem 0 0.5rem;
}

    .stat-figure .text-muted {
        font-size: 1rem;
        font-weight: 400;
    }

/* Bootstrap progress bars in brand red (allowance usage) */
.progress-bar {
    background-color: var(--ret-primary);
}

/* Plan/pack card feature lists */
.plan-features {
    padding-left: 1.1rem;
    margin: 0 0 1rem;
}

    .plan-features li {
        margin-bottom: 0.35rem;
    }

/* Usage page: CSS-only daily bar chart */
.usage-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 10rem;
    margin: 1rem 0;
    border-bottom: 1px solid var(--ret-border);
}

.usage-chart-col {
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
    height: 100%;
    min-width: 2px;
}

.usage-chart-bar {
    width: 100%;
    min-height: 1px;
    background: var(--ret-primary);
    border-radius: 1px 1px 0 0;
}

/* Narrow numeric fields in settings forms */
.field-narrow {
    max-width: 12rem;
}

/* --- dark mode (portal-specific bits only; everything else adapts via the
       token overrides in dark-mode.css) ------------------------------------ */

[data-bs-theme="dark"] .page-hero::before,
[data-bs-theme="dark"] .landing-hero::before {
    background: rgba(0, 0, 0, 0.55);
}
