/* ThreadsTraffic Utility Classes
   Semantic utilities for flex layouts, typography colors, spacing, and clean CSP without inline styles */

/* Display & Visibility */
.hidden,
.d-none {
    display: none !important;
}

.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

/* Flexbox Helpers */
.flex-align-center {
    display: flex;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.flex-row-center {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-between-center-mb2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gap-sm-flex {
    display: flex;
    gap: 0.5rem;
}

.gap-xs-flex {
    display: flex;
    gap: 0.35rem;
}

.flex-col-gap-xs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flex-col-gap-sm {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Spacing Helpers */
.my-8 {
    margin-top: 8px;
    margin-bottom: 8px;
}

.mb-6 {
    margin-bottom: 6px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.pt-12 {
    padding-top: 12px;
}

.py-12 {
    padding-top: 12px;
    padding-bottom: 12px;
}

.p-12 {
    padding: 12px;
}

.p-16 {
    padding: 16px;
}

.border-subtle-top {
    border-top: 1px solid var(--bento-border);
}

.surface-subtle {
    background: var(--overlay-white-02);
    border: 1px solid var(--bento-border);
}

.rounded-12 {
    border-radius: var(--radius-control);
}

.rounded-pill {
    border-radius: var(--radius-pill);
}

.opacity-0 {
    opacity: 0;
}

/* Spacing Helpers */
.m-0 {
    margin: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-1-block {
    margin-top: 0.25rem;
    display: block;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

/* Text Colors from Tokens */
.text-lime {
    color: var(--brand-primary) !important;
}

.text-blue {
    color: var(--info) !important;
}

.text-muted {
    color: var(--text-zinc-500) !important;
}

.text-zinc-200 {
    color: var(--text-zinc-200) !important;
}

.text-zinc-300 {
    color: var(--text-zinc-300) !important;
}

.text-success {
    color: var(--success-text) !important;
}

.text-danger {
    color: var(--danger-text) !important;
}

.text-warning {
    color: var(--warning-text) !important;
}

.text-purple {
    color: var(--purple-text) !important;
}

.status-text-success {
    color: var(--success) !important;
}

/* Legend Dots (Replaces inline style in Overview Chart) */
.legend-dot-lime {
    background: var(--brand-primary);
    box-shadow: 0 0 8px var(--overlay-lime-60);
}

.legend-dot-blue {
    background: var(--info);
    box-shadow: 0 0 8px var(--overlay-sky-60);
}

/* Hero Metric Numbers & Layout (Overview Tile 2) */
.hero-metric-wrap {
    display: flex;
    align-items: baseline;
    gap: 2.25rem;
}

.hero-metric-col {
    border-left: 1px solid var(--bento-border);
    padding-left: 2rem;
}

.hero-num-lime {
    color: var(--brand-primary);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-black);
    font-family: var(--font-mono);
    filter: drop-shadow(0 0 16px var(--overlay-lime-35));
}

.hero-num-blue {
    color: var(--info);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    font-family: var(--font-mono);
}

.hero-num-muted {
    color: var(--text-zinc-500);
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    font-family: var(--font-mono);
    opacity: 0.7;
}

.funnel-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Project Settings Activity & Sleep Rows */
.project-activity-row {
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--overlay-white-02);
    border: 1px solid var(--bento-border);
    border-radius: var(--radius-card);
}

.activity-label {
    font-weight: var(--fw-semibold);
    font-size: 0.875rem;
    color: var(--text-white);
}

.switch-no-margin {
    margin: 0 !important;
}

.sleep-mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: var(--canvas-bg);
    border: 1px solid var(--bento-border);
    border-radius: var(--radius-control);
    min-height: 42px;
}

.sleep-mode-label {
    font-size: 0.85rem;
    font-weight: var(--fw-medium);
    color: var(--text-zinc-300);
}

.tile-top-start {
    align-items: flex-start;
}

.action-row-compact {
    gap: 0.65rem;
    margin-top: 0;
}

.active-test-title {
    font-weight: var(--fw-bold);
    color: var(--text-white);
}

/* Report Modal Custom Grids */
.report-checkbox-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    background: var(--canvas-bg);
    border: 1px solid var(--bento-border);
    border-radius: var(--radius-control);
    padding: 0.75rem;
}

.report-checkbox-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.35rem;
    background: var(--canvas-bg);
    border: 1px solid var(--bento-border);
    border-radius: var(--radius-control);
    padding: 0.6rem;
}

.cell-truncate-250 {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-cpr {
    color: var(--purple);
}

.link-primary {
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
}

.hit-reason-box {
    font-size: 0.78rem;
    color: var(--text-zinc-400);
    background: var(--overlay-white-03);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm, 6px);
}


