/* ==========================================================================
   Reports (monthly overtime analytics): layout only. Filter bar, tiles, pills, tab group, tables, empty states and callouts come
   from components/ui.css and Web Awesome.
   ========================================================================== */
@layer app-pages {

    /* The Team / My scope switch: the pressed one is filled, outlined and ticked */
    .reports-scope { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    /* The icon library sets display outside our layers, so a display rule loses; its own variable is what it reads */
    .reports-scope-btn[aria-pressed="false"] .reports-scope-check { --fa-display: none; }

    /* Four summary cards: label, figure and a line under it */
    .reports-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin-bottom: 1rem; }
    .reports-tile { align-items: flex-start; }
    .reports-tile-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; overflow-wrap: anywhere; }
    .reports-tile .ui-tile-label { white-space: normal; }

    #viewMonthlyAnalytics wa-button[hidden] { display: none; }      /* a wa-button sets its own display, so hidden needs this */
    .reports-clear { align-self: end; }
    #analyticsFilterNote:not([hidden]), #analyticsSummaryError:not([hidden]) { margin: 0 0 1rem; }
    .reports-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
    .reports-table th.ui-num { text-align: right; }                  /* the column names sit over their numbers */
    #viewMonthlyAnalytics .ui-hint { padding-bottom: 0.5rem; }
    .reports-flag { margin-left: 0.5rem; vertical-align: middle; }
    .reports-delta { display: inline-flex; align-items: center; gap: 0.375rem; }
    .reports-delta:empty { display: none; }

    /* A column head you can press to sort by: it looks like a heading, not a link */
    .reports-sort { color: inherit; font: inherit; font-weight: 600; letter-spacing: inherit; text-transform: inherit; text-decoration: none; }
    .reports-sort-icon { margin-left: 0.25rem; color: var(--d26-ink-muted); font-size: 0.75rem; }
    .reports-table th[aria-sort="ascending"] .reports-sort-icon,
    .reports-table th[aria-sort="descending"] .reports-sort-icon { color: var(--d26-accent); }

    #projectsError:not([hidden]), #employeesError:not([hidden]), #departmentsError:not([hidden]) { margin: 0 0 1rem; }

    .reports-icon { color: var(--d26-accent); }
    .reports-dept { display: inline-block; padding: 0.125rem 0.5rem; border: 1px solid var(--d26-line); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; }
    .reports-total td { background: var(--d26-surface); border-top: 1px solid var(--d26-line); font-weight: 700; }

    @container (width <= 40rem) { .reports-total td { border-top: 0; } }             /* the card switch itself is the shared data_table(cards="narrow") */
}
