/* Palworld Zucht-Rechner — Tool-spezifische Styles.
   Setzt voraus, dass https://diedrachenreiter.com/css/style.css bereits geladen ist
   (definiert :root-Variablen, body, .container, h1-h4, header/footer, .ad-box, .ad-label,
   .sub-hero*, .site-hero-label, .site-hero-bg). Hier nur Ergänzungen für die Tool-eigenen
   Komponenten, die es auf der Seite sonst nicht gibt — durchgängig mit den echten
   Seiten-Variablen (--primary, --bg-card, --text, --radius, ...) statt eigener Farben. */

.pw-page { padding-top: 36px; padding-bottom: 24px; }

/* Sub-Hero: Akzent-Span + Stat-Chips (Sub-Hero selbst kommt komplett aus style.css) */
.sub-hero-title .accent { color: var(--primary); }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stat-chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 6px 14px;
}

/* ---------- Anzeigen-Platzhalter (echter AdSense-Code kommt beim Deploy) ---------- */
.ad-placeholder {
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 24px 12px;
}

/* ---------- Mode Tabs ---------- */
.mode-tabs-wrap { margin: 8px 0 32px; }
.mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mode-tabs::-webkit-scrollbar { display: none; }
.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 9px;
  padding: 13px 20px;
  cursor: pointer;
  flex: 1;
  transition: color 0.2s, background 0.2s;
}
.tab-icon { width: 18px; height: 18px; flex-shrink: 0; }
.mode-tab:hover:not(.active) { color: #fff; background: var(--bg-elevated); }
.mode-tab.active {
  color: #fff;
  background: var(--primary);
}

.mode-panel { display: none; }
.mode-panel.active { display: block; animation: fadeUp 0.3s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mode-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 22px;
}

.noscript-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 24px;
  color: var(--text);
}

/* ---------- Breeding row (Modus 1) ---------- */
.breed-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.breed-op {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
}
.pal-slot {
  width: 176px;
  min-height: 176px;
  background: var(--bg-elevated);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.pal-slot:hover { border-color: var(--primary); transform: translateY(-2px); }
.pal-slot.filled { border-style: solid; border-color: var(--border-strong); }
.pal-slot.result { cursor: default; }
.pal-slot.result:hover { transform: none; border-color: var(--border-strong); }
.pal-slot.result.filled { border-color: var(--primary); box-shadow: 0 0 28px rgba(230, 57, 70, 0.18); }
.pal-slot.small { width: 100%; min-height: 128px; }
.slot-empty { font-size: 2rem; font-weight: 300; line-height: 1; color: var(--text-light); }
.slot-hint { font-size: 0.85rem; text-align: center; }
.pal-slot img { width: 88px; height: 88px; border-radius: 50%; background: var(--bg); }
.pal-slot .pal-name { color: var(--text); font-weight: 600; font-size: 0.95rem; text-align: center; }
.pal-slot .pal-meta { font-size: 0.75rem; }

.calc-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 18px;
  line-height: 1.7;
}
.calc-note .gender-case { color: var(--primary); font-weight: 600; }

/* ---------- Modus 2 ---------- */
.target-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.target-info { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.target-info strong { color: var(--text); }

.combo-table { width: 100%; border-collapse: collapse; }
.combo-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
.combo-pal { display: inline-flex; align-items: center; gap: 12px; }
.combo-pal img { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); }
.combo-op { color: var(--text-light); text-align: center; width: 36px; font-weight: 600; }
.g { color: var(--primary); }
.btn-more, .btn-secondary {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 10px 22px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
  transition: background 0.2s, color 0.2s;
}
.btn-more:hover, .btn-secondary:hover { background: var(--primary); color: #fff; }
.empty-note { color: var(--text-muted); padding: 28px 0; text-align: center; line-height: 1.7; font-size: 0.95rem; }

/* ---------- Modus 3 ---------- */
.path-setup {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.path-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.col-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 14px; }
.owned-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.owned-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 5px 14px 5px 6px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.owned-chip:hover { border-color: var(--primary); }
.owned-chip img { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); }
.owned-chip .x { color: var(--text-light); font-size: 1rem; }
.btn-secondary { margin: 16px 0 0; }

.path-steps { display: flex; flex-direction: column; gap: 10px; }
.path-step {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  animation: fadeUp 0.3s ease both;
}
.path-step .step-no {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 68px;
}
.path-step .combo-pal img { width: 42px; height: 42px; }
.path-step .arrow { color: var(--text-light); }
.path-step .is-target { color: var(--primary); font-weight: 600; }

