/* The task inspector: a panel at the right edge in a wide window, a page when
   docked. The dialogs for adding, moving and deleting share base.css. */

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.grow { flex: 1; }

.insp { background: var(--surface); color: var(--ink); display: flex; flex-direction: column; min-height: 0; outline: none; }
#inspector:not(.insp-page) {
  position: fixed; z-index: 45; top: var(--insp-top, 0px); right: 0; bottom: 0; width: clamp(340px, 26vw, 430px);
  border-left: 1px solid var(--line); box-shadow: -8px 0 28px rgba(14, 27, 61, .14);
}
.insp-head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--line-soft); flex: none; }
.insp-hicon { flex: none; display: inline-flex; }
.insp-htitle { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.change-icon-head { flex: none; height: 30px; color: var(--blue-strong); }
.insp-kicker { font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.insp-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.insp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px 20px; display: grid; align-content: start; gap: 14px; }
.insp-foot { display: flex; align-items: center; gap: 10px; flex: none; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.insp-foot .btn-primary { min-width: 150px; }
.dirty-note { flex: 1; order: 3; text-align: right; color: var(--st-amber-text); font-size: 13px; font-weight: 600; }
.dirty-note[hidden] { display: none; }

.banner { padding: 10px 12px; border-radius: 9px; font-size: 14px; line-height: 1.4; border: 1px solid var(--line); }
.banner-info { background: var(--surface-2); color: var(--ink-2); }
.banner-warn { background: var(--st-amber-tint); border-color: transparent; color: var(--st-amber-text); }

.insp-titlerow { display: flex; align-items: center; gap: 10px; }
.insp-icon { flex: none; }
.insp-title-input { flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 18px; font-weight: 600; }
.change-icon { justify-self: start; margin-top: 8px; }
.f-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.created-row { display: flex; align-items: center; gap: 10px; }
.created-row .who-lines b { font-size: 16px; }
.created-upd { color: var(--ink-2); font-size: 14px; display: inline-flex; gap: 8px; }

.f-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 14px 14px; }
.f-wrap { min-width: 0; }
.f-input { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 9px 12px; min-height: 42px; }
textarea.f-input { resize: vertical; line-height: 1.45; }
.status-wrap { position: relative; }
.status-field { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 15.5px; font-weight: 600; text-align: left; }
.status-field .sf-text { flex: 1; }
.status-field:hover:not([disabled]) { border-color: var(--blue); }
.menu-status { top: calc(100% + 6px); left: 0; min-width: 220px; z-index: 60; }
.status-option .mi-name { font-weight: 500; }
.menu-more { top: calc(100% + 6px); right: 0; left: auto; min-width: 240px; z-index: 60; }
.menu-danger { color: var(--st-red-text); }
.menu-rule { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.more-wrap { position: relative; }

.pct-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pct-row .check { font-size: 14.5px; gap: 7px; }
.pct-box { display: inline-flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; }
.pct-box input { width: 52px; -moz-appearance: textfield; height: 100%; border: 0; padding: 0 10px; background: transparent; text-align: left; font-size: 15.5px; }
.pct-box input::-webkit-outer-spin-button, .pct-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pct-box b { display: grid; place-items: center; width: 34px; height: 100%; background: var(--surface-2); border-left: 1px solid var(--line); font-weight: 500; color: var(--ink-2); }
.pct-box.is-off { background: var(--surface-2); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.check-flag { padding: 2px 0; }

.due-field { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; color: var(--ink-2); }
.due-field:hover { border-color: var(--blue); }
.due-field .due-text { flex: 1; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-field.is-empty .due-text { color: var(--muted); }
.due-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.due-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.select-field { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); }
.select-field select { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 40px 0 40px; border: 0; background: transparent; appearance: none; font-size: 15.5px; color: var(--ink); cursor: pointer; }
.select-field .li:last-child { margin-left: auto; }
.sel-flag { color: var(--st-red); display: inline-flex; z-index: 1; pointer-events: none; }
.select-field .li { pointer-events: none; z-index: 1; }
.select-field:focus-within, .pct-box:focus-within, .status-field:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.insp-sec { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.insp-sec h3 { font-size: 17px; font-weight: 700; }
.link-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--blue-strong); font-size: 15.5px; }
.link-btn:hover { border-color: var(--blue); background: var(--blue-wash); }
.linked-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.lk-text { flex: 1; display: grid; }
.lk-text small { color: var(--muted); }
.sub-list { display: grid; }
.sub-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; border-radius: 8px; color: var(--ink); }
.sub-row:hover { background: var(--surface-2); }
.sub-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-pct { color: var(--ink-2); font-size: 14px; }
.sub-none { text-align: center; color: var(--ink-2); padding: 4px 0; }
.sub-block { color: var(--muted); text-align: center; }
.add-sub { justify-self: center; color: var(--blue-strong); border-color: var(--blue); }
.act-list { display: grid; gap: 10px; }
.act-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.act-what { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.act-note { color: var(--muted); }
.avatar-source { background: var(--surface-3); color: var(--ink-2); }

/* the task as a page, docked */
.insp-page { gap: 0; }
.insp-page .back-row { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; border-bottom: 1px solid var(--line-soft); }
.back-btn { font-size: 20px; padding: 0 6px; gap: 10px; }
.back-btn b { font-weight: 700; color: var(--ink); }
.trail { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 14px 4px; color: var(--ink-2); font-size: 16px; }
.trail a { color: var(--blue-strong); }
.insp-page .insp-body { overflow: visible; padding: 4px 4px 24px; }
.insp-page .insp-foot { position: sticky; bottom: 0; margin: 0 -12px; padding: 12px; }
.insp-page .insp-foot .btn-primary { flex: 1; }
.insp-page .menu-more { right: 0; }

/* dialogs for tasks */
.dlg-copy { color: var(--ink-2); margin: 0 0 14px; line-height: 1.45; }
.muted-note { color: var(--muted); margin: 0 0 14px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.seg-wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 16px; }
.btn-danger-solid { background: var(--st-red); border-color: var(--st-red); color: #fff; }
.btn-danger-solid:hover { filter: brightness(.92); background: var(--st-red); }

.insp-top-page { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.insp-top-page .insp-icon { justify-self: center; display: inline-flex; }
.insp-top-page .insp-title-input { font-size: 18px; height: 48px; }
.insp-top-page .change-icon { margin: 0; justify-self: stretch; }
.insp-top-page .created { grid-column: 2; min-width: 0; }
.insp-top-page .created .f-label { margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.insp-top-page .created-row { flex-wrap: wrap; gap: 4px 10px; }
.insp-top-page.no-icon .insp-title-input { grid-column: 1 / -1; }
.insp-top-page.no-icon .created { grid-column: 1 / -1; }
.insp-top-page.no-icon .change-icon { justify-self: start; }
@container page (max-width: 330px) {
  .f-grid { grid-template-columns: minmax(0, 1fr); }
}

/* icon picker */
.iconpick { display: grid; gap: 10px; }
.ip-drop { display: grid; justify-items: center; gap: 8px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--surface-2); text-align: center; }
.ip-drop.is-over { border-color: var(--blue); background: var(--blue-wash); }
.ip-drop.is-busy { opacity: .7; }
.ip-drop-text { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ip-drop small { color: var(--muted); }
.ip-upload { cursor: pointer; }
.ip-upload:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.ip-h { font-size: 14px; font-weight: 650; color: var(--ink-2); margin-top: 4px; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ip-cell { display: grid; place-items: center; aspect-ratio: 1; min-height: 48px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); }
.ip-item { position: relative; display: block; }
.ip-item .ip-cell { width: 100%; }
.ip-del { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2); opacity: 0; box-shadow: var(--shadow); }
.ip-item:hover .ip-del, .ip-item:focus-within .ip-del, .ip-del:focus-visible { opacity: 1; }
.ip-del:hover { color: var(--st-red-text); border-color: var(--st-red); }
@media (hover: none) { .ip-del { opacity: 1; } }
.ip-cell:hover { border-color: var(--blue); color: var(--ink); }
.ip-cell.is-current { border: 2px solid var(--blue); }
.ip-remove { justify-self: start; color: var(--st-red-text); }
.ip-inline { padding: 12px; margin: -6px 0 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); max-height: 340px; overflow: auto; }
.icon-row { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ir-label { flex: 1; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.ir-label small { font-weight: 400; color: var(--muted); }
.icon-note { margin: 0 0 14px; }
.iconpick .form-error { min-height: 0; margin: 0; }
.iconpick .form-error:empty { display: none; }
.page:has(> .insp-page) { padding-bottom: 0 !important; }
.insp-page .insp-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }

/* the moderator's board menu, at the right end of the tab row */
.hdr-row2 .board-menu { margin-left: 8px; }
.menu-board { right: 0; left: auto; top: calc(100% + 6px); min-width: 300px; z-index: 60; }
.menu-board .mi-name { display: grid; gap: 1px; flex: 1; }
.menu-board .mi-name small { color: var(--muted); font-size: 12px; }
.menu-board .mi-tick { color: var(--blue); }
.banner-archived { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
