/* step-abilities.css – Krok 5: Schopnosti a božstva */

.abilities-builder { display: flex; flex-direction: column; gap: 0.5rem; }

.ability-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.ability-card:hover:not(.locked) { border-color: rgba(201, 162, 39, 0.5); }
.ability-card.selected { border-color: var(--gold); background: rgba(201, 162, 39, 0.06); }
.ability-card.locked { cursor: default; border-color: rgba(201, 162, 39, 0.4); background: rgba(201, 162, 39, 0.04); }

.ability-card__name { font-family: 'Cinzel', serif; font-size: 0.9rem; color: var(--gold-light); margin-bottom: 0.2rem; }
.ability-card__desc { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; }
.ability-card__passive { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.4; }
.ability-card__active { font-size: 0.82rem; color: var(--gold-light); margin-top: 0.2rem; line-height: 1.4; }
.ability-card__cd { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.2rem; }

.ability-card__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }

.ability-tag { font-size: 0.65rem; padding: 0.1rem 0.4rem; border-radius: 8px; border: 1px solid var(--border); color: var(--text-muted); }
.ability-tag--active { border-color: var(--gold); color: var(--gold); }
.ability-tag--passive { border-color: rgba(100, 180, 100, 0.5); color: #80c080; }
.ability-tag--locked { border-color: rgba(201, 162, 39, 0.5); color: var(--gold); font-style: italic; }

.ability-check {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; transition: all 0.15s;
}

.ability-card.selected .ability-check { border-color: var(--gold); background: var(--gold); color: var(--bg-deep); }
.ability-card.locked .ability-check { border-color: var(--gold); background: rgba(201, 162, 39, 0.2); color: var(--gold); }

/* Vrozené rasové schopnosti */
.ability-card--innate { border-color: rgba(93, 187, 122, 0.35); background: rgba(93, 187, 122, 0.04); }
.ability-card--innate:hover { border-color: rgba(93, 187, 122, 0.5) !important; }
.ability-tag--innate { border-color: rgba(93, 187, 122, 0.5); color: #5dbb7a; }
.ability-check--innate { border-color: rgba(93, 187, 122, 0.5) !important; background: rgba(93, 187, 122, 0.1) !important; color: #5dbb7a !important; font-size: 0.85rem; }

/* Prerekvizity */
.ability-prereq { font-size: 0.72rem; margin-top: 0.35rem; padding: 0.25rem 0.5rem; border-radius: 4px; line-height: 1.4; }
.ability-prereq--met { color: #5dbb7a; background: rgba(93, 187, 122, 0.08); border: 1px solid rgba(93, 187, 122, 0.25); }
.ability-prereq--unmet { color: #e07070; background: rgba(224, 112, 112, 0.08); border: 1px solid rgba(224, 112, 112, 0.25); }
.ability-card.prereq-locked { opacity: 0.55; cursor: not-allowed; }
.ability-card.prereq-locked:hover { border-color: rgba(224, 112, 112, 0.4); }

/* Level groups */
.ability-level-group { margin-top: 1.2rem; }
.ability-level-group__header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-dim); }
.ability-level-badge { display: inline-block; font-family: 'Cinzel', serif; font-size: 0.78rem; font-weight: 700; background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold); border-radius: 4px; padding: 0.15rem 0.6rem; letter-spacing: 0.04em; }
.ability-level-count { font-size: 0.78rem; color: var(--text-muted); }

/* Deity picker */
.deity-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem; margin-top: 0.5rem; }

.deity-pick-card {
  display: flex; flex-direction: column; background: var(--bg-card);
  border: 1px solid var(--border-dim); border-radius: 8px; overflow: hidden;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; position: relative;
}

.deity-pick-card:hover { border-color: var(--gold); }
.deity-pick-card.selected { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,162,39,0.25); }
.deity-pick-card--dim { opacity: 0.5; cursor: pointer; }

.deity-pick-card__img { width: 100%; height: 100px; overflow: hidden; }
.deity-pick-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.deity-pick-card__body { padding: 0.6rem 0.8rem; }
.deity-pick-card__name { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--gold); margin-bottom: 0.2rem; }
.deity-pick-card__align { font-size: 0.72rem; color: var(--text-muted); }
.deity-pick-card__bonuses { font-size: 0.78rem; color: var(--text); margin-top: 0.3rem; }
.deity-pick-card__ability { font-size: 0.78rem; color: var(--gold-light); margin-top: 0.3rem; }
.deity-pick-card__desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.3; }
.deity-pick-card__unavail { font-size: 0.72rem; color: #e07070; margin-top: 0.3rem; }
.deity-pick-card .ability-check { position: absolute; top: 0.4rem; right: 0.4rem; }

/* Expandable deity group */
.deity-pick-card--group { grid-column: 1 / -1; }
.deity-expand-arrow { font-size: 0.7rem; margin-left: 0.3rem; cursor: pointer; }
.deity-sub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; padding: 0.8rem; border-top: 1px solid var(--border); }
.deity-sub-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; transition: border-color 0.2s; }
.deity-sub-card:hover { border-color: rgba(201,162,39,0.4); }
.deity-sub-card.selected { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,162,39,0.25); }
.deity-sub-card .ability-check { position: absolute; top: 0.4rem; right: 0.4rem; }

/* Select button (replaces old checkbox circle) */
.ability-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 6px;
  background: rgba(201, 162, 39, 0.06);
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.ability-select-btn:hover:not(:disabled) {
  background: rgba(201, 162, 39, 0.15);
  border-color: var(--gold);
}
.ability-select-btn--selected {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}
.ability-select-btn--selected:hover {
  background: rgba(201, 162, 39, 0.8);
}
.ability-select-btn--locked {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}
.ability-select-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Deity card image */
.deity-card__img {
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  margin: -1rem -1rem 0.8rem;
  width: calc(100% + 2rem);
}
.deity-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
}
