/* Shared Work Queue navigation — matches escalation-work-queue sidebar chrome */

.approval-card.approval-queue-card,
.ewq-nav-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border, #d9d9d9);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.06);
  overflow: hidden;
}

.approval-card.approval-queue-card::before,
.ewq-nav-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #e92a2c, #a71f23);
  pointer-events: none;
}

.approval-card.approval-queue-card .card-head,
.ewq-nav-card .card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #f4f4f4;
}

.approval-card.approval-queue-card .card-head .section-title::before,
.ewq-nav-card .card-head .section-title::before {
  display: none;
}

.approval-card.approval-queue-card .card-head .jr-stripe,
.ewq-nav-card .card-head .jr-stripe {
  display: inline-block;
  width: 5px;
  height: 18px;
  margin-right: 4px;
  background: linear-gradient(135deg, #e92a2c, #a71f23);
  transform: skewX(-26deg);
  flex-shrink: 0;
}

.approval-card.approval-queue-card .card-head .section-title,
.ewq-nav-card .card-head .section-title {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #404040;
  margin: 0;
  flex: 1;
}

.approval-card.approval-queue-card .queue-count,
.ewq-nav-card .queue-count {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  background: #202020;
  color: #fff;
  min-width: 28px;
  text-align: center;
}

.approval-card.approval-queue-card .queue-count.urgent,
.ewq-nav-card .queue-count.urgent {
  background: #a71f23;
}

.queue-view-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #fafafa;
}

.queue-view-label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #404040;
}

.queue-view-meta,
.queue-view-settings {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
}

