/* Incident Portal extras on top of supplier_portal.css (shared tsp-* shell). */

.tsp-field textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--tsp-line);
  border-radius: var(--tsp-radius-sm);
  padding: 10px 12px;
  font-size: var(--tsp-text-sm);
  font-family: var(--tsp-font);
  background: var(--tsp-input);
  color: var(--tsp-ink);
  resize: vertical;
  line-height: 1.5;
}
.tsp-field textarea:focus {
  outline: none;
  border-color: var(--tsp-red);
  box-shadow: 0 0 0 3px var(--tsp-red-ring);
}

.tip-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tip-nature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.tip-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--tsp-line);
  border-radius: var(--tsp-radius-sm);
  background: var(--tsp-card);
  cursor: pointer;
  font-size: var(--tsp-text-sm);
  font-weight: 600;
}
.tip-check input { margin-top: 2px; accent-color: var(--tsp-red); }
.tip-check.tip-on {
  border-color: var(--tsp-red);
  background: var(--tsp-red-soft);
}

.tip-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px dashed var(--tsp-line);
  border-radius: var(--tsp-radius-sm);
  padding: 10px 14px;
  text-align: left;
  background: var(--tsp-lift);
  cursor: pointer;
  max-height: 72px;
  overflow: hidden;
}
.tip-drop:hover, .tip-drop.tip-over {
  border-color: var(--tsp-red);
  background: var(--tsp-red-soft);
}
.tip-drop-ico {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--tsp-red-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233A86FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4'/><path d='M17 8l-5-5-5 5'/><path d='M12 3v12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}
.tip-drop svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
}
.tip-drop-copy { min-width: 0; }
.tip-drop strong { display: block; margin-bottom: 2px; font-size: var(--tsp-text-sm); }
.tip-drop-copy > span { color: var(--tsp-slate); font-size: var(--tsp-text-xs); }

.tip-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tip-file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--tsp-line); border-radius: 8px;
  font-size: var(--tsp-text-sm);
}
.tip-file-row a { color: var(--tsp-red); font-weight: 600; word-break: break-all; }

