/* controlroom.css -- the Control room (controlroom.js): one column, the messages big on top, the tiles under them. Tokens from core.css. */

.crm-card { width: 720px; max-width: calc(100vw - 16px); max-height: calc(100vh - 32px); overflow: auto; }
.crm-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.crm-title { margin: 0; flex: 1; font-size: calc(var(--ui-fs) * 18 / 13); font-weight: 600; color: var(--text-strong); }
.crm-x { background: none; border: 0; color: var(--text-dim); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.crm-x:hover { background: var(--hover); color: var(--text); }
.crm-x:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }
.crm-group { margin: 14px 0 6px; font-size: calc(var(--ui-fs) * 11 / 13); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.crm-calm, .crm-more { margin: 0; color: var(--text-dim); line-height: 1.5; }

.crm-alerts { display: flex; flex-direction: column; gap: 8px; }
.crm-alert { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--rule); border-left: 4px solid var(--text-muted); border-radius: 6px; }
.crm-alert.refused { border-left-color: var(--attn); }
.crm-alert.urgent { border-left-color: var(--attn); background: color-mix(in srgb, var(--attn) 8%, transparent); }
.crm-alert.big { padding: 18px 18px; border-left-width: 8px; }
.crm-main { flex: 1 1 0; min-width: 0; }
.crm-atitle { margin: 0; font-size: calc(var(--ui-fs) * 14 / 13); font-weight: 600; color: var(--text-strong); }
.crm-alert.big .crm-atitle { font-size: calc(var(--ui-fs) * 22 / 13); }
.crm-atext { margin-top: 2px; color: var(--text); overflow-wrap: anywhere; }
.crm-alert.big .crm-atext { font-size: calc(var(--ui-fs) * 16 / 13); }
.crm-when { margin-top: 2px; color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.crm-go { white-space: nowrap; }
.crm-alert.big .crm-go { min-height: 44px; padding: 0 18px; }

/* calm (#0000-2385): fixed columns, the tiles of a row equally high (grid stretches them), the button always at the bottom of its tile
   (margin-top: auto), one line and one width for every button, the state in one size, groups indented alike */
.crm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.crm-tilegroup { grid-column: 1 / -1; margin: 8px 0 0; }
.crm-tilegroup:first-child { margin-top: 0; }
.crm-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--rule); border-radius: 6px; }
.crm-tile.on:not(.calm) { border-left: 4px solid var(--attn); }
.crm-ttitle { font-weight: 600; color: var(--text-strong); }
.crm-state { font-size: calc(var(--ui-fs) * 16 / 13); line-height: 1.3; }
.crm-thint { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); margin-bottom: 8px; }
.crm-sw { min-height: 44px; margin-top: auto; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-sw.armed { border-color: var(--attn); }

@media (max-width: 600px) {
  .crm-alert { flex-direction: column; align-items: stretch; }
  .crm-go { min-height: 44px; }
}
@media (max-width: 640px) { .crm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .crm-tiles { grid-template-columns: 1fr; } }

/* ticket lanes (#0000-2497): the length of a pause is picked in the tile, above the button */
.crm-lanepick { min-height: 36px; margin-bottom: 8px; max-width: 100%; }

/* a screen in the work area (#0000-2938): the full width, as many tiles in a row as fit, no scrolling inside a window */
.scr-tab .crm-tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.scr-tab .crm-alerts, .scr-tab .crm-group { max-width: 70em; }
.scr-tab .crm-title { flex: 0 1 auto; }
body.mob .scr-phone .crm-tiles { grid-template-columns: 1fr; }          /* the phone view: the tiles under each other */
