/* @region feature-bug-sla — SLA badges, the bug detail row, the targets panel and the dashboard widget */
.ft-bug-sla-muted { font-size: 13px; color: var(--muted); }

/* Badge: text always says the state; colour only repeats it. */
.ft-bug-sla-badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 12px; line-height: 18px; white-space: nowrap; color: var(--muted); background: var(--panel); }
.ft-bug-sla-badge > span { overflow: hidden; text-overflow: ellipsis; }
.ft-bug-sla-badge.is-at_risk { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); font-weight: 600; }
.ft-bug-sla-badge.is-breached { color: var(--red); border-color: var(--red); background: var(--red-soft); font-weight: 600; }
.ft-bug-sla-badge > svg { flex: 0 0 auto; }

/* Bug details: two lines, Response and Resolve. */
.ft-bug-sla-detail { display: grid; gap: 6px; min-width: 0; white-space: normal; text-align: left; }
.ft-bug-sla-line { display: grid; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.ft-bug-sla-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ft-bug-sla-clock { color: var(--muted); }
.ft-bug-sla-text { min-width: 0; overflow-wrap: anywhere; }
.ft-bug-sla-state { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--muted); }
.ft-bug-sla-state.is-at_risk { color: var(--amber); }
.ft-bug-sla-state.is-breached { color: var(--red); }
.ft-bug-sla-state.is-met { color: var(--green); }
.ft-bug-sla-detail.is-phone { justify-items: stretch; }

/* Settings → Organization → Bug SLA targets */
.ft-bug-sla-panel { display: grid; gap: 14px; min-width: 0; }
.ft-bug-sla-top { display: flex; align-items: flex-start; gap: 10px; }
.ft-bug-sla-pro { flex: 0 0 auto; padding: 1px 8px; border: 1px solid var(--accent); border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
  letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); }
.ft-bug-sla-help { margin: 0; }
.ft-bug-sla-ro { display: flex; align-items: center; gap: 6px; margin: 0; }
.ft-bug-sla-scope-row { max-width: 360px; }
.ft-bug-sla-scope { width: 100%; }
.ft-bug-sla-table { width: 100%; min-width: 0; border-collapse: collapse; }
.ft-bug-sla-table th, .ft-bug-sla-table td { background: transparent; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; font-size: 13px; }
.ft-bug-sla-table thead th { font-weight: 600; color: var(--muted); }
.ft-bug-sla-table tbody th { font-weight: 600; color: var(--text); }
.ft-bug-sla-table .ft-bug-sla-on { width: 64px; text-align: right; padding-right: 0; }
.ft-bug-sla-hours { display: inline-flex; align-items: center; gap: 6px; }
.ft-bug-sla-input { width: 84px; min-height: 36px; text-align: right; }
.ft-bug-sla-hours.has-error .ft-bug-sla-input { border-color: var(--red); }
.ft-bug-sla-unit { font-size: 13px; color: var(--muted); }
.ft-bug-sla-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ft-bug-sla-status { min-height: 20px; font-size: 13px; color: var(--muted); }
.ft-bug-sla-error { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--red); }
.ft-bug-sla-error > svg { flex: 0 0 auto; margin-top: 2px; }
.ft-bug-sla-actions { display: flex; gap: 8px; margin-left: auto; }

/* Dashboard widget */
.ft-bug-sla-widget { display: grid; gap: 10px; min-width: 0; }
.ft-bug-sla-wline { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text); }
.ft-bug-sla-wline.is-breached { color: var(--red); }
.ft-bug-sla-wline.is-at_risk { color: var(--amber); }
.ft-bug-sla-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-bug-sla-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: var(--panel); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.ft-bug-sla-chip.is-breached { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.ft-bug-sla-chip.is-at_risk { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.ft-bug-sla-chip:focus-visible, .ft-bug-sla-wrow:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.ft-bug-sla-wlist { margin: 0; padding: 0; list-style: none; }
.ft-bug-sla-wrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--border-soft);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ft-bug-sla-wmain { display: grid; flex: 1 1 auto; min-width: 0; }
.ft-bug-sla-wtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.ft-bug-sla-key { font-weight: 600; color: var(--muted); }
.ft-bug-sla-rate { margin: 0; }
.ft-bug-sla-more { justify-self: start; }

@media (max-width: 900px) {
  .ft-bug-sla-scope-row { max-width: none; }
  .ft-bug-sla-top { flex-direction: column; gap: 6px; }
  .ft-bug-sla-sections { display: grid; gap: 10px; }
  .ft-bug-sla-sev-fields { display: grid; gap: 10px; }
  .ft-bug-sla-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
  .ft-bug-sla-field-label { font-size: 14px; color: var(--text); }
  .ft-bug-sla-input { width: 96px; min-height: 44px; font-size: 16px; }
  .ft-bug-sla-panel.has-bar { padding-bottom: 72px; }
  .ft-bug-sla-mbar { z-index: 80; }
  .ft-bug-sla-wrow { min-height: 52px; }
}
/* @endregion feature-bug-sla */
