/* ===== Layout container ===== */
.wor-hero-dir {
  width: 100%;
  max-width: 95%;
  margin: 0 auto;
  padding: 14px 10px 28px;
  color: #e8e8e8;
  position: relative;
}

/* ==========================================================================
   FILTER DRAWER (PATCH)
   - Drawer slides down from top and hides completely when collapsed
   - Tab stays attached to the drawer and remains visible
   - Closing is smooth (panel doesn't "instantly collapse")
   - Dropdowns are not clipped
   ========================================================================== */

.wor-hero-dir__drawer{
  position: relative;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto 18px;
  /* IMPORTANT: do NOT hide overflow or dropdowns will clip */
  overflow: visible;
  z-index: 5;
  margin-top: -37px;
}
/* When collapsed, only the PANEL should ignore clicks (so content below is clickable) */
.wor-hero-dir__drawer.is-collapsed .wor-hero-dir__drawer-panel {
  pointer-events: none;
}
.wor-hero-dir__drawer-tabText,.wor-hero-dir__drawer-caret{
    font-size:25px;
}
/* Keep the tab clickable always */
.wor-hero-dir__drawer-tab {
  pointer-events: auto;
  z-index: 9999;
}
/* Collapsed wrapper should not cover the page */
.wor-hero-dir__drawer.is-collapsed {
  height: 0 !important;
}

/* Ensure the tab still displays even with wrapper height 0 */

/* Collapsed vs open state classes are driven by JS */
.wor-hero-dir__drawer.is-collapsed{}
.wor-hero-dir__drawer.is-open{}

/* This is the sliding panel */
.wor-hero-dir__drawer-panel{
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: rgb(7 15 20 / 97%);
  border: 1px solid rgba(255, 208, 0, 0.18);

  /* bottom corners only (top corners "normal") */
  border-radius: 0 0 18px 18px;

  /* add border-colored glow + depth */
  box-shadow:
    0 0 0 1px rgba(255, 208, 0, 0.18),
    0 18px 50px rgba(0, 0, 0, 0.55);

  position: relative;
  overflow: visible;

  /* Animated states */
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;

  /* Slower + smoother motion */
  transition:
    transform 1500ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1500ms ease;

  will-change: transform, opacity;
}

/* Open: panel fully visible */
.wor-hero-dir__drawer.is-open .wor-hero-dir__drawer-panel{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Collapsed: panel fully hidden (NOT visible like a dead box) */
.wor-hero-dir__drawer.is-collapsed .wor-hero-dir__drawer-panel{
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

/* Drawer inner padding wrapper */
.wor-hero-dir__top{
  padding: 80px 10px 15px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

/* The visible tab (button) that is always present and attached */
.wor-hero-dir__drawer-tab{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 5px;

  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255, 208, 0, 0.45);
  border-radius: 14px;

  padding: 9px 22px;
  cursor: pointer;

  color: #ffd000;
  font-weight: 800;
  letter-spacing: 0.6px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  z-index: 30;
  box-shadow: 0 0 0 1px rgba(255, 208, 0, 0.18), 0 10px 25px rgba(0,0,0,0.6);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.wor-hero-dir__drawer-tab:hover{
  background: rgba(255, 208, 0, 0.06);
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 208, 0, 0.28), 0 12px 30px rgba(0,0,0,0.65);
}

.wor-hero-dir__drawer-caret{
  display: inline-block;
  transition: transform 260ms ease;
  opacity: 0.9;
}

.wor-hero-dir__drawer.is-open .wor-hero-dir__drawer-caret{
  transform: rotate(180deg);
  
}

/* IMPORTANT: make dropdown panels render above the drawer */
.wor-hero-dir__dropdown-panel{
  z-index: 9999;
}

/* On small screens, reduce padding a bit */
@media (max-width: 900px){
  .wor-hero-dir__top{
    padding: 80px 12px 34px;
  }
}

/* ==========================================================================
   END FILTER DRAWER (PATCH)
   ========================================================================== */

/* ===== Icon rows ===== */
.wor-hero-dir__icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 0px 0;
}

.wor-hero-dir__icon-btn {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.wor-hero-dir__icon-btn img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.wor-hero-dir__icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 208, 0, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 208, 0, 0.15);
}

.wor-hero-dir__icon-btn[aria-pressed="true"] {
  border-color: rgba(255, 208, 0, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 208, 0, 0.25);
}

.wor-hero-dir__icon-fallback {
  display: flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffd000;
}

/* Rarity button can use background image */
.wor-hero-dir__icon-btn--rarity {
  background-size: cover;
  background-position: center;
}

.wor-hero-dir__rarity-label {
  position: absolute;
  bottom: 4px;
  left: 6px;
  right: 6px;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* ===== Search strip ===== */
.wor-hero-dir__search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 520px) 1fr;
  gap: 14px;
  align-items: center;
  margin: 0px 0 0px;
}

.wor-hero-dir__search-wrap {
  display: flex;
  justify-content: center;
}

.wor-hero-dir__search {
  width: 100%;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid rgba(255, 208, 0, 0.8);
  outline: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
}

.wor-hero-dir__search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .wor-hero-dir__search-strip {
    grid-template-columns: 1fr;
  }
}

/* ===== Dropdowns ===== */
.wor-hero-dir__dropdowns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.wor-hero-dir__dropdown {
  position: relative;
}

