/* step-races.css – Krok 1: Výběr rasy */

.race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.race-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}

.race-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.2);
}

.race-card.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.07);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.race-card__icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.race-card__name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.race-card__bonuses {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.race-card__ability {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  font-style: italic;
}

.race-card__img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  margin: -0.8rem -0.8rem 0.6rem;
  width: calc(100% + 1.6rem);
  background: rgba(0, 0, 0, 0.25);
}

.race-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.3s;
}

.race-card:hover .race-card__img img {
  transform: scale(1.05);
}

/* Panel pro podras */
.subrace-panel {
  margin-top: 0.5rem;
  padding: 1.5rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.subrace-panel__title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.subrace-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.subrace-grid > .subrace-card {
  flex: 0 1 calc(33.333% - 0.6rem);
  min-width: 220px;
}

.subrace-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.subrace-card:hover {
  border-color: var(--gold);
}

.subrace-card.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.07);
}

.subrace-card__img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.subrace-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.3s;
}

.subrace-card:hover .subrace-card__img img {
  transform: scale(1.05);
}

.subrace-card__body {
  flex: 1;
  padding: 0.8rem 1rem;
}

.subrace-card__name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.subrace-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.subrace-card__bonuses {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Heritage panel (sekundární rasový původ – půlork) */
.heritage-panel {
  margin-top: 1.2rem;
  padding: 1.5rem;
  background: rgba(201, 162, 39, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.heritage-panel__title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.heritage-panel__desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

.heritage-panel__subtitle {
  font-family: 'Cinzel', serif;
  color: var(--gold-light, #d4b86a);
  font-size: 0.95rem;
  margin: 1.2rem 0 0.6rem;
}

.heritage-subrace-panel {
  margin-top: 0.4rem;
}

.heritage-race-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.heritage-race-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 80px;
  text-align: center;
}

.heritage-race-card:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
}

.heritage-race-card.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.25);
}

.heritage-race-card__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.heritage-race-card__name {
  font-size: 0.78rem;
  color: var(--text);
  font-family: 'Crimson Text', serif;
}

/* ===================================================================
   Race card – akce (select button)
   =================================================================== */

.race-card__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.subrace-card__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem 0.8rem;
}

.race-card__lore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--gold-light);
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.25);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
  font-family: 'Crimson Text', serif;
}

.race-card__lore-btn:hover {
  background: rgba(201, 162, 39, 0.18);
  border-color: var(--gold);
  color: var(--gold);
}

/* ===================================================================
   Tooltip – široký mód pro lore detail
   =================================================================== */

.tooltip-box--wide {
  max-width: 700px;
}

/* ===================================================================
   Race Lore detail (rl-*) – rozšířený pohled na rasu
   =================================================================== */

.race-lore {
  text-align: center;
}

.rl-hero {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.rl-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
}

.rl-name {
  font-family: 'Cinzel', serif;
  color: var(--gold) !important;
  font-size: 1.6rem !important;
  margin-bottom: 0.5rem !important;
}

.rl-story {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  margin: 1rem 0 1.2rem;
}

.rl-paragraph {
  color: var(--text-dim) !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  margin-bottom: 0.7rem !important;
  text-indent: 1.2rem;
}

.rl-paragraph:first-child {
  text-indent: 0;
}

.rl-section {
  text-align: left;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.rl-section__label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.rl-subraces {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rl-subrace {
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.rl-subrace:hover {
  border-color: rgba(201, 162, 39, 0.35);
}

.rl-subrace__img {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.rl-subrace__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
}

.rl-subrace__body {
  flex: 1;
  min-width: 0;
}

.rl-subrace__name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.rl-subrace__lore {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Responsivita pro lore detail */
@media (max-width: 500px) {
  .tooltip-box--wide { max-width: 100%; }
  .rl-hero { max-height: 160px; }
  .rl-subrace { flex-direction: column; align-items: center; text-align: center; }
  .rl-subrace__img { width: 60px; height: 60px; }
}
