/* Locations index + detail */

.locations-section-tabs,
.locations-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.locations-section-tab,
.locations-hub-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-muted);
  padding: 0.38rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.locations-section-tab.is-active,
.locations-hub-tab.is-active,
.locations-section-tab:hover,
.locations-hub-tab:hover,
.locations-section-tab:focus-visible,
.locations-hub-tab:focus-visible {
  color: var(--accent);
  border-color: rgba(51, 255, 167, 0.28);
  background: rgba(51, 255, 167, 0.08);
}

.locations-region__hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.flow-nav a.locations-nav-link.is-active {
  color: var(--accent);
}

.locations-index {
  display: grid;
  gap: 1.25rem;
}

.locations-region {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.locations-region__head {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.locations-region__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.locations-region__en {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.locations-region__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.locations-region__item + .locations-region__item {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.locations-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
}

a.locations-row:hover,
a.locations-row:focus-visible {
  background: rgba(51, 255, 167, 0.05);
}

.locations-row__main {
  min-width: 0;
}

.locations-row__title {
  display: block;
  font-weight: 700;
}

.locations-row__sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.locations-row__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.locations-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.locations-tag--category {
  color: var(--accent);
  border-color: rgba(51, 255, 167, 0.18);
  background: rgba(51, 255, 167, 0.07);
}

.location-complex-nav {
  margin: 0.75rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.location-complex-nav__title {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.location-complex-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.location-complex-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
}

.location-complex-nav__link.is-current {
  border-color: rgba(51, 255, 167, 0.35);
  background: rgba(51, 255, 167, 0.1);
  color: var(--accent);
}

.location-resident-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.location-resident-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
}

.location-resident-tab.is-active {
  border-color: rgba(51, 255, 167, 0.35);
  background: rgba(51, 255, 167, 0.1);
  color: var(--accent);
}

.location-resident-tab__count {
  opacity: 0.85;
  font-size: 0.78rem;
}

.location-resident-panel[hidden] {
  display: none;
}

.location-resident-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.location-resident-list li {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.location-resident-list .entity-link {
  padding: 0.55rem 0.65rem;
}

.location-loot-note {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.location-loot-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.location-loot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.location-loot-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
}

.location-loot-tab.is-active {
  border-color: rgba(51, 255, 167, 0.35);
  background: rgba(51, 255, 167, 0.1);
  color: var(--accent);
}

.location-loot-tab__count {
  opacity: 0.85;
  font-size: 0.78rem;
}

.location-loot-panels {
  padding: 0.85rem;
}

.location-loot-panel[hidden] {
  display: none;
}

.location-loot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.location-loot-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.location-loot-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.location-loot-row:first-child {
  padding-top: 0;
}

.location-loot-row__item,
.location-loot-row__sources {
  min-width: 0;
}

.location-loot-npc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.location-loot-npc-list .entity-link {
  width: 100%;
}

.entity-empty--inline {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
}

.location-header__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(51, 255, 167, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

@media (max-width: 720px) {
  .locations-row {
    grid-template-columns: 1fr;
  }

  .locations-row__meta {
    justify-content: flex-start;
  }

  .location-loot-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}