.wor-hero-dir__dropdown-btn {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wor-hero-dir__caret {
  opacity: 0.75;
}

.wor-hero-dir__dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 999;
  width: 260px;
  max-height: 360px;
  overflow: auto;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px;
  display: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.wor-hero-dir__dropdown.is-open .wor-hero-dir__dropdown-panel {
  display: block;
}

.wor-hero-dir__dropdown-empty {
  padding: 10px;
  opacity: 0.8;
}

/* Checkbox styling (dark UI + colored box) */
.wor-hero-dir__check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.wor-hero-dir__check:hover {
  background: rgba(255, 255, 255, 0.06);
}

.wor-hero-dir__check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wor-hero-dir__check-ui {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(255, 208, 0, 0.7);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
  display: inline-block;
  flex: 0 0 auto;
}

.wor-hero-dir__check input:checked + .wor-hero-dir__check-ui {
  background: rgba(255, 208, 0, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 208, 0, 0.25);
}

.wor-hero-dir__check-label {
  font-size: 14px;
  line-height: 1.2;
}

/* Clear button */
.wor-hero-dir__clear {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffd000;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* Status */
.wor-hero-dir__status {
  margin: 30px 0 8px;
  text-align: center;
  opacity: 0.9;
}

/* ===== GRID WRAP + GRID (centered, auto-fit) ===== */
.wor-hero-dir__grid-wrap {
  display: flex;
  justify-content: center;
}

/* Wrap grid + pager vertically (so pager stays UNDER the grid) */
.wor-hero-dir__grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Make pager centered under the grid */
.wor-hero-dir__pager {
  width: 100%;
  display: flex;
  justify-content: center;
}

.wor-hero-dir__grid {
  /* shrink-wrap columns so the whole grid can center */
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: repeat(auto-fit, 125px);
  gap: 14px;

  /* padding so it doesn't hug edges on mobile */
  padding: 10px 14px 0;

  /* keep items tidy + hard override vs earlier rules */
  align-items: start;
  justify-content: center !important;
  justify-items: center !important;
}

/* ===== Hero link wraps ONLY the card ===== */
.wor-hero-card {
  display: inline-block;
  width: 105px;
  height: 147px;
  text-decoration: none;
  color: inherit;
}

/* ===== Card styling (old look) ===== */
.hero-card {
  position: relative;
  width: 105px;
  height: 147px;
  border: 2px solid gold;
  border-radius: 8px;
  overflow: visible;
  font-family: 'Orbitron', sans-serif;
  color: white;

  /* rarity background behind the portrait */
  background-color: black;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Optional: if you prefer using a real <img> layer instead of background-image */
.rarity-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
  z-index: 1;
}

.hero-img-wrapper {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  overflow: hidden;
  z-index: 2;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faction-wrapper {
  position: absolute;
  top: 6px;
  left: -23.5px;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 5;
}

.faction-stack {
  position: relative;
}

.faction-badge {
  width: 45px;
  height: auto;
  z-index: 20;
}

.faction-lord {
  position: absolute;
  top: -7px;
  left: 5px;
  width: 35px;
  height: 48px;
  z-index: 6;
  pointer-events: none;
}

.class-top-corner {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #111;
  padding: 0 0 2px 2px;
  border-bottom-left-radius: 12px;
  border-top-right-radius: 6px;
  z-index: 10;
}

.class-top-corner img {
  width: 30px;
  height: 30px;
}

.dmg-icon {
  position: absolute;
  bottom: 26px;
  right: 0px;
  width: 26px;
  z-index: 6;
}

.stars-overlay {
  position: absolute;
  bottom: 28px;
  left: 0;
  padding: 0 6px;
  background: #111;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  font-size: 11px;
  color: #ffea00;
  z-index: 10;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  gap: 2px;
  align-items: center;
}

.stars-overlay i {
  font-size: 12px;
}

.name-bar-glass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.hero-name {
  font-weight: 700;
  text-shadow: 0 0 3px black;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* responsive squeeze */
  font-size: clamp(11px, 2.6vw, 16px);
  line-height: 1.1;

  padding: 6px 8px;
  width: 100%;
  text-align: center;
}

/* ===== Card hover + click feel (glow + slight scale + press) ===== */
.wor-hero-card .hero-card {
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  will-change: transform;
}

.wor-hero-card:hover .hero-card,
.wor-hero-card:focus-visible .hero-card {
  transform: scale(1.035);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45), 0 0 28px rgba(255, 215, 0, 0.2);
  filter: brightness(1.05);
}

.wor-hero-card:focus-visible {
  outline: none;
}

.wor-hero-card:active .hero-card {
  transform: scale(1.01) translateY(2px);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.25);
  filter: brightness(0.98);
}

/* ===== Empty state ===== */
.wor-hero-dir__empty {
  padding: 30px 10px;
  text-align: center;
  opacity: 0.8;
}

/* ===== Pager (legacy) ===== */
.wor-pager {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

.wor-pager__btn {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.wor-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wor-pager__info {
  opacity: 0.9;
}

/* ===== Show More (new) ===== */
.wor-showmore{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}

.wor-showmore__btn{
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 208, 0, 0.35);
  color: #ffd000;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.wor-showmore__btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(255, 208, 0, 0.14);
  background: rgba(255, 208, 0, 0.06);
}

.wor-showmore__btn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}
.wor-hero-dir__top {
  padding-bottom: 0px; /* instead of 32px */
}

.wor-hero-dir__dropdowns {
  margin-bottom: 0;
}

.wor-hero-dir__drawer-panel {
  padding-bottom: 14px;
}
.wor-hero-dir__drawer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}
.wor-hero-dir.drawer-open .wor-hero-dir__grid-wrap {
  margin-top: 320px; /* height of open drawer */
  transition: margin-top 420ms ease;
}