/* ---------- Pal-Liste ---------- */
.pal-list-section { margin: 56px 0 40px; }
.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.list-sub { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  padding: 10px 18px;
  width: 260px;
  max-width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="search"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15); }
input[type="search"]::placeholder { color: var(--text-light); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); cursor: pointer; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.pal-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.pal-table th {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.pal-table th.sortable { cursor: pointer; user-select: none; }
.pal-table th.sortable:hover { color: var(--text); }
.pal-table th.sortable.asc::after { content: " ↑"; color: var(--primary); }
.pal-table th.sortable.desc::after { content: " ↓"; color: var(--primary); }
.pal-table td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.pal-table tbody tr { cursor: pointer; transition: background 0.15s; }
.pal-table tbody tr:hover { background: rgba(230, 57, 70, 0.06); }
.pal-table .combo-pal img { width: 44px; height: 44px; }
.pal-table .dex { color: var(--text-light); font-size: 0.86rem; }
.pal-table .bp { color: var(--text-muted); font-size: 0.9rem; }

.rarity { font-size: 0.82rem; font-weight: 700; }
.rarity.r0 { color: #a3a8b0; }
.rarity.r1 { color: var(--link); }
.rarity.r2 { color: #c084ff; }
.rarity.r3 { color: #ffc247; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.page-btn.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-gap { color: var(--text-light); padding: 0 2px; }

/* ---------- Info-Sektion (SEO-Content) ---------- */
.info-section { margin: 56px 0; }
.info-section h2 { margin-bottom: 24px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.info-card h3 { margin-bottom: 10px; color: var(--primary); font-size: 1.05rem; }
.info-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }

/* ---------- FAQ ---------- */
.faq-section { margin: 56px 0; }
.faq-section h2 { margin-bottom: 20px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; padding-bottom: 18px; }

.fan-disclaimer {
  color: var(--text-light);
  font-size: 0.78rem;
  line-height: 1.7;
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Picker Modal ---------- */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  width: min(720px, 100%);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.25s ease;
}
.modal-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-head h3 { color: var(--text); font-family: 'Inter', sans-serif; font-size: 1.05rem; }
.modal-head input { width: 100%; }
.modal-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: color 0.2s;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.picker-grid::-webkit-scrollbar { width: 10px; }
.picker-grid::-webkit-scrollbar-track { background: transparent; }
.picker-grid::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 20px;
  border: 2px solid var(--bg-card);
}
.picker-grid::-webkit-scrollbar-thumb:hover { background-color: var(--primary); }
.picker-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 6px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, transform 0.2s;
}
.picker-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.picker-item img { width: 54px; height: 54px; border-radius: 50%; background: var(--bg); }
.picker-item .pi-name { font-size: 0.76rem; font-weight: 500; margin-top: 8px; line-height: 1.3; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .breed-row { gap: 12px; padding: 28px 14px; }
  .pal-slot { width: 130px; min-height: 144px; padding: 10px; }
  .pal-slot img { width: 64px; height: 64px; }
  .breed-op { font-size: 1.4rem; }
  .path-setup { grid-template-columns: 1fr; }

  /* Tabs: horizontales Scrollen (Desktop-Verhalten) passt nicht auf Handys —
     3 volle Labels stapeln sich stattdessen vollbreit untereinander. */
  .mode-tabs { flex-direction: column; overflow-x: visible; }
  .mode-tab {
    flex: none;
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 0.9rem;
    white-space: normal;
  }

  /* Pal-Liste: aus der Desktop-Tabelle (erzwang horizontales Scrollen) wird
     eine echte Mobile-Kartenliste — keine Kopfzeile, eine Zeile pro Pal. */
  .table-wrap { overflow-x: visible; }
  .pal-table { min-width: 0; width: 100%; }
  .pal-table thead { display: none; }
  .pal-table, .pal-table tbody { display: block; width: 100%; }
  .pal-table tr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  .pal-table tr:last-child { border-bottom: none; }
  .pal-table td { display: block; padding: 0; border: none; }
  .pal-table td.dex { flex: 0 0 auto; width: 30px; font-size: 0.72rem; }
  .pal-table td:nth-child(2) { flex: 1; min-width: 0; }
  .pal-table .combo-pal { gap: 10px; }
  .pal-table .combo-pal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .pal-table td:nth-child(3) { flex: 0 0 auto; }
  .pal-table td.bp { flex: 0 0 auto; min-width: 34px; text-align: right; font-size: 0.82rem; }
}

@media (max-width: 400px) {
  .pal-table td.bp { display: none; }
  .stat-chip { font-size: 0.72rem; padding: 5px 11px; }
}
