/* Palworld Wiki - /breeding/ section styles.
   Scoped under body.section-breeding per the DESIGN.md contract; only design tokens from
   css/wiki.css are used for colors (the red/green selftest banners have no token equivalent). */

body.section-breeding .bc-hero { margin-bottom: 22px; }
body.section-breeding .bc-lede { max-width: 720px; color: var(--ink-dim); }

/* ---- calculator shell ---- */

body.section-breeding .bc-app {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 34px;
}

body.section-breeding .bc-boot { margin: 0; color: var(--ink-faint); }

body.section-breeding .bc-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
body.section-breeding .bc-tab {
  padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink-faint);
  font: 600 .88rem var(--font-body);
}
body.section-breeding .bc-tab:hover { color: var(--ink); background: var(--glass-strong); }
body.section-breeding .bc-tab.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

body.section-breeding .bc-pickers {
  display: grid; grid-template-columns: 1fr 44px 1fr; gap: 12px; align-items: end;
}
body.section-breeding .bc-pickers-single { grid-template-columns: minmax(0, 420px); }

body.section-breeding .bc-swap {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink);
  font-size: 1.1rem; line-height: 1;
}
body.section-breeding .bc-swap:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent);
}

/* ---- combobox ---- */

body.section-breeding .bc-combo { position: relative; min-width: 0; }
body.section-breeding .bc-combo-label {
  display: block; margin-bottom: 6px;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint);
}
body.section-breeding .bc-combo-input {
  width: 100%; height: 44px; padding: 0 38px 0 12px;
  background: var(--void-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font: 500 .95rem var(--font-body); outline: none;
}
body.section-breeding .bc-combo-input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
body.section-breeding .bc-combo-clear {
  position: absolute; right: 6px; bottom: 6px;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 0; color: var(--ink-faint); font-size: 1.1rem; line-height: 1;
}
body.section-breeding .bc-combo-clear:hover { color: var(--ink); background: var(--glass-strong); }

body.section-breeding .bc-drop {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 320px; overflow-y: auto;
  background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
body.section-breeding .bc-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; color: var(--ink-dim);
}
body.section-breeding .bc-opt.sel { background: var(--glass-strong); }
body.section-breeding .bc-opt-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.section-breeding .bc-opt-sub { color: var(--ink-faint); font-size: .78rem; white-space: nowrap; }
body.section-breeding .bc-drop-empty { padding: 14px; color: var(--ink-faint); text-align: center; }

/* ---- shared pal line (icon + name) - used by JS results AND the static tables ---- */

body.section-breeding .bc-pal { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
body.section-breeding .bc-pic {
  border-radius: 7px; background: var(--void-2); object-fit: contain; flex: 0 0 auto;
}
body.section-breeding .bc-pic-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 1px solid var(--line);
  color: var(--ink-faint); font: 700 .8rem var(--font-head);
}
body.section-breeding .bc-gender {
  margin-left: 5px; padding: 1px 7px; border-radius: 999px;
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-warm) 40%, transparent);
  color: var(--accent-warm);
}

/* ---- results ---- */

body.section-breeding .bc-result-area { margin-top: 18px; }
body.section-breeding .bc-hint { color: var(--ink-faint); margin: 8px 0 0; }

body.section-breeding .bc-child-card {
  display: flex; align-items: center; gap: 18px;
  padding: 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
body.section-breeding .bc-child-card > .bc-pic,
body.section-breeding .bc-child-card > .bc-pic-fallback { width: 84px; height: 84px; font-size: 1.6rem; }
body.section-breeding .bc-child-info { min-width: 0; }
body.section-breeding .bc-child-name {
  font: 700 1.3rem var(--font-head); color: var(--ink); margin-bottom: 4px;
}
body.section-breeding .bc-badge {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent); vertical-align: middle;
}
body.section-breeding .bc-math { margin: 8px 0 0; color: var(--ink-faint); font-size: .85rem; }
body.section-breeding .bc-tie { color: var(--accent-warm); }

body.section-breeding .bc-gender-note {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-warm) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-warm) 30%, transparent);
}
body.section-breeding .bc-gender-note p { margin: 0 0 8px; font-size: .88rem; }
body.section-breeding .bc-gender-row,
body.section-breeding .bc-pair-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px;
}
body.section-breeding .bc-plus, body.section-breeding .bc-arrow { color: var(--ink-faint); }

body.section-breeding .bc-sub { margin: 18px 0 10px; }
body.section-breeding .bc-rev-btn { margin-top: 14px; }
body.section-breeding tr.bc-try { cursor: pointer; }

/* selftest banners (no danger/success tokens exist in the design system) */
body.section-breeding .bc-banner-fail,
body.section-breeding .bc-banner-pass {
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  font-weight: 600; font-size: .9rem;
}
body.section-breeding .bc-banner-fail {
  background: rgba(255, 82, 82, .12); border: 1px solid rgba(255, 82, 82, .5); color: #ff8484;
}
body.section-breeding .bc-banner-pass {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}

/* ---- static reference sections ---- */

body.section-breeding .bc-mechanics { max-width: 780px; }
body.section-breeding .bc-mechanics ul { padding-left: 20px; }
body.section-breeding .bc-mechanics li { margin-bottom: 8px; }
body.section-breeding .bc-formula {
  font-family: var(--font-head); color: var(--ink); font-size: .95rem;
  background: var(--void-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; display: inline-block;
}
body.section-breeding .bc-formula-hero { font-size: 1.05rem; padding: 12px 18px; }
body.section-breeding .bc-worked { margin: 18px 0; }
body.section-breeding .bc-worked h3 { margin-bottom: 10px; }
body.section-breeding .bc-worked p:last-child { margin-bottom: 0; }

body.section-breeding .bc-combo-table td { white-space: nowrap; }

body.section-breeding .bc-true-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
body.section-breeding .bc-true-grid li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--line);
  min-width: 0;
}
body.section-breeding .bc-true-grid .bc-pal { min-width: 0; }
body.section-breeding .bc-true-grid .bc-pal > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.section-breeding .bc-dexno { color: var(--ink-faint); font-size: .78rem; white-space: nowrap; }

/* ---- responsive ---- */

@media (max-width: 720px) {
  body.section-breeding .bc-pickers { grid-template-columns: 1fr; }
  body.section-breeding .bc-swap { justify-self: center; transform: rotate(90deg); }
  body.section-breeding .bc-child-card { gap: 12px; }
  body.section-breeding .bc-child-card > .bc-pic,
  body.section-breeding .bc-child-card > .bc-pic-fallback { width: 64px; height: 64px; }
}
