/* ── Trackings card — style Parcel ──────────────────────────── */

/* ── Tabs ── */
.trk-tabs {
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}
.trk-tab {
  all: unset;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  color: var(--muted);
  transition: all 0.15s;
  font-family: var(--mono);
}
.trk-tab:hover { color: var(--text); }
.trk-tab.trk-tab-active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
[data-theme="retro"] .trk-tab.trk-tab-active {
  background: rgba(220,201,169,0.12);
  color: var(--cream, #DCC9A9);
}

/* ── Boutons d'action ── */
.trk-actions {
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.trk-row:hover .trk-actions { opacity: 1; }
.trk-btn {
  all: unset;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background 0.15s, color 0.15s;
}
.trk-btn-archive { color: var(--muted); }
.trk-btn-archive:hover { background: rgba(59,130,246,0.15); color: #60a5fa; }
.trk-btn-delete  { color: var(--muted); }
.trk-btn-delete:hover  { background: rgba(255,75,92,0.15);  color: var(--danger); }

/* ── Ligne archivée ── */
.trk-row.trk-archived .trk-name { opacity: 0.4; }

.trk-list {
  display: flex;
  flex-direction: column;
}

.trk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: default;
}
.trk-row:hover { background: rgba(255,255,255,0.03); }
.trk-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.04); }

/* ── Indicateur coloré gauche ── */
.trk-indicator {
  width: 3px;
  border-radius: 999px;
  align-self: stretch;
  flex-shrink: 0;
  min-height: 32px;
}
.trk-ind-transit     { background: #3b82f6; }
.trk-ind-pickup      { background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.45); }
.trk-ind-delivered   { background: var(--success); }
.trk-ind-exception   { background: var(--danger);  box-shadow: 0 0 8px rgba(255,75,92,0.4); }
.trk-ind-pending,
.trk-ind-notfound,
.trk-ind-expired     { background: rgba(255,255,255,0.12); }

/* ── Corps ── */
.trk-body {
  flex: 1;
  min-width: 0;
}
.trk-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.trk-delivered .trk-name {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}
.trk-event {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.3;
}

/* ── Partie droite ── */
.trk-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.trk-carrier {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.6;
}
.trk-age {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Badge statut ── */
.trk-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.trk-badge-transit     { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.trk-badge-pickup      { background: rgba(249,115,22,0.18);  color: #fb923c; }
.trk-badge-delivered   { background: rgba(58,210,159,0.12);  color: var(--success); }
.trk-badge-exception   { background: rgba(255,75,92,0.15);   color: var(--danger); }
.trk-badge-pending,
.trk-badge-notfound,
.trk-badge-expired     { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ── Pill header ── */
.trk-pill-active {
  background: rgba(249,115,22,0.2) !important;
  border-color: rgba(249,115,22,0.4) !important;
  color: #fb923c !important;
}

/* ── État vide ── */
.trk-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 4px;
  text-align: center;
}

/* ── Thème retro ── */
[data-theme="retro"] .trk-row:hover        { background: rgba(220,201,169,0.04); }
[data-theme="retro"] .trk-row:not(:last-child) { border-color: rgba(220,201,169,0.06); }
[data-theme="retro"] .trk-badge-transit    { background: rgba(59,130,246,0.12); }
[data-theme="retro"] .trk-badge-pickup     { background: rgba(249,115,22,0.14); }
