/* Kalandorok — fantasy névjegykártya névjegyzék */

.adv-directory {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.adv-directory::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 45% at 12% 0%, rgba(160, 110, 50, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 85%, rgba(70, 50, 120, 0.1), transparent 50%);
}

.adv-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: flex-end;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.adv-kicker {
  margin: 0 0 .2rem;
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.adv-title {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: .04em;
}
.adv-lead {
  margin: 0;
  max-width: 34rem;
}
.adv-count {
  display: grid;
  justify-items: end;
  gap: .1rem;
  margin: 0;
  line-height: 1.1;
}
.adv-count-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
}
.adv-count-label {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.adv-empty { margin: .5rem 0 0; }

.adv-toolbar {
  display: grid;
  gap: .75rem;
  margin: 0 0 1.2rem;
  padding: .85rem .9rem 1rem;
  border: 1px solid rgba(180, 150, 100, 0.28);
  background:
    linear-gradient(180deg, rgba(42, 32, 22, 0.72), rgba(14, 11, 16, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.06);
}
.adv-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .65rem;
  align-items: center;
}
.adv-search-field {
  flex: 1 1 14rem;
  margin: 0;
}
.adv-search-field input,
.adv-filter select,
.adv-filter input[type="number"] {
  width: 100%;
  min-height: 2.35rem;
  padding: .45rem .7rem;
  font: inherit;
  color: inherit;
  border: 1px solid rgba(180, 150, 100, 0.35);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0;
}
.adv-filter input[type="number"] {
  -moz-appearance: textfield;
}
.adv-filter input[type="number"]::-webkit-outer-spin-button,
.adv-filter input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.adv-search-field input:focus,
.adv-filter select:focus,
.adv-filter input[type="number"]:focus {
  outline: none;
  border-color: rgba(201, 168, 106, 0.7);
  box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.25);
}
.adv-search-status {
  font-size: .78rem;
  min-height: 1.1em;
}
.adv-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem .75rem;
  padding-top: .15rem;
  border-top: 1px solid rgba(180, 150, 100, 0.16);
}
.adv-filter {
  display: grid;
  gap: .28rem;
  margin: 0;
  min-width: 0;
}
.adv-filter-label {
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.adv-filter select {
  cursor: pointer;
  appearance: none;
  color: #e6e8ed;
  color-scheme: dark;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(201, 168, 106, 0.85) 50%),
    linear-gradient(135deg, rgba(201, 168, 106, 0.85) 50%, transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35));
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px),
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}
.adv-filter select option,
.adv-filter select optgroup {
  background-color: #16120f;
  color: #e6e8ed;
}
.adv-directory.is-searching .adv-results {
  opacity: .55;
  transition: opacity .15s ease;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
}

.adv-card {
  position: relative;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: .75rem .85rem;
  align-items: start;
  padding: .85rem .9rem 2.1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(180, 150, 100, 0.28);
  background:
    linear-gradient(165deg, rgba(42, 34, 26, 0.92), rgba(14, 12, 16, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08);
  transition:
    border-color .2s ease,
    transform .2s ease,
    background .2s ease;
}
.adv-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(201, 168, 106, 0.18), transparent 55%);
  transition: opacity .25s ease;
}
.adv-card:hover,
.adv-card:focus-visible {
  border-color: rgba(201, 168, 106, 0.55);
  transform: translateY(-2px);
  outline: none;
}
.adv-card:hover .adv-card-glow,
.adv-card:focus-visible .adv-card-glow {
  opacity: 1;
}
.adv-card:hover .adv-card-cta,
.adv-card:focus-visible .adv-card-cta {
  opacity: 1;
  transform: translateX(0);
}

.adv-card-portrait {
  position: relative;
  z-index: 1;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: .35rem;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 106, 0.45);
  background: rgba(0, 0, 0, 0.35);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 230, 180, 0.08);
}
.adv-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adv-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .28rem;
  min-width: 0;
}
.adv-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #f0e6d2;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.adv-card-level {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}
.adv-level-badge {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1;
}
.adv-level-label {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.adv-card-meta {
  font-size: .82rem;
  line-height: 1.35;
  color: #cfc3ae;
}
.adv-card-clan {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .15rem;
  min-width: 0;
}
.adv-clan-crest {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 168, 106, 0.35);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 2px;
}
.adv-clan-crest--empty {
  display: inline-block;
  background:
    linear-gradient(135deg, rgba(201, 168, 106, 0.25), rgba(40, 30, 20, 0.5));
}
.adv-clan-name {
  font-size: .8rem;
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adv-card-place {
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-card-magic {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .28rem .45rem;
  margin-top: .35rem;
  font-size: .72rem;
  color: var(--adv-magic, #d2b896);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.adv-card-magic--sotet { --adv-magic: #cbb6e6; }
.adv-card-magic--feny { --adv-magic: #e0c878; }
.adv-card-magic--papi { --adv-magic: #d2b896; }
.adv-card-magic--gyogyito { --adv-magic: #9bc4a6; }
.adv-magic-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 2px;
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255, 230, 190, 0.22);
}
.adv-magic-label {
  font-family: var(--font-display);
  letter-spacing: .04em;
  font-weight: 600;
}
.adv-magic-shape {
  color: var(--ink-muted, #8a7a68);
  font-style: italic;
}
.adv-magic-chip {
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .9;
}
.adv-magic-chip--curse { color: #8a4a4a; }
.adv-magic-chip--bless { color: #5a7a62; }

.adv-card-cta {
  position: absolute;
  z-index: 1;
  right: .85rem;
  bottom: .55rem;
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}

.adv-pager {
  margin-top: 1.35rem;
}

@media (max-width: 820px) {
  .adv-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
  }
  .adv-search-field {
    flex: 1 1 auto;
  }
  .adv-search-field input,
  .adv-filter select,
  .adv-filter input[type="number"] {
    min-height: var(--touch-min, 2.5rem);
  }
  .adv-search-go,
  .adv-toolbar [data-adv-clear] {
    min-height: var(--touch-min, 2.5rem);
    width: 100%;
  }
  .adv-search-status {
    min-height: 1.25rem;
  }
  .adv-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adv-card-cta {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .adv-filters {
    grid-template-columns: 1fr;
  }
  .adv-grid {
    grid-template-columns: 1fr;
  }
  .adv-card {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    padding-bottom: 1.85rem;
  }
  .adv-card-portrait {
    width: 4.5rem;
    height: 4.5rem;
  }
  .adv-count {
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adv-card,
  .adv-card-glow,
  .adv-card-cta {
    transition: none;
  }
  .adv-card:hover,
  .adv-card:focus-visible {
    transform: none;
  }
}
