/*
 * CloudFront Free Tier Monitor — pane-specific styles (Phase 9).
 *
 * Migration note: dropped ~140 lines that previously redeclared the
 * embedded-table-frame, table thead/tbody, subhead, footnote, and
 * empty-state. Those now come from lp-render's injected helper CSS.
 *
 * Remaining: the bespoke 3-gauge top section (no helper for it yet).
 * Tone variants (--lp-status-*-ink) come from sd-tokens-reserved.css
 * via sd-embed.css's @import.
 */

.lp-pane {
    container-type: inline-size;
}

/* ------- Top gauge row ------------------------------------------ */

.lp-cff-gauges {
    display: grid;
    grid-template-columns: 1fr 1fr 0.6fr;
    gap: 14px;
    margin: 0 0 18px;
}

.lp-cff-gauge {
    background: var(--lp-fn-bg);
    border: 1px solid var(--lp-fn-border);
    border-radius: var(--lp-pane-radius-sm);
    padding: 14px 16px;
}

.lp-cff-gauge-num {
    font-size: var(--lp-pane-fs-counter-num);
    font-weight: var(--lp-pane-fw-emphasis);
    line-height: 1;
    color: var(--lp-fn-ink);
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}

.lp-cff-gauge-limit {
    font-size: var(--lp-pane-fs-head);
    font-weight: var(--lp-pane-fw-meta);
    color: var(--lp-fn-ink-dim);
    margin-left: 2px;
}

.lp-cff-gauge-bar {
    height: 6px;
    background: var(--lp-fn-bg-soft);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.lp-cff-gauge-fill {
    height: 100%;
    background: var(--lp-fn-table-frame-color);
    transition: width 200ms ease;
    border-radius: 3px;
}

.lp-cff-gauge[data-tone="ok"]     .lp-cff-gauge-fill { background: var(--lp-status-ok-ink); }
.lp-cff-gauge[data-tone="info"]   .lp-cff-gauge-fill { background: var(--lp-fn-table-frame-color); }
.lp-cff-gauge[data-tone="warn"]   .lp-cff-gauge-fill { background: var(--lp-status-warning-ink); }
.lp-cff-gauge[data-tone="danger"] .lp-cff-gauge-fill { background: var(--lp-status-danger-ink); }

.lp-cff-gauge-label {
    font-size: var(--lp-pane-fs-meta);
    color: var(--lp-fn-ink-dim);
    line-height: 1.4;
}

.lp-cff-gauge-label strong {
    color: var(--lp-fn-ink-emphasis);
    font-variant-numeric: tabular-nums;
}

.lp-cff-gauge--days {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lp-cff-gauge--days .lp-cff-gauge-num {
    font-size: var(--lp-pane-fs-topline);
    margin-bottom: 4px;
}

.lp-cff-gauge--days .lp-cff-gauge-label {
    font-size: var(--lp-pane-fs-pill);
    text-transform: uppercase;
    letter-spacing: var(--lp-pane-letter-spacing-uppercase);
    line-height: 1.3;
}

.lp-cff-gauge--days[data-tone="warn"]   .lp-cff-gauge-num,
.lp-cff-gauge--days[data-tone="danger"] .lp-cff-gauge-num {
    color: var(--lp-status-danger-ink);
}

/* ------- Per-distribution table cells --------------------------- */

.lp-cff-dist-id {
    font-family: var(--lp-pane-font-mono);
    font-size: 12.5px;
    font-weight: var(--lp-pane-fw-head);
}

.lp-cff-dist-domain {
    font-size: var(--lp-pane-fs-pill);
    color: var(--lp-fn-ink-dim);
    margin-top: 2px;
}

/* ------- Footnote ------------------------------------------------ */

.lp-cff-footnote {
    margin: var(--lp-pane-gap-lg) 0 0;
    font-size: var(--lp-pane-fs-meta);
    color: var(--lp-fn-ink-dim);
    line-height: 1.5;
}

.lp-cff-footnote strong {
    color: var(--lp-fn-ink);
}

/* ------- Narrow-width breakpoints ------------------------------- */

@container (max-width: 600px) {
    .lp-cff-gauges { grid-template-columns: 1fr 1fr; }
    .lp-cff-gauge--days { grid-column: span 2; }
}

@container (max-width: 400px) {
    .lp-cff-gauges { grid-template-columns: 1fr; }
    .lp-cff-gauge--days { grid-column: span 1; }
}

@media (max-width: 600px) {
    .lp-cff-gauges { grid-template-columns: 1fr; }
    .lp-cff-gauge--days { grid-column: span 1; }
}
