/* The live board: one section per floor, a 2x2 grid inside each. */

.board {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.floor {
    background: var(--panel);
    border: var(--panel-border-w) solid var(--panel-border-c);
    border-radius: var(--r-xl);
    padding: var(--pad-panel);
}

.floor-head {
    display: flex;
    align-items: baseline;
    gap: var(--gap);
    margin-bottom: var(--gap);
}

.floor-title {
    margin: 0;
    font-size: var(--fs-body);
    font-weight: 700;
    letter-spacing: .02em;
}

.floor-grid {
    display: grid;
    grid-template-columns: 58px 1fr 1fr;
    gap: var(--gap-sm) var(--gap);
    align-items: stretch;
}

.row-label {
    display: flex;
    align-items: center;
    font-size: var(--fs-small);
    color: var(--text-dim);
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 84px;
    padding: 12px 14px 12px 18px;
    border-radius: var(--r-lg);
    background: var(--panel2);
    border: var(--btn-border-w) solid transparent;
    overflow: hidden;
    transition: background var(--t-fast) var(--t-ease), border-color var(--t-fast) var(--t-ease);
}

/* A stripe carries the state so it survives colour-blindness and greyscale printing. */
.tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--stripe-w);
    background: var(--state-off);
}

.tile-name {
    font-size: var(--fs-body);
    color: var(--text);
}

.tile-state {
    font-size: var(--fs-title);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-dim);
}

.tile-detail {
    color: var(--text-dim);
    min-height: 1em;
}

.tile-empty {
    background: transparent;
    border-color: var(--border-soft);
    border-style: dashed;
}

.tile-empty::before {
    display: none;
}

.tile-excluded {
    background: var(--tint-off);
}

.tile-excluded::before {
    background: var(--state-off);
}

.tile-excluded .tile-state {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--text-faint);
}

.tile[data-state="free"] {
    background: var(--tint-free);
}

.tile[data-state="free"]::before {
    background: var(--state-free);
}

.tile[data-state="free"] .tile-state {
    color: var(--state-free);
}

.tile[data-state="busy"] {
    background: var(--tint-busy);
}

.tile[data-state="busy"]::before {
    background: var(--state-busy);
}

.tile[data-state="busy"] .tile-state {
    color: var(--warning);
}

.tile[data-state="booked"] {
    background: var(--tint-booked);
}

.tile[data-state="booked"]::before {
    background: var(--state-booked);
}

.tile[data-state="booked"] .tile-state {
    color: var(--state-booked);
}

.tile[data-state="done"] {
    background: var(--tint-done);
}

.tile[data-state="done"]::before {
    background: var(--state-done);
}

.tile[data-state="done"] .tile-state {
    color: var(--state-done);
}

.tile[data-state="error"] {
    background: var(--tint-off);
    border-color: var(--danger);
}

.tile[data-state="error"] .tile-state {
    font-size: var(--fs-body);
    color: var(--danger);
}

@media (max-width: 620px) {
    .floor-grid {
        grid-template-columns: 44px 1fr 1fr;
    }

    .tile {
        padding: 10px 10px 10px 14px;
    }

    .tile-state {
        font-size: var(--fs-body);
    }
}