.queue-view-settings:hover { color: #e92a2c; }

.ewq-nav-hint {
  font-size: 11px;
  color: #666;
  line-height: 1.45;
  margin: 6px 0 0;
}

.ewq-nav-hint a { color: #a71f23; text-decoration: none; font-weight: 600; }
.ewq-nav-hint a:hover { text-decoration: underline; }

.ewq-nav-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ewq-btn-ghost {
  background: #fff;
  border: 1px solid var(--border, #d9d9d9);
  color: #404040;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}

.ewq-btn-ghost:hover { border-color: #e92a2c; color: #a71f23; }

.scope-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #fff;
}

.scope-tab {
  min-width: 0;
  padding: 10px 6px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: "Arial Black", Arial, Helvetica, sans-serif !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  cursor: pointer;
  text-align: center;
}

.scope-tab:hover { color: #202020; }
.scope-tab.active { color: #202020; border-bottom-color: #202020; }
.scope-tab .tab-n { font-size: 9px; opacity: 0.85; margin-left: 3px; }

.status-tabs {
  display: grid;
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #fff;
}

#pm-settings-ewq-status-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.status-tabs--secondary .status-tab {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #888;
  padding: 8px 4px;
}

.status-tabs--secondary .status-tab.active {
  color: #202020;
  border-bottom-color: #e92a2c;
}

.status-tabs--done {
  display: flex;
  justify-content: center;
  border-bottom: none;
  background: #fafafa;
}

.status-tabs--done .status-tab {
  flex: 0 0 auto;
  min-width: 120px;
  font-size: 9px;
  color: #888;
  padding: 6px 12px;
}

.status-tab {
  min-width: 0;
  padding: 9px 4px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-family: "Arial Black", Arial, Helvetica, sans-serif !important;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #666;
  border-bottom: 2px solid transparent;
}

.status-tab:hover { color: #202020; }
.status-tab.active { color: #202020; border-bottom-color: #e92a2c; }
.status-tab .tab-n { font-size: 9px; opacity: 0.85; margin-left: 3px; }

.ewq-nav-sub-wrap {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #fff;
}

.queue-sub-section { margin-bottom: 12px; }
.queue-sub-section:last-child { margin-bottom: 0; }

.queue-sub-section-title {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
  font-weight: 800;
}

.queue-sub-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.queue-sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border, #d9d9d9);
  background: #f4f4f4;
  font-size: 10px;
  cursor: pointer;
  user-select: none;
}

.queue-sub-chip.is-on {
  background: rgba(233, 42, 44, 0.08);
  border-color: #e92a2c;
  color: #a71f23;
  font-weight: 700;
}

.queue-sub-chip input { margin: 0; pointer-events: none; }

.ewq-nav-footer {
  padding: 12px 16px 16px;
  background: #fafafa;
  border-top: 1px solid var(--border, #d9d9d9);
}

.ewq-nav-footer .queue-sub-section:last-child { margin-bottom: 0; }

.ewq-nav-footer .pm-settings-row { border-bottom: none; padding: 8px 0; }
.ewq-nav-footer .pm-settings-row:first-child { padding-top: 0; }

@media (max-width: 720px) {
  .scope-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ewq-status-tabs,
  #pm-settings-ewq-status-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #pm-settings-ewq-status-tabs .status-tab { font-size: 8px; letter-spacing: 0.06em; }
}

/* ── Queue list rows (shared: escalation work queue, CS customer desk) ── */
.queue-list {
  max-height: calc(100vh - 320px);
  overflow: auto;
}

.queue-item-wrap {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border, #d9d9d9);
  background: #fff;
}

.queue-item-wrap.needs-ack {
  background: rgba(186, 117, 23, 0.08);
}

.queue-item-wrap.active {
  background: rgba(233, 42, 44, 0.06);
  box-shadow: inset 3px 0 0 #e92a2c;
}

.queue-item-wrap.active.needs-ack {
  background: rgba(233, 42, 44, 0.1);
}

.queue-item-check {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding: 14px 0 14px 12px;
}

.queue-item-check input {
  width: 14px;
  height: 14px;
  accent-color: #e92a2c;
  cursor: pointer;
  margin-top: 2px;
}

.queue-item-check input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.queue-item {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 11px 14px 11px 6px;
  border: none;
  border-bottom: none;
  background: transparent;
  cursor: pointer;
  color: #202020;
  text-decoration: none;
  transition: background 0.12s;
}

button.queue-item {
  font: inherit;
}

.queue-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.queue-item-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.queue-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #d9d9d9);
  background: #f4f4f4;
  color: #404040;
}

.queue-item-icon svg {
  display: block;
}

.queue-item-icon.sev-red {
  background: rgba(233, 42, 44, 0.1);
  border-color: rgba(233, 42, 44, 0.25);
  color: #a71f23;
}

.queue-item-icon.sev-yellow {
  background: rgba(186, 117, 23, 0.12);
  border-color: rgba(186, 117, 23, 0.28);
  color: #ba7517;
}

.queue-item-icon.sev-green {
  background: rgba(31, 77, 15, 0.08);
  border-color: rgba(31, 77, 15, 0.22);
  color: #1f4d0f;
}

.queue-item-body {
  flex: 1;
  min-width: 0;
}

.queue-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}

.queue-title-lead {
  min-width: 0;
  flex: 1;
}

.queue-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.queue-item-sub {
  font-size: 11px;
  line-height: 1.3;
  color: #666;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #666;
  letter-spacing: 0.02em;
}

.queue-age {
  font-weight: 700;
  color: #202020;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

.queue-age.age-warn {
  color: #ba7517;
}

.queue-age.age-hot {
  color: #a71f23;
}

.status-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.s-open {
  background: rgba(186, 117, 23, 0.12);
  color: #ba7517;
  border-color: #e8d4b8;
}

.status-badge.s-escalated {
  background: rgba(233, 42, 44, 0.1);
  color: #a71f23;
  border-color: #f0c9ca;
}

.status-badge.s-acknowledged {
  background: rgba(64, 64, 64, 0.08);
  color: #404040;
  border-color: #ddd;
}

.pri-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  font-weight: 700;
}

.pri-badge.p-red {
  background: rgba(233, 42, 44, 0.1);
  color: #a71f23;
  border: 1px solid #f0c9ca;
}

.pri-badge.p-yellow {
  background: rgba(186, 117, 23, 0.12);
  color: #ba7517;
  border: 1px solid #e8d4b8;
}

.pri-badge.p-green {
  background: rgba(31, 77, 15, 0.08);
  color: #1f4d0f;
  border: 1px solid #c2d7ba;
}

.ticket-id-ref {
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.25px;
  color: #999;
  white-space: nowrap;
}

/* ── Compact single-row layout (full-width action queue / CS desk) ── */
.queue-list--compact {
  container-type: inline-size;
}

.queue-list--compact .queue-item-wrap {
  align-items: center;
}

.queue-list--compact .queue-item-check {
  padding: 8px 0 8px 10px;
  align-items: center;
}

.queue-list--compact .queue-item {
  padding: 8px 14px 8px 4px;
}

.queue-list--compact .queue-item-inner {
  align-items: center;
}

.queue-list--compact .queue-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.queue-list--compact .queue-item-body {
  display: flex;
  align-items: center;
  min-width: 0;
}

.queue-list--compact .queue-item-line {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.queue-list--compact .queue-title-text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.queue-list--compact .queue-item-sub {
  flex: 0 0 auto;
  max-width: 5.5rem;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-list--compact .queue-meta {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin: 0;
  gap: 6px;
  min-width: 0;
}

.queue-list--compact .queue-meta-owner {
  max-width: 7.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-list--compact .ticket-id-ref {
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}

.queue-list--compact .queue-age {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 8px;
}

@container (max-width: 640px) {
  .queue-list--compact .queue-item-line {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .queue-list--compact .queue-item-sub {
    flex: 1 1 100%;
    order: 3;
  }

  .queue-list--compact .queue-meta {
    flex: 1 1 auto;
    order: 4;
  }

  .queue-list--compact .queue-age {
    order: 2;
    margin-left: auto;
    padding-left: 0;
  }
}
