/* css/kotc.css — the "King of the Coliseum" box (js/app/kotc.js).
   The box chrome (section / summary / body) is shared with Army setup and the
   Detachments picker via .army-setup-section / .army-setup-summary /
   .army-setup-body, so this file only styles the box's own content. */

/* Status badge pinned to the right of the shared summary, like the
   detachments points total. */
.kotc-summary { justify-content: flex-start; }
.kotc-summary-label { flex: 0 0 auto; }
.kotc-status {
  margin-left: auto;
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
  border: 1px solid transparent;
}
.kotc-status:empty { display: none; }
.kotc-status-idle {
  color: var(--text-muted, #888);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.kotc-status-ok {
  color: var(--success, #2ecc71);
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.4);
}
.kotc-status-bad {
  color: var(--danger, #e74c3c);
  background: rgba(231, 76, 60, 0.14);
  border-color: rgba(231, 76, 60, 0.45);
}

/* --- Enable toggle ------------------------------------------------------- */
.kotc-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: var(--radius, 6px);
  background: var(--card-bg, rgba(255, 255, 255, 0.02));
  cursor: pointer;
}
.kotc-toggle:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.kotc-toggle-cb {
  margin: 2px 0 0;
  flex: 0 0 auto;
  cursor: pointer;
  accent-color: var(--accent);
}
.kotc-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.kotc-toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #e0e0e0);
}
.kotc-toggle-hint {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted, #888);
}

/* --- Rule list ----------------------------------------------------------- */
.kotc-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kotc-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-left: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius, 6px);
  background: rgba(255, 255, 255, 0.02);
}
.kotc-glyph {
  flex: 0 0 auto;
  width: 14px;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted, #888);
}
.kotc-rule-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.kotc-rule-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text, #e0e0e0);
}
.kotc-rule-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted, #888);
}
.kotc-rule-detail {
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Evaluated states — only applied once the checks are live. */
.kotc-rule.kotc-ok {
  border-left-color: rgba(46, 204, 113, 0.55);
}
.kotc-rule.kotc-ok .kotc-glyph,
.kotc-rule.kotc-ok .kotc-rule-detail { color: var(--success, #2ecc71); }

.kotc-rule.kotc-bad {
  border-left-color: var(--danger, #e74c3c);
  background: rgba(231, 76, 60, 0.08);
}
.kotc-rule.kotc-bad .kotc-glyph,
.kotc-rule.kotc-bad .kotc-rule-detail { color: var(--danger, #e74c3c); }
.kotc-rule.kotc-bad .kotc-rule-title { color: var(--text, #e0e0e0); }

.kotc-fix {
  align-self: flex-start;
  margin-top: 3px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: var(--radius, 6px);
  cursor: pointer;
}
.kotc-fix:hover { background: rgba(var(--accent-rgb), 0.22); }

/* --- Twist footnote ------------------------------------------------------ */
.kotc-twist {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px dashed rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius, 6px);
  background: rgba(var(--accent-rgb), 0.06);
}
.kotc-twist-label {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 1px;
}
.kotc-twist-text {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted, #888);
}
.kotc-twist-text strong { color: var(--text, #e0e0e0); font-weight: 600; }
