/* ACARiS Annotation Workbench — areas page (0.9.0).
   Builds on aw-detect.css, which is loaded first and carries the shell, the
   stage, the boxes and their handles, buttons and modals. */

.awa .awa-dim { color: var(--aw-dim); }
.awa .awa-small { font-size: 12px; }
.awa h4 { margin: 0 0 8px; font-size: 13px; }
.awa-camname { font-weight: 600; color: var(--aw-accent); }
.awa-msg {
  margin: 0; padding: 6px 12px; font-size: 13px;
  background: #3a2020; color: #ffb4b4; border-bottom: 1px solid var(--aw-line);
}
.awa-msg[data-kind="ok"] { background: #1d3325; color: #9be7b8; }
.awa-msg[data-kind="info"] { background: #23303f; color: #b5d7ff; }

/* ---- list ---- */
.awa-list { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.awa-listbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border-bottom: 1px solid var(--aw-line); background: #181b20;
}
.awa-listbody { flex: 1; display: flex; gap: 0; min-height: 0; overflow: hidden; }
.awa-listbody > .awa-table, .awa-listbody > .awa-empty { flex: 1; }
.awa-listbody { overflow-y: auto; align-items: flex-start; }
.awa-table { border-collapse: collapse; font-size: 13px; flex: 1; user-select: text; }
.awa-table th {
  text-align: left; font-weight: 600; color: var(--aw-dim); font-size: 12px;
  padding: 6px 10px; border-bottom: 1px solid var(--aw-line); position: sticky; top: 0; background: var(--aw-bg);
}
.awa-table td { padding: 5px 10px; border-bottom: 1px solid #23272e; white-space: nowrap; }
.awa-table tr:hover td { background: #1b1f25; }
.awa-num { text-align: right; }
.awa-table .awa-cam { font-weight: 600; }
.awa-st { font-size: 12px; padding: 1px 7px; border-radius: 10px; background: #23272e; color: var(--aw-dim); }
.awa-st-open { background: #23303f; color: #b5d7ff; }
.awa-st-mine { background: #2b3a1f; color: #c6ef9b; }
.awa-st-checked_out { background: #3a3220; color: #ffd98a; }
.awa-st-done { background: #1d3325; color: #9be7b8; }
.awa-st-arriving { background: #2d2440; color: #d4c2ff; }
.awa-empty { padding: 20px; color: var(--aw-dim); }

.awa-request {
  flex: 0 0 290px; padding: 12px; border-left: 1px solid var(--aw-line);
  background: var(--aw-panel); align-self: stretch; overflow-y: auto; user-select: text;
}
.awa-request form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; align-items: end; }
.awa-request label { display: flex; flex-direction: column; font-size: 12px; color: var(--aw-dim); gap: 2px; }
.awa-request .aw-input { width: 100%; box-sizing: border-box; }
.awa-request form button { grid-column: 1 / -1; justify-content: center; }
.awa-request .awa-msg { margin: 6px 0; border-radius: 4px; border: 0; }
.awa-reqs { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.awa-reqs li { padding: 6px 0; border-bottom: 1px solid var(--aw-line); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.awa-reqs .awa-req-cam { font-weight: 600; }
.awa-reqs .awa-req-note { flex-basis: 100%; color: var(--aw-dim); }
.awa-reqs .aw-btn { padding: 1px 8px; font-size: 12px; }
.awa-rs-open, .awa-rs-pulling { color: #ffd98a; }
.awa-rs-ready { color: #9be7b8; }
.awa-rs-failed, .awa-rs-stalled { color: #ffb4b4; }
.awa-rs-cancelled { color: var(--aw-dim); }

/* ---- one camera ---- */
.awa-cam { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.awa-cambar, .awa-steps {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-bottom: 1px solid var(--aw-line); background: #181b20; flex-wrap: wrap;
}
.awa-cambar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.awa-segs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.awa-seg {
  border: 1px solid var(--aw-line); background: #23272e; color: var(--aw-text);
  border-radius: 5px; padding: 3px 9px; font-size: 12px; cursor: pointer;
}
.awa-seg.aw-on { border-color: var(--aw-accent); background: #223047; }
.awa-seg .awa-ok { color: #9be7b8; }
.awa-seg .awa-todo { color: #ffd98a; }
.awa-seg-join { padding: 1px 6px; font-size: 11px; }
.awa-steps .aw-mode { border: 1px solid var(--aw-line); border-radius: 5px; padding: 3px 10px; }
.awa-steps .aw-mode.aw-on { background: var(--aw-accent); color: #08111f; }
.awa-stephint { color: var(--aw-dim); font-size: 12px; }

.awa-editor { flex: 1; display: flex; min-height: 0; }
.awa-editor .aw-stagewrap { min-height: 0; }
.awa-edmode { margin-left: auto; font-size: 12px; color: #ffd98a; }
.awa-strip { border-top: 1px solid var(--aw-line); padding: 4px 8px; background: #181b20; }
.awa-strip-row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.awa-strip-row img {
  height: 54px; border: 2px solid transparent; border-radius: 3px; cursor: pointer; opacity: .8;
}
.awa-strip-row img:hover { opacity: 1; }
.awa-strip-row img.aw-on { border-color: var(--aw-accent); opacity: 1; }

/* ---- grid ---- */
.awa-gridwrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.awa-gridbar {
  display: flex; align-items: center; gap: 14px; padding: 5px 12px; font-size: 12px;
  border-bottom: 1px solid var(--aw-line);
}
.awa-gridbar > span:first-child { flex: 1; }
.awa-grid {
  flex: 1; overflow-y: auto; padding: 10px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-content: start;
}
.awa-tile {
  position: relative; background: #0d0f12; border: 2px solid transparent; border-radius: 5px;
  cursor: pointer; outline: none;
}
.awa-tile.awa-focus { border-color: var(--aw-accent); }
.awa-tile-img { position: relative; line-height: 0; }
.awa-tile-img img { width: 100%; display: block; border-radius: 3px 3px 0 0; }
.awa-tbox {
  position: absolute; box-sizing: border-box; border: 2px solid var(--bc, #e8590c);
  background: color-mix(in srgb, var(--bc, #e8590c) 14%, transparent); cursor: not-allowed;
}
.awa-tbox:hover { background: rgba(255, 60, 60, .35); border-color: #ff5a5a; }
.awa-tile-foot {
  display: flex; gap: 6px; align-items: center; padding: 3px 6px; font-size: 11px;
  color: var(--aw-dim); line-height: 1.5; flex-wrap: wrap;
}
.awa-tile-foot .awa-when { flex: 1; }
.awa-badge { padding: 0 5px; border-radius: 3px; font-size: 10px; background: #2b2f37; color: var(--aw-dim); }
.awa-b-night { background: #2d2440; color: #d4c2ff; }
.awa-b-moved { background: #4a2a1a; color: #ffc9a3; }
.awa-b-none { background: #23303f; color: #b5d7ff; }
.awa-b-edit { background: #2b3a1f; color: #c6ef9b; }
.awa-b-fail, .awa-b-pending { background: #3a2020; color: #ffb4b4; }
.awa-b-dup { background: #3a3220; color: #ffd98a; }
.awa-b-ref { background: var(--aw-accent); color: #08111f; }
.awa-tile.awa-dropped .awa-tile-img::after {
  content: attr(data-drop); position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(40, 10, 10, .7); color: #ffb4b4; font-size: 13px; line-height: 1.3;
  border-radius: 3px 3px 0 0; text-align: center; padding: 0 8px;
}
.awa-tile.awa-earlier { opacity: .45; cursor: default; }
.awa-tile.awa-earlier .awa-tbox { cursor: default; }
.awa-tile-split {
  position: absolute; right: 4px; top: 4px; z-index: 2; display: none;
  font-size: 11px; padding: 2px 7px;
}
.awa-tile:hover .awa-tile-split, .awa-tile.awa-focus .awa-tile-split { display: inline-flex; }
.awa-fovmark {
  grid-column: 1 / -1; border-top: 2px dashed #d9480f; color: #ffc9a3; font-size: 12px; padding-top: 2px;
}

.awa-reasons { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.awa-reasons .aw-btn { justify-content: flex-start; }
.awa-helpcard { max-width: 640px; }