.tip-stepper {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
}
.tip-step {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--tsp-text-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--tsp-muted);
}
.tip-step span {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F0F1F3; color: var(--tsp-slate); font-size: 11px;
}
.tip-step.tip-on { color: var(--tsp-red); }
.tip-step.tip-on span { background: var(--tsp-red); color: #fff; }
.tip-step.tip-done { color: var(--tsp-ok); }
.tip-step.tip-done span { background: var(--tsp-ok); color: #fff; }

.tip-detail-dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
  font-size: var(--tsp-text-sm);
}
.tip-detail-dl dt { color: var(--tsp-slate); font-weight: 700; }
.tip-detail-dl dd { margin: 0; }

.tip-click-row { cursor: pointer; }
.tip-click-row:hover td { background: var(--tsp-lift); }

/* Reporter-facing case detail: progress first, then facts, impact and evidence. */
.tsp-badge.tsp-info { background: #EAF2FF; color: #1D4ED8; }
.tip-case-badge { white-space: nowrap; }
.tip-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border-radius: var(--tsp-radius);
  border: 1px solid rgba(58, 134, 255, .22);
  background:
    radial-gradient(circle at 92% 12%, rgba(58, 134, 255, .14), transparent 36%),
    linear-gradient(145deg, var(--tsp-card), var(--tsp-lift));
}
.tip-detail-kicker {
  margin-bottom: 6px;
  color: var(--tsp-red);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tip-detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tip-severity {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--tsp-line);
  border-radius: 999px;
  background: var(--tsp-lift);
  color: var(--tsp-slate);
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}
.tip-severity-minor { background: #F3FBF7; border-color: #BBE4CE; color: #166534; }
.tip-severity-moderate { background: #FFFBEB; border-color: #F4D99A; color: #92400E; }
.tip-severity-serious { background: #FFF3E8; border-color: #F4B985; color: #A34711; }
.tip-severity-critical { background: #FBE7E6; border-color: #F4B3AF; color: #B42318; }

.tip-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tip-section-head p { margin: 4px 0 0; color: var(--tsp-slate); font-size: var(--tsp-text-xs); }
.tip-timeline-card { margin-bottom: 14px; }
.tip-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 22px;
}
.tip-timeline-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-right: 12px; }
.tip-timeline-step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 30px;
  right: 0;
  height: 2px;
  background: var(--tsp-line);
  z-index: 0;
}
.tip-timeline-step:last-child::after { display: none; }
.tip-timeline-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tsp-line);
  border-radius: 50%;
  background: var(--tsp-card);
  color: var(--tsp-muted);
  font-size: .7rem;
  font-weight: 800;
}
.tip-timeline-step.tip-done::after { background: var(--tsp-ok); }
.tip-timeline-step.tip-done .tip-timeline-dot { border-color: var(--tsp-ok); background: var(--tsp-ok); color: #fff; }
.tip-timeline-step.tip-current .tip-timeline-dot { border-color: var(--tsp-red); color: var(--tsp-red); box-shadow: 0 0 0 4px var(--tsp-red-ring); }
.tip-timeline-step strong { display: block; margin-top: 2px; color: var(--tsp-ink); font-size: .78rem; }
.tip-timeline-step small { display: block; margin-top: 3px; color: var(--tsp-muted); font-size: .68rem; line-height: 1.35; }

.tip-detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr); gap: 14px; margin-bottom: 14px; }
.tip-detail-grid-story { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tip-detail-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin-top: 12px; }
.tip-detail-item { padding: 11px 0; border-bottom: 1px solid var(--tsp-line); min-width: 0; }
.tip-detail-label { margin-bottom: 4px; color: var(--tsp-muted); font-size: .67rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tip-detail-value { color: var(--tsp-ink); font-size: .82rem; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.tip-impact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }
.tip-impact-grid > div { padding: 13px; border: 1px solid var(--tsp-line); border-radius: 10px; background: var(--tsp-lift); }
.tip-impact-grid strong { display: block; color: var(--tsp-ink); font-size: 1.35rem; line-height: 1; }
.tip-impact-grid span { display: block; margin-top: 5px; color: var(--tsp-slate); font-size: .69rem; font-weight: 700; }
.tip-impact-grid .tip-impact-critical { border-color: #F4B3AF; background: #FFF7F6; }
.tip-impact-grid .tip-impact-critical strong { color: #B42318; }
.tip-owner-card { margin-top: 12px; padding: 13px 15px; border-left: 3px solid var(--tsp-red); border-radius: 7px; background: var(--tsp-red-soft); }
.tip-owner-card span, .tip-owner-card small { display: block; color: var(--tsp-slate); font-size: .69rem; }
.tip-owner-card strong { display: block; margin: 3px 0; color: var(--tsp-ink); font-size: .84rem; }

.tip-story { margin-top: 12px; color: var(--tsp-ink); font-size: .84rem; line-height: 1.62; }
.tip-story > p { margin: 0 0 16px; }
.tip-story > div { padding: 12px 0; border-top: 1px solid var(--tsp-line); }
.tip-story strong { display: block; margin-bottom: 4px; color: var(--tsp-slate); font-size: .69rem; letter-spacing: .04em; text-transform: uppercase; }
.tip-story p { margin: 0; white-space: pre-wrap; }
.tip-empty-inline { padding: 14px; border: 1px dashed var(--tsp-line); border-radius: 9px; color: var(--tsp-muted); font-size: .78rem; line-height: 1.5; }

.tip-evidence-card { margin-top: 0; }
.tip-file-count { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tsp-red-soft); color: var(--tsp-red); font-size: .75rem; font-weight: 800; }
.tip-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.tip-evidence {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--tsp-line);
  border-radius: 10px;
  background: var(--tsp-lift);
  color: var(--tsp-ink);
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tip-evidence:hover { border-color: var(--tsp-red); color: var(--tsp-ink); text-decoration: none; transform: translateY(-1px); box-shadow: var(--tsp-shadow); }
.tip-evidence img, .tip-evidence-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; object-fit: cover; background: var(--tsp-card); }
.tip-evidence-icon { display: flex; align-items: center; justify-content: center; color: var(--tsp-red); }
.tip-evidence-icon svg { width: 20px; height: 20px; }
.tip-evidence > span:last-child { min-width: 0; }
.tip-evidence strong { display: block; overflow: hidden; color: var(--tsp-ink); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.tip-evidence small { display: block; margin-top: 3px; color: var(--tsp-muted); font-size: .66rem; }

@media (max-width: 720px) {
  .tip-grid-2, .tip-detail-dl, .tip-detail-grid, .tip-detail-grid-story { grid-template-columns: 1fr; }
  .tip-detail-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
  .tip-detail-badges { justify-content: flex-start; }
  .tip-timeline { grid-template-columns: 1fr; gap: 12px; }
  .tip-timeline-step::after { top: 28px; bottom: -12px; left: 13px; right: auto; width: 2px; height: auto; }
  .tip-detail-items { grid-template-columns: 1fr; }
}
