/* Arab Wuwa entity detail pages: weapons, echoes, sonata sets, and teams.
   Loaded only by generated entity pages. Works in both light and dark themes
   and in both text directions through the shared shell tokens. */

.aw-entity-hero {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.aw-entity-art {
  width: 168px;
  height: 168px;
  flex: 0 0 auto;
  border-radius: var(--radius, 14px);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aw-entity-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.aw-entity-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.aw-entity-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
}

.aw-entity-badge--rarity-5 { color: #f59e0b; border-color: rgba(245, 158, 11, .5); }
.aw-entity-badge--rarity-4 { color: #9d4edd; border-color: rgba(157, 78, 221, .5); }
.aw-entity-badge--rarity-3 { color: #0ea5e9; border-color: rgba(14, 165, 233, .5); }
.aw-entity-badge--rarity-2 { color: #22c55e; border-color: rgba(34, 197, 94, .5); }
.aw-entity-badge--rarity-1 { color: hsl(var(--muted-foreground)); }

.aw-entity-badge--easy { color: hsl(var(--success)); border-color: hsl(var(--success) / .5); }
.aw-entity-badge--mid { color: hsl(var(--info)); border-color: hsl(var(--info) / .5); }
.aw-entity-badge--hard { color: hsl(var(--warning)); border-color: hsl(var(--warning) / .5); }
.aw-entity-badge--extreme { color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / .5); }

.aw-entity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.aw-entity-stat {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm, 10px);
  padding: 12px 14px;
}

.aw-entity-stat span {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.aw-entity-stat b {
  display: block;
  font-size: 18px;
  margin-top: 2px;
}

/* Character and entity card grids */

.aw-entity-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

a.aw-entity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm, 10px);
  padding: 14px 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast, .15s) var(--ease, ease);
}

a.aw-entity-card:hover,
a.aw-entity-card:focus-visible {
  border-color: hsl(var(--ring));
}

a.aw-entity-card img {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}

a.aw-entity-card small {
  color: hsl(var(--muted-foreground));
  font-size: 11px;
}

/* Team lineup */

.aw-entity-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.aw-entity-member {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius, 14px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.aw-entity-portrait {
  width: 104px;
  height: 104px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}

.aw-entity-member a.aw-entity-name {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.aw-entity-member a.aw-entity-name:hover,
.aw-entity-member a.aw-entity-name:focus-visible {
  text-decoration: underline;
}

.aw-entity-loadout {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.aw-entity-mini {
  background: hsl(var(--card-strong));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 4px;
  display: flex;
}

.aw-entity-mini img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.aw-entity-set {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.aw-entity-set img {
  width: 28px;
  height: 28px;
}

.aw-entity-set--block {
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  margin-bottom: 10px;
}

.aw-entity-set--block img {
  width: 30px;
  height: 30px;
}

/* Rotations */

.aw-entity-rotation {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius, 14px);
  padding: 16px;
  margin-bottom: 14px;
  background: hsl(var(--card));
}

.aw-entity-rotation-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.aw-entity-rotation-head h3 {
  margin: 0;
  font-size: 17px;
}

.aw-entity-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.aw-entity-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: hsl(var(--card-strong));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm, 10px);
  padding: 12px 14px;
}

.aw-entity-step img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
  flex: 0 0 auto;
}

.aw-entity-step b {
  display: block;
  margin-bottom: 2px;
}

.aw-entity-step p {
  margin: 0;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

/* Values highlighted inside official game descriptions */

.aw-entity-page .highlight-1,
.aw-entity-page .highlight-2,
.aw-entity-page .highlight-3,
.aw-entity-page .highlight-4,
.aw-entity-page .highlight-5 {
  color: #f59e0b;
  font-weight: 700;
}

@media (max-width: 640px) {
  .aw-entity-art {
    width: 132px;
    height: 132px;
  }

  .aw-entity-step img {
    width: 44px;
    height: 44px;
  }
}

/* Entity pages show the kicker as plain text, without the accent bar. */
.aw-entity-page .aw-legal-kicker::before {
  display: none;
}

/* One block per Sonata Set on an Echo page. */
.aw-entity-setblock + .aw-entity-setblock {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid hsl(var(--border) / 0.6);
}

.aw-entity-usedby {
  margin: 10px 0 0;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}
