/* SKU planning mode on the SKU page and the SKU edit page
   (ai_reference/forecast_engine.md → "SKU planning mode" → "The SKU page pill and
   the edit section"):
     .pm-pill   the pill at the right end of the SKU page's tab row (skus/_planning_mode_pill)
     .pmd-*     its details dialog (skus/_planning_mode_modal, on the .guide-modal shell);
                the mode chip, source, notice and kit warning are shared with the edit section
     .pme-*     the edit page's Planning mode section (skus/_planning_mode_edit_section),
                beside the Phase-Out card
   Design system: badges §9 (the mode tints are the planning-mode badge tints of
   planning_mode.css), cards §4, form controls §6. No inline styles. */

/* ---- The pill ---- */
.pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--green-tint);
  color: var(--green);
  cursor: pointer;
  transition: border-color 0.15s;
}

.pm-pill:hover {
  border-color: currentColor;
}

.pm-pill:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pm-pill-icon {
  flex-shrink: 0;
}

.pm-pill--suppress_suggested_order,
.pmd-mode--suppress_suggested_order {
  background: var(--blue-tint);
  color: var(--blue);
}

.pm-pill--not_stocked,
.pmd-mode--not_stocked {
  background: var(--kit-tint);
  color: var(--kit);
}

.pm-pill--sell_down,
.pmd-mode--sell_down {
  background: var(--amber-tint);
  color: var(--amber);
}

.pm-pill--none,
.pmd-mode--none {
  background: var(--stone-tint);
  color: var(--stone);
}

/* ---- The details dialog ---- */
.pmd-modal {
  max-width: 560px;
}

.pmd-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.pmd-fact dt {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.pmd-fact dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.pmd-mode {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-tint);
  color: var(--green);
}

.pmd-source {
  font-size: 12px;
  color: var(--muted);
}

.pmd-without {
  font-size: 12px;
  color: var(--light);
  cursor: help;
}

.pmd-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}

.pmd-notice,
.pmd-kit-warning {
  background: var(--amber-tint);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  margin: 10px 0 0;
}

.pmd-kit-warning--on-demand {
  background: var(--kit-tint);
}

.pmd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ---- The edit page section, beside Phase-Out ---- */
.pme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.pme-grid > .card {
  margin-top: 0;
}

.pme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pme-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.pme-help {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 12px;
}

.pme-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}

.pme-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.pme-without {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

.pme-form {
  margin-top: 14px;
}

.pme-input {
  max-width: 360px;
}

.pme-siblings {
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.pme-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

@media (max-width: 1024px) {
  .pme-grid {
    grid-template-columns: 1fr;
  }
}
