/* Breeding Lab — page-specific styles. Reuses the Palpedia theme variables
   shared foundation, catalog-controls.css and the paldeck card styles. */

.breeding-container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.breeding-container:focus {
  outline: none;
}

/* --- Hero ------------------------------------------------------------------- */

.breeding-hero {
  text-align: center;
  margin: 1.3rem auto 1.1rem;
  max-width: 760px;
}

.breeding-hero-kicker {
  margin: 0 0 0.25rem;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.breeding-hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0.01em;
}

.breeding-hero-copy {
  margin: 0.4rem auto 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.breeding-hero-copy code {
  color: var(--cyan);
  font-size: 0.85em;
}

/* --- Calculator switcher ---------------------------------------------------- */

.breeding-mode-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto 0.25rem;
  gap: 0.28rem;
  padding: 0.25rem 0;
  background:
    linear-gradient(180deg, rgba(9, 24, 32, 0.94), rgba(3, 14, 21, 0.98)),
    rgba(3, 14, 21, 0.98);
  border-block: 1px solid rgba(174, 202, 211, 0.1);
  border-radius: 0;
  box-shadow:
    inset 0 1px rgba(220, 246, 250, 0.025),
    0 18px 42px rgba(0, 8, 12, 0.24);
  overflow: visible;
}

.breeding-mode-tab {
  --filter-accent: #64f4ff;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.3rem 0.7rem 0.4rem;
  color: rgba(166, 185, 191, 0.72);
  background: rgba(6, 20, 26, 0.56);
  border: 1px solid rgba(89, 119, 127, 0.28);
  border-radius: 0;
  font: inherit;
  text-align: center;
  cursor: pointer;
  isolation: isolate;
  overflow: visible;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.breeding-mode-tab::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(119, 135, 143, 0.68);
  box-shadow: 0 1px rgba(205, 224, 229, 0.08);
  content: "";
  transition: background 160ms ease, box-shadow 160ms ease;
}

.breeding-mode-icon {
  order: 1;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  color: currentColor;
  opacity: 0.48;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.34));
  transition: color 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.breeding-mode-icon svg {
  width: 100%;
  height: 100%;
}

.breeding-mode-body {
  order: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: auto;
}

.breeding-mode-body strong {
  color: inherit;
  font-size: 0.7rem;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.72);
}

.breeding-mode-body small {
  display: none;
}

.breeding-mode-indicator {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #64f4ff;
  box-shadow:
    0 -4px 12px rgba(78, 231, 242, 0.84),
    0 -12px 28px rgba(78, 231, 242, 0.34);
  opacity: 0;
  transition: opacity 140ms ease;
}

.breeding-mode-tab:hover {
  z-index: 20;
  color: rgba(236, 252, 254, 0.96);
  border-color: transparent;
  background: linear-gradient(105deg, color-mix(in srgb, var(--filter-accent) 10%, #081a22), color-mix(in srgb, var(--filter-accent) 5%, #06151c) 58%, #05141b);
  box-shadow: 0 0 8px color-mix(in srgb, var(--filter-accent) 6%, transparent);
  filter: brightness(1.06);
}

.breeding-mode-tab:focus-visible {
  z-index: 2;
  border-color: transparent;
  outline: 0;
  background: linear-gradient(105deg, color-mix(in srgb, var(--filter-accent) 13%, #081a22), color-mix(in srgb, var(--filter-accent) 6%, #06151c) 58%, #05141b);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--filter-accent) 8%, transparent), 0 0 10px color-mix(in srgb, var(--filter-accent) 11%, transparent);
}

.breeding-mode-tab[aria-selected="true"] {
  color: #f2feff;
  background:
    radial-gradient(ellipse 64% 76% at 50% 66%, rgba(80, 221, 233, 0.34), rgba(51, 155, 168, 0.16) 48%, transparent 78%),
    linear-gradient(180deg, rgba(22, 59, 70, 0.08), rgba(71, 199, 212, 0.12));
}

.breeding-mode-tab[aria-selected="true"]:hover,
.breeding-mode-tab[aria-selected="true"]:focus-visible {
  border-color: color-mix(in srgb, var(--filter-accent) 68%, rgba(70, 96, 101, 0.54));
  background: linear-gradient(105deg, color-mix(in srgb, var(--filter-accent) 14%, #081a22), color-mix(in srgb, var(--filter-accent) 7%, #06151c) 58%, #05141b);
}

.breeding-mode-tab[aria-selected="true"]::after {
  background: #64f4ff;
  box-shadow:
    0 -4px 12px rgba(78, 231, 242, 0.84),
    0 -12px 28px rgba(78, 231, 242, 0.34);
}

.breeding-mode-tab[aria-selected="true"] .breeding-mode-icon {
  color: #dffcff;
  opacity: 1;
  filter:
    drop-shadow(0 0 5px rgba(100, 244, 255, 0.72))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.44));
}

.breeding-mode-tab[aria-selected="true"] .breeding-mode-body strong {
  text-shadow:
    0 0 7px rgba(100, 244, 255, 0.68),
    0 2px 3px rgba(0, 0, 0, 0.72);
}

.breeding-mode-tab[aria-selected="true"] .breeding-mode-indicator {
  opacity: 1;
}

.breeding-mode-tab > .filter-selection-frame {
  position: absolute;
  z-index: 4;
  inset: -0.22rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.2, 0.72, 0.25, 1);
}

.breeding-mode-tab > .filter-selection-frame i {
  position: absolute;
  width: 0.62rem;
  height: 0.62rem;
  border-color: var(--filter-accent);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--filter-accent) 62%, transparent));
}

.breeding-mode-tab > .filter-selection-frame i:nth-child(1) { top: 0; left: 0; border-top: 2px solid var(--filter-accent); border-left: 2px solid var(--filter-accent); transform-origin: bottom right; }
.breeding-mode-tab > .filter-selection-frame i:nth-child(2) { top: 0; right: 0; border-top: 2px solid var(--filter-accent); border-right: 2px solid var(--filter-accent); transform-origin: bottom left; }
.breeding-mode-tab > .filter-selection-frame i:nth-child(3) { right: 0; bottom: 0; border-right: 2px solid var(--filter-accent); border-bottom: 2px solid var(--filter-accent); transform-origin: top left; }
.breeding-mode-tab > .filter-selection-frame i:nth-child(4) { bottom: 0; left: 0; border-bottom: 2px solid var(--filter-accent); border-left: 2px solid var(--filter-accent); transform-origin: top right; }

.breeding-mode-tab:hover > .filter-selection-frame,
.breeding-mode-tab:focus-visible > .filter-selection-frame {
  opacity: 1;
}

.breeding-mode-tab:hover > .filter-selection-frame i,
.breeding-mode-tab:focus-visible > .filter-selection-frame i {
  animation: paldeck-corner-breathe 980ms ease-in-out 160ms infinite alternate;
}

.breeding-mode-section[hidden] {
  display: none;
}

.breeding-mode-load-error {
  min-height: 12rem;
  display: grid;
  place-content: center;
  gap: .35rem;
  color: var(--muted);
  text-align: center;
}

.breeding-mode-load-error strong {
  color: var(--text);
}

