/* ============================================================
   Damage Mechanic — SWD6 1E wound-status UI
   ============================================================ */

/* --- Wound Status Badge ------------------------------------ */

.dmg-wound-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dmg-status-uninjured    { background: rgba(74, 222, 128, 0.2);  color: #4ade80; }
.dmg-status-wounded      { background: rgba(251, 191, 36, 0.2);  color: #fbbf24; }
.dmg-status-incapacitated { background: rgba(251, 146, 60, 0.25); color: #fb923c; }
.dmg-status-mortally     { background: rgba(239, 68, 68, 0.2);   color: #ef4444; }
.dmg-status-killed       { background: rgba(107, 114, 128, 0.3); color: #6b7280; }

/* --- Apply Damage Modal ------------------------------------ */

.dmg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.dmg-modal {
  background: var(--bg-primary, #1a1a1a);
  border: 1px solid var(--border-primary, #2a2a2a);
  border-radius: 8px;
  width: 360px;
  max-width: 95vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.dmg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary, #2a2a2a);
}

.dmg-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary, #e8e8e8);
}

.dmg-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary, #b0b0b0);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.dmg-modal-close:hover {
  color: var(--text-primary, #e8e8e8);
}

.dmg-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dmg-modal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dmg-modal-label {
  font-size: 0.8rem;
  color: var(--text-secondary, #b0b0b0);
  min-width: 120px;
  flex-shrink: 0;
}

.dmg-modal-value {
  font-size: 0.875rem;
  color: var(--text-primary, #e8e8e8);
  font-family: var(--font-mono, monospace);
}

.dmg-modal-select,
.dmg-modal-input {
  flex: 1;
  background: var(--bg-secondary, #0a0a0a);
  border: 1px solid var(--border-primary, #2a2a2a);
  border-radius: 4px;
  color: var(--text-primary, #e8e8e8);
  font-size: 0.875rem;
  padding: 6px 8px;
}

.dmg-modal-select:focus,
.dmg-modal-input:focus {
  outline: none;
  border-color: var(--accent-red, #e63946);
}

.dmg-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border-primary, #2a2a2a);
}

/* --- Result Banner ----------------------------------------- */

.dmg-result-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 6px;
  margin: 8px 0;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary, #e8e8e8);
}

.dmg-result-name {
  font-weight: 600;
}

/* --- Tick Modal hint text ---------------------------------- */

.dmg-tick-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary, #b0b0b0);
}

.dmg-tick-hint:not(:empty) {
  color: var(--warning, #fbbf24);
}

/* --- 5E Death Save inline panel (rendered in health-section when
       :status :dying-stable) --------------------------------------- */

.death-save-panel {
  margin-top: 12px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
}

.death-save-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.death-save-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent-red, #e63946);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.death-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.death-save-input {
  width: 70px;
  padding: 6px 8px;
  background: var(--bg-secondary, #0a0a0a);
  border: 1px solid var(--border-primary, #2a2a2a);
  border-radius: 4px;
  color: var(--text-primary, #e8e8e8);
  font-size: 0.9375rem;
}

.death-save-input:focus {
  outline: none;
  border-color: var(--accent-red, #e63946);
}

.death-save-hint {
  font-size: 0.75rem;
  color: var(--text-muted, #808080);
  flex: 1;
  min-width: 200px;
}

/* --- Cairn Scars modal -------------------------------------------- */

.scar-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-red, #e63946);
}

.scar-effect {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-primary, #e8e8e8);
}

.scar-hint p {
  font-size: 0.8125rem;
  color: var(--text-muted, #808080);
  font-style: italic;
  margin: 8px 0 0 0;
}
