/* HousekeepingBoard.css -- Room Board (Room Turn until TLP-1234) */
/* Layout: VerticalStackTemplate > [the five figures, the key, Panel with the people column beside it] */
/*         Panel > an ExpandablePanel per building > full-width section rows of tiles */
/* Components: KPICard (inline), Panel, ExpandablePanel, RoomCard tiles, Button, */
/*             StatusBanner, Modal, TeamRoster */
/* All values from design-tokens.css -- no hardcoded colours, spacing or radii */

/* The figures and the key above, the board below. With the people column beside it
   (Housekeeping's host, always: PO 2026-10-01) the two-column template takes the rest and its
   columns fill as they always have; alone (the desk's host) the board panel fills the rest
   through the one-panel rule. */
.board-stack > .board-layout {
    flex: 1;
    min-height: 0;
    height: auto;
}

/* The five figures: one line of inline cards, close together, so the rooms start high. */
.kpi-card-grid.board-figures {
    gap: var(--space-2);
}

/* The key: the line under the figures, the width of the page (PO 2026-10-01). It sits outside
   the board's scroller, so it is always in view and nothing needs to pin it. */
.board-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
}

.board-key-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
}

/* The stack of buildings, and the section blocks inside one. The PARENT owns the space
   between children via gap; no component here carries an external margin. */
.board-buildings {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* A building's sections, one under another, each the full width (PO 2026-09-30): a section is
   a cleaner's round, so a row reads as one person's morning, and its header has the room for a
   long name and the team picker. */
.board-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* ONE SECTION = ONE BLOCK, in the Availability columns' look: the content surface, the
   default border, a one-line header over the section's rooms as tiles. */
.board-section {
    display: flex;
    flex-direction: column;
    background: var(--bg-layer-3);
    border: var(--border-width-1) solid var(--border-default);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* One line: select all, the name and its count, who leaves and arrives, and the team picker
   at the right end. On a narrow screen the name shortens first (whole on hover). */
.board-section-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1_5) var(--space-2);
    border-bottom: var(--border-width-1) solid var(--border-default);
}

.board-section-head > * {
    flex: none;
}

.board-section-head > .board-section-team {
    margin-left: auto;
    display: flex;
}

.board-section-head > .board-section-name {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-section-name,
.board-section-count {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    white-space: nowrap;
}

/* A section whose rooms can reach no team. It is the one thing on this board that
   looks completely normal and silently does nothing, so it is marked. */
.board-section--unroutable .board-section-name {
    color: var(--color-warning);
}

/* The tiles, as many to a line as the width holds (the grid is the molecule's own). */
.board-section-rooms {
    padding: var(--space-2);
}

/* A room given this section for today in its window (TLP-1281): a dark corner, top right. Not
   the border or the fill -- those are today's clean, and dashed amber is "To send" -- and not
   the ring or the outline, which are selected and focused. */
.room-card--moved {
    position: relative;
    overflow: hidden;
}

.room-card--moved::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 var(--space-3) var(--space-3) 0;
    border-color: transparent var(--text-primary) transparent transparent;
}

/* THE ROOM WINDOW (TLP-1281): the Modal's body. The PARENT owns the space between the icons, the
   facts and the choices. A banner's own bottom margin is taken off here, scoped to the window,
   so every gap is the same one. */
.board-room-body,
.board-room-facts,
.board-room-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.board-room-body {
    gap: var(--space-4);
}

.board-room-actions > .status-banner {
    margin-bottom: 0;
}

/* Under the clean, only when it differs from the situation's own: that line, then Back to the
   default clean at its start, not centred across the window. Empty, it takes no space. */
.board-room-reset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
}

.board-room-reset:empty {
    display: none;
}

/* The room's eight icons, as on its tile, a size up. */
.board-room-icons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* What Send a clean will do, or why it cannot, in the help text's voice. */
.board-room-note {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* The window's allergies, inside the Allergy Guardian section: each one its icon and its name,
   flowing and wrapping. The typography sheet gives every list a left indent and a bottom
   margin; this one lines up with the text above it and ends where the box does. */
.board-allergy-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    padding: 0;
    margin: 0;
}

.board-allergy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1_5);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.board-allergy .allergen-icon {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
}

/* The people column (TLP-1187), in the two-column template's right column beside the
   board. The wrapper is what the column redraws by; it passes the column's height on to
   the panel, so the panel body scrolls rather than the page. */
.board-people {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.board-people > .dashboard-section {
    flex: 1;
    min-height: 0;
}

/* The board's header. Title, the day's summary, the filters and the buttons do not fit on
   one line, and the Panel's controls bar (flex: 1, a zero basis) stays beside the title and
   shrinks until its filters stack one per row. Given its own width as its basis, it wraps as
   a unit instead: the title and summary on the first row, the filters and buttons together
   on the second -- with the people column open or folded. Scoped to this board. */
.board-panel > .section-header > .controls-bar {
    flex-basis: auto;
}
