/* My tickets list on /account. Scoped so hub pages keep their own card chrome. */

#hector-help-tickets {
  scroll-margin-top: calc(var(--header-h, 64px) + 12px);
}

.hector-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-row {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ticket-row-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "id status"
    "title title"
    "meta meta";
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.ticket-row-summary::-webkit-details-marker { display: none; }
.ticket-row-summary::marker { content: ""; }

.ticket-row[open] .ticket-row-summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.ticket-id {
  grid-area: id;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.ticket-title-cell {
  grid-area: title;
  font-size: 14px;
  font-weight: 550;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-meta-cell {
  grid-area: meta;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-pill {
  grid-area: status;
  justify-self: end;
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 70%, var(--text));
}

.status-pill[data-status="In Progress"],
.status-pill[data-status="Completed"] {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: color-mix(in srgb, var(--success) 60%, var(--text));
}

.status-pill[data-status="Waiting"] {
  background: color-mix(in srgb, var(--warning) 20%, transparent);
  color: color-mix(in srgb, var(--warning) 40%, var(--text));
}

.status-pill[data-status="Closed"] {
  background: var(--bg-pressed);
  color: var(--text);
}

.ticket-detail {
  padding: 16px 18px 20px;
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  margin: 0 0 18px;
}

.detail-grid dt {
  color: var(--text-muted);
  font-weight: 550;
}

.detail-grid dd {
  margin: 0;
}

.detail-grid dd.ticket-description {
  white-space: pre-wrap;
}

.detail-section { margin-top: 16px; }

.detail-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 12px 16px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline li:last-child { padding-bottom: 0; }

.timeline-label { font-weight: 600; }

.timeline-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-item {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.note-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.note-body {
  margin: 0;
  white-space: pre-wrap;
}

.attachments-stub {
  color: var(--text-muted);
  font-style: italic;
}

#hector-help-tickets .empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem 0 0.25rem;
  margin: 0;
}
