/* =========================================================
   WOV (Wallet of Vote Points) - Modal UI (Clean Full CSS)
   Uses existing classes:
   .wov-open-btn, .wov-modal, .wov-backdrop, .wov-window,
   .wov-close, .wov-title, .wov-sub,
   .wov-wallet, .wov-catalog, .wov-item, .wov-btn, etc.
   ========================================================= */

/* ---------- Open Button ---------- */
.wov-open-btn {
  padding: 9px 14px;
  background: linear-gradient(135deg, #b58b2a, #ffcc55);
  border: none;
  color: #111;
  font-weight: 800;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(255, 204, 85, 0.35);
  transition: transform .12s ease, filter .12s ease;
}
.wov-open-btn:hover { filter: brightness(1.03); transform: translateY(-1px); }
.wov-open-btn:active { transform: translateY(0px); }

/* ---------- Modal Overlay ---------- */
.wov-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 24px);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

/* Open state */
.wov-modal.is-open {
  display: flex;
}

/* Backdrop (click to close usually) */
.wov-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* ---------- Main Window (BIGGER) ---------- */
.wov-window {
  position: relative;
  z-index: 1;

  /* BIG size */
  width: min(1180px, 96vw);
  height: min(82vh, 860px);

  /* Layout */
  display: flex;
  flex-direction: column;

  /* Visual */
  background: linear-gradient(180deg, rgba(18,18,22,.98), rgba(10,10,12,.98));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: 0 25px 80px rgba(0,0,0,.55);
  color: #eee;

  /* Spacing */
  padding: 18px;
  overflow: hidden; /* so inner areas scroll */
}

/* ---------- Header ---------- */
.wov-title {
  font-size: 22px;
  line-height: 1.15;
  color: #ffc107;
  margin: 0 0 6px 0;
  padding-right: 44px; /* space for close btn */
}

.wov-sub {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin: 0 0 14px 0;
  padding-right: 44px;
}

/* Close button */
.wov-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.wov-close:hover {
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95);
  transform: translateY(-1px);
}
.wov-close:active { transform: translateY(0px); }

/* ---------- Wallet Summary Strip ---------- */
.wov-wallet {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px;
  border-radius: 12px;

  margin: 0 0 14px 0;
}

.wov-wallet span {
  color: rgba(255,255,255,.65);
  font-size: 13px;
}

.wov-wallet b {
  color: #fff;
  font-size: 14px;
}

/* ---------- Main Content Area ---------- */
/* Catalog becomes the scroll area */
/* ---------- Main Content Area ---------- */
.wov-catalog {
  flex: 1;
  overflow: auto;
  padding-right: 6px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Two-column merchant layout (flex-based, no fr) */
@media (min-width: 980px) {
  .wov-catalog {
    flex-direction: row;
    flex-wrap: wrap;
  }

}

/* ---------- Item Card ---------- */
.wov-item {
  width: calc(50% - 6px);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 12px 12px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.wov-item:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}

.wov-item-name {
  font-weight: 700;
  color: rgba(255,255,255,.92);
}

.wov-item-cost {
  color: #ffc107;
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.wov-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.55);
  cursor: not-allowed;
  font-weight: 700;
  transition: transform .12s ease, filter .12s ease, background .12s ease;
}

.wov-btn.can-buy {
  border: none;
  background: linear-gradient(135deg, #b58b2a, #ffcc55);
  color: #111;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 204, 85, 0.18);
}
.wov-btn.can-buy:hover { filter: brightness(1.03); transform: translateY(-1px); }
.wov-btn.can-buy:active { transform: translateY(0px); }

/* ---------- States ---------- */
.wov-loading,
.wov-error {
  text-align: center;
  padding: 40px 10px;
  color: rgba(255,255,255,.65);
}

/* ---------- Scrollbars (webkit) ---------- */
.wov-catalog::-webkit-scrollbar { width: 10px; }
.wov-catalog::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 999px;
}
.wov-catalog::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.18);
}

/* ---------- Top Bar (Character Selector) ---------- */
.wov-topbar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;

  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;

  padding: 12px 12px;
  margin: 0 0 14px 0;
}

.wov-topbar-left { flex: 1; min-width: 260px; }
.wov-topbar-right { display: flex; align-items: center; }

.wov-field { display: flex; flex-direction: column; gap: 6px; }
.wov-label {
  font-size: 12px;
  color: rgba(255,255,255,.70);
  font-weight: 700;
  letter-spacing: .2px;
}

.wov-character-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);

  outline: none;
  font-weight: 700;
}

.wov-character-select:focus {
  border-color: rgba(255,204,85,.45);
  box-shadow: 0 0 0 3px rgba(255,204,85,.12);
}

.wov-helper {
  font-size: 12px;
  color: rgba(255,255,255,.60);
}

.wov-delivery-pill {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,193,7,.10);
  border: 1px solid rgba(255,193,7,.20);
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}

.wov-delivery-pill b {
  color: #ffc107;
}

/* ---------- Tabs ---------- */
.wov-tabs {
  display: flex;
  gap: 10px;
  align-items: center;

  margin: 0 0 12px 0;
  padding: 10px;
  border-radius: 14px;

  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.wov-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.78);
  font-weight: 800;

  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;

  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}

.wov-tab:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.92);
}

.wov-tab.is-active {
  border: 1px solid rgba(255,193,7,.22);
  background: rgba(255,193,7,.10);
  color: #ffc107;
}

.wov-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 80, 80, .10);
  border: 1px solid rgba(255, 80, 80, .22);
  color: rgba(255,255,255,.88);
  font-weight: 700;
}

.wov-vote-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, #b58b2a, #ffcc55);
  color: #111;
  box-shadow: 0 10px 24px rgba(255, 204, 85, 0.18);
}
.wov-vote-btn:hover { filter: brightness(1.03); transform: translateY(-1px); }

/* ---------- Panels + scrolling ---------- */
.wov-body {
  flex: 1;
  overflow: hidden; /* panels handle scroll */
  display: block;
}

.wov-panel {
  display: none;
  height: 100%;
  overflow: auto;
  padding-right: 6px;
}

.wov-panel.is-active {
  display: block;
}

/* panel scrollbar */
.wov-panel::-webkit-scrollbar { width: 10px; }
.wov-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 999px;
}
.wov-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.18);
}

/* Mobile tabs wrap */
@media (max-width: 860px) {
  .wov-tabs { flex-wrap: wrap; }
  .wov-tab { flex: 1; min-width: 120px; }
}

/* Mobile */
@media (max-width: 860px) {
  .wov-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .wov-topbar-right {
    justify-content: flex-start;
  }
  .wov-delivery-pill {
    width: 100%;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .wov-window {
    width: 98vw;
    height: 88vh;
    border-radius: 14px;
    padding: 14px;
  }

  .wov-title { font-size: 20px; }
  .wov-wallet {
    flex-direction: column;
    align-items: flex-start;
  }
}