/* ============================================================
   RULE LIST — compliance checklist side-panel
   States per item: --pass / --warn / --fail
   ============================================================ */

.rule-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.rule-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rule-card__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.rule-card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Highlight callout — a featured stat above the rule list.
   Used for "Aggregate CLV" in Phase 2 (one of the soft-fail criteria). */
.rule-card__callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-success-subtle);
  border: 1px solid transparent;
}

.rule-card__callout--warn { background: var(--color-warning-subtle); }
.rule-card__callout--fail { background: var(--color-danger-subtle); }

.rule-card__callout-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rule-card__callout-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.rule-card__callout-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.rule-card__callout--pass .rule-card__callout-value { color: var(--color-success-text); }
.rule-card__callout--warn .rule-card__callout-value { color: var(--color-warning-text); }
.rule-card__callout--fail .rule-card__callout-value { color: var(--color-danger-text); }

.rule-card__callout-detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
  max-width: 50%;
  line-height: var(--leading-snug);
}

/* List */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rule-list__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.rule-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rule-list__item:first-child {
  padding-top: 0;
}

/* Status icon — circular, color-coded */
.rule-list__icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-list__icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.rule-list__item--pass .rule-list__icon {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.rule-list__item--warn .rule-list__icon {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
}

.rule-list__item--fail .rule-list__icon {
  background: var(--color-danger-subtle);
  color: var(--color-danger);
}

/* Body */
.rule-list__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rule-list__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.rule-list__detail {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Right-aligned current value (numeric) */
.rule-list__value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-align: right;
  padding-top: 2px;
}

/* Footer summary "All rules OK" / "1 warning" */
.rule-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-success-subtle);
  color: var(--color-success-text);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.rule-card__footer--warn {
  background: var(--color-warning-subtle);
  color: var(--color-warning-text);
}

.rule-card__footer svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}
