/* ================================================================
   wtb.css — Aba "Procura" (Want to Buy)
   Reutiliza variáveis e componentes base de marketplace.css.
   ================================================================ */

/* ── Badge "Procurando / Talento" ───────────────────────────────── */
.wtb-card { position: relative; }

.wtb-card-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(99,179,237,.13);
  color: #63b3ed;
  border: 1px solid rgba(99,179,237,.28);
  border-radius: 4px; padding: 2px 7px;
  pointer-events: none; white-space: nowrap;
}
.wtb-card-badge--talent {
  background: rgba(167,139,250,.13);
  color: var(--tc, #a78bfa);
  border-color: rgba(167,139,250,.28);
}

/* ── Pokémon card helpers ───────────────────────────────────────── */
.wtb-ball-row { margin: 4px 0 6px; }
.wtb-ball-any { font-size: .74rem; color: rgba(255,255,255,.32); font-style: italic; }
.wtb-obs { font-size: .72rem; color: rgba(255,255,255,.48); line-height: 1.45; margin-top: 5px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Payment chips ──────────────────────────────────────────────── */
.wtb-payment { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wtb-pay-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; border-radius: 6px; padding: 3px 9px; border: 1px solid transparent; }
.wtb-pay-kk  { color:#fbbf24; border-color:rgba(251,191,36,.32); background:rgba(251,191,36,.09); }
.wtb-pay-dd  { color:#a78bfa; border-color:rgba(167,139,250,.32); background:rgba(167,139,250,.09); }
.wtb-pay-brl { color:#34d399; border-color:rgba(52,211,153,.32);  background:rgba(52,211,153,.09); }

/* ================================================================
   TALENT CARD — slots e itens
   ================================================================ */
.wtb-talent-card { border-color: rgba(167,139,250,.20); }

.wtb-talent-card-header {
  padding: 36px 14px 4px; /* espaço do badge */
  display: flex; flex-direction: column; gap: 3px;
}
.wtb-talent-card-pkg-name {
  font-size: .92rem; font-weight: 700; color: #fff;
  line-height: 1.2;
}
.wtb-talent-card-have-summary {
  font-size: .68rem; color: rgba(255,255,255,.35);
  font-style: italic;
}

/* Slots compactos no card */
.wtb-ts-slots {
  display: flex; flex-direction: column; gap: 0;
  margin: 6px 0 4px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.wtb-ts-slot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px;
  padding: 5px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .72rem;
}
.wtb-ts-slot--done { opacity: .5; }

.wtb-ts-slot-num {
  font-size: .65rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--tc, #a78bfa);
  flex-shrink: 0; min-width: 42px;
}
.wtb-ts-items { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }

.wtb-ts-item {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px; padding: 1px 6px;
  color: rgba(255,255,255,.78); white-space: nowrap;
}
.wtb-ts-item-qty {
  font-weight: 700; color: var(--tc, #a78bfa);
  font-size: .68rem;
}
.wtb-ts-done { font-size: .68rem; color: rgba(52,211,153,.7); font-weight: 600; }
.wtb-ts-have-note { font-size: .65rem; color: rgba(255,255,255,.28); font-style: italic; align-self: center; }

.wtb-obs--talent { padding: 0 14px 8px; margin-top: 0; }

/* ── Card clicável + hint "ver itens" ───────────────────────────── */
.wtb-card--clickable { cursor: pointer; transition: border-color .18s, transform .15s, box-shadow .18s; }
.wtb-card--clickable:hover { transform: translateY(-2px); border-color: var(--tc, #a78bfa); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
/* "ver itens": inline no rodapé (acima dos botões), nunca sobrepõe as ações */
.wtb-footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wtb-card-open-hint {
  font-size: .62rem; font-weight: 600; letter-spacing: .04em;
  color: var(--tc, #a78bfa); opacity: 0; transition: opacity .18s;
  pointer-events: none; white-space: nowrap;
}
.wtb-card--clickable:hover .wtb-card-open-hint { opacity: .85; }

/* ================================================================
   DETALHE (modal) — itens organizados por slot
   ================================================================ */
.wtb-detail-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(8,10,18,.74); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
  animation: wtbFadeIn .18s ease;
}
@keyframes wtbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wtbSlideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.wtb-detail-modal {
  position: relative; width: 100%; max-width: 540px;
  background: linear-gradient(180deg, rgba(28,30,44,.98), rgba(20,22,34,.98));
  border: 1px solid var(--tc, #a78bfa); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
  padding: 22px 22px 18px;
  animation: wtbSlideUp .22s ease;
}
.wtb-detail-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.65); font-size: .9rem; cursor: pointer;
  transition: background .15s, color .15s;
}
.wtb-detail-close:hover { background: rgba(255,255,255,.12); color: #fff; }

.wtb-detail-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 36px; margin-bottom: 14px; }
.wtb-detail-title { margin: 0; font-size: 1.12rem; font-weight: 700; color: #fff; line-height: 1.25; }
.wtb-detail-time { font-size: .68rem; color: rgba(255,255,255,.4); white-space: nowrap; flex-shrink: 0; }

.wtb-detail-body { display: flex; flex-direction: column; gap: 8px; }

/* Slots no detalhe */
.wtb-dt-slot {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; padding: 10px 12px;
}
.wtb-dt-slot--done { opacity: .55; }
.wtb-dt-slot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wtb-dt-slot-num { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tc, #a78bfa); }

.wtb-dt-items { display: flex; flex-direction: column; gap: 2px; }
.wtb-dt-item {
  display: grid; grid-template-columns: 38px 1fr auto auto; gap: 8px; align-items: center;
  padding: 4px 0; font-size: .8rem; color: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.wtb-dt-item:last-child { border-bottom: none; }
.wtb-dt-item-qty   { font-weight: 700; color: var(--tc, #a78bfa); }
.wtb-dt-item-name  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtb-dt-item-price { font-size: .72rem; color: rgba(255,255,255,.42); text-align: right; }
.wtb-dt-item-total { font-size: .76rem; font-weight: 600; color: #fbbf24; text-align: right; min-width: 56px; }
.wtb-dt-have { margin-top: 6px; font-size: .68rem; color: rgba(255,255,255,.35); font-style: italic; }

.wtb-dt-grandtotal {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px; padding: 10px 12px;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.22);
  border-radius: 10px; font-size: .82rem; color: rgba(255,255,255,.7);
}
.wtb-dt-grandtotal strong { font-size: 1rem; color: #fbbf24; }

/* Pokémon no detalhe */
.wtb-dt-poke { display: flex; gap: 16px; align-items: center; }
.wtb-dt-poke-info { display: flex; flex-direction: column; gap: 6px; }

/* Blocos auxiliares do modal */
.wtb-detail-obs {
  margin-top: 14px; padding: 10px 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; font-size: .8rem; color: rgba(255,255,255,.7);
  line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.wtb-detail-obs-label, .wtb-detail-pay-label {
  display: block; font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 5px;
}
.wtb-detail-pay { margin-top: 14px; }
.wtb-detail-footer { margin-top: 16px; }
.wtb-detail-footer .mk-card-negotiate, .wtb-detail-footer .mk-card-actions { display: flex; }
.wtb-detail-footer .mk-btn { width: 100%; justify-content: center; }

/* ================================================================
   CHOOSER — Pokémon vs Talento
   ================================================================ */
.wtb-chooser-hint { font-size: .88rem; color: rgba(255,255,255,.55); text-align: center; margin: 0 0 18px; }
.wtb-type-chooser { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 8px; }

.wtb-type-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px; cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
  text-align: center;
}
.wtb-type-card:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.wtb-type-card-icon  { font-size: 2.2rem; line-height: 1; }
.wtb-type-card-title { font-size: 1rem; font-weight: 700; color: #fff; }
.wtb-type-card-desc  { font-size: .74rem; color: rgba(255,255,255,.45); line-height: 1.4; }

/* ── Back button ────────────────────────────────────────────────── */
.wtb-back-btn { background:none; border:none; color:rgba(255,255,255,.50); font-size:1.1rem; cursor:pointer; padding:2px 8px 2px 0; margin-right:4px; transition:color .15s; flex-shrink:0; }
.wtb-back-btn:hover { color:#fff; }

/* ================================================================
   PACKAGE BROWSER — lista de pacotes
   ================================================================ */
.wtb-pkg-modal { max-height: 85vh; }
.wtb-pkg-search { margin-bottom: 14px; }

.wtb-pkg-loading { text-align: center; color: rgba(255,255,255,.35); padding: 32px 16px; font-size: .85rem; }

.wtb-pkg-group { margin-bottom: 16px; }
.wtb-pkg-group-hdr {
  font-size: .70rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.wtb-pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.wtb-pkg-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px 12px;
  background: var(--pkgbg, rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s, box-shadow .18s;
  text-align: center;
  position: relative; overflow: hidden;
}
.wtb-pkg-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--pkgc, transparent) 0%, transparent 65%);
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.wtb-pkg-card:hover {
  border-color: color-mix(in srgb, var(--pkgc, #fff) 50%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--pkgc, transparent) 25%, transparent);
}
.wtb-pkg-card:hover::before { opacity: .12; }

/* Frame circular do ícone — igual ao Pacotes tab */
.wtb-pkg-card-icon-frame {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  border: 2px solid color-mix(in srgb, var(--pkgc, #fff) 40%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--pkgc, transparent) 35%, transparent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: box-shadow .18s, border-color .18s;
  flex-shrink: 0;
}
.wtb-pkg-card:hover .wtb-pkg-card-icon-frame {
  box-shadow: 0 0 22px color-mix(in srgb, var(--pkgc, transparent) 55%, transparent);
  border-color: color-mix(in srgb, var(--pkgc, #fff) 70%, transparent);
}
.wtb-pkg-card-icon-frame img {
  width: 38px; height: 38px; object-fit: contain;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pkgc, transparent) 60%, transparent));
}

.wtb-pkg-card-name  { font-size: .76rem; font-weight: 700; color: rgba(255,255,255,.90); line-height: 1.2; }
.wtb-pkg-card-info  { font-size: .63rem; color: rgba(255,255,255,.28); }

/* ================================================================
   CUSTOMIZADOR DE ITENS
   ================================================================ */
.wtb-cst-modal { max-height: 90vh; }

.wtb-cst-modal-title-wrap {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; overflow: hidden;
}

.wtb-cst-header-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  border: 2px solid color-mix(in srgb, var(--pkgc, #fff) 40%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pkgc, transparent) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.wtb-cst-header-icon img {
  width: 28px; height: 28px; object-fit: contain;
}

.wtb-cst-summary-bar {
  display: flex; align-items: center; gap: 6px;
  font-size: .74rem; color: rgba(255,255,255,.50);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; padding: 7px 12px; margin-bottom: 14px;
}
.wtb-cst-summary-dot { color: rgba(255,255,255,.20); }
.wtb-cst-summary-hint { color: rgba(255,255,255,.30); font-style: italic; margin-left: auto; font-size: .68rem; }
.wtb-cst-est-price { color: #fbbf24; font-weight: 700; font-size: .72rem; }

/* Aviso sobre preços NPC */
.wtb-cst-price-hint {
  font-size: .70rem; color: rgba(255,255,255,.30);
  background: rgba(251,191,36,.04);
  border: 1px solid rgba(251,191,36,.10);
  border-radius: 6px; padding: 6px 10px; margin-bottom: 8px;
  line-height: 1.4;
}
.wtb-cst-price-hint strong { color: rgba(251,191,36,.60); }

/* Hint de valor mínimo dentro do campo de KK */
.wtb-pay-min-hint {
  display: block;
  font-size: .68rem;
  color: rgba(251,191,36,.40);
  margin-top: 5px;
  font-style: italic;
  letter-spacing: .01em;
}

/* Slots */
.wtb-cst-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.wtb-cst-slot {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; overflow: hidden;
}
.wtb-cst-slot-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.wtb-cst-slot-num   { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.wtb-cst-slot-count { font-size: .65rem; color: rgba(255,255,255,.30); }
.wtb-cst-slot-price { font-size: .65rem; color: rgba(251,191,36,.55); font-weight: 600; }

.wtb-cst-items { display: flex; flex-direction: column; }

.wtb-cst-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.wtb-cst-item:last-child { border-bottom: none; }
.wtb-cst-item:hover { background: rgba(255,255,255,.02); }

.wtb-cst-item-name {
  flex: 1; font-size: .80rem; color: rgba(255,255,255,.80);
  transition: color .15s, text-decoration .15s;
  text-transform: capitalize;
}

/* Campo de preço por unidade (editável) */
.wtb-cst-price-field {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.wtb-cst-price-inp {
  width: 72px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 5px;
  color: #fff; font-size: .78rem;
  padding: 3px 6px; text-align: right;
  -moz-appearance: textfield;
  transition: border-color .15s;
}
.wtb-cst-price-inp::-webkit-inner-spin-button,
.wtb-cst-price-inp::-webkit-outer-spin-button { -webkit-appearance: none; }
.wtb-cst-price-inp:focus { border-color: rgba(251,191,36,.50); outline: none; }
/* Placeholder = preço mínimo NPC (bem suave) */
.wtb-cst-price-inp::placeholder { color: rgba(251,191,36,.35); font-style: italic; }
.wtb-cst-price-unit {
  font-size: .60rem; color: rgba(255,255,255,.28);
  white-space: nowrap;
}
.wtb-cst-item--have .wtb-cst-price-field { opacity: .20; pointer-events: none; }

/* Qty controls */
.wtb-cst-qty-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

.wtb-cst-qty-btn {
  width: 24px; height: 24px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 5px; color: rgba(255,255,255,.70);
  font-size: .85rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.wtb-cst-qty-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

.wtb-cst-qty-display { display: flex; align-items: center; gap: 2px; }

.wtb-cst-qty-inp {
  width: 44px; text-align: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 5px; color: #fff;
  font-size: .82rem; padding: 3px 4px;
  -moz-appearance: textfield;
}
.wtb-cst-qty-inp::-webkit-inner-spin-button,
.wtb-cst-qty-inp::-webkit-outer-spin-button { -webkit-appearance: none; }

.wtb-cst-qty-sep { color: rgba(255,255,255,.20); font-size: .75rem; }
.wtb-cst-qty-max { color: rgba(255,255,255,.30); font-size: .72rem; }

/* "Já tenho" tag — oculto por padrão */
.wtb-cst-have-tag {
  display: none;
  font-size: .65rem; font-weight: 700;
  color: #34d399;
  background: rgba(52,211,153,.10);
  border: 1px solid rgba(52,211,153,.25);
  border-radius: 4px; padding: 2px 7px;
  white-space: nowrap; flex-shrink: 0;
}

/* Estado: qty = 0 */
.wtb-cst-item--have .wtb-cst-item-name {
  color: rgba(255,255,255,.25);
  text-decoration: line-through;
}
.wtb-cst-item--have .wtb-cst-have-tag { display: inline-flex; }
.wtb-cst-item--have .wtb-cst-qty-display { opacity: .35; }

/* ================================================================
   PAYMENT STEPS (shared)
   ================================================================ */
.wtb-pay-step-hint { font-size: .78rem; color: rgba(255,255,255,.45); margin: 0 0 10px; }

.wtb-pay-method-btns { display: flex; gap: 8px; }
.wtb-pay-method-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; color: rgba(255,255,255,.65);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.wtb-pay-method-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.wtb-pay-method-btn.selected { background: rgba(79,163,247,.12); border-color: #4fa3f7; color: #4fa3f7; }
.wtb-pay-method-icon { font-size: 1.3rem; line-height: 1; }

.wtb-pay-add-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; margin-top: 10px;
  padding: 7px 14px;
  background: rgba(99,179,237,.08);
  border: 1px dashed rgba(99,179,237,.35);
  border-radius: 8px; color: #63b3ed;
  font-size: .80rem; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.wtb-pay-add-more-btn:hover { background: rgba(99,179,237,.15); border-color: rgba(99,179,237,.55); }

/* Secondary payment */
#wtb-pay-step4 { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }

.wtb-pay-secondary-row {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.wtb-pay-secondary-label { display: flex; align-items: center; gap: 7px; font-size: .82rem; }
.wtb-pay-secondary-converted { margin-left: auto; font-size: .75rem; color: rgba(255,255,255,.38); font-style: italic; }
.wtb-pay-secondary-input-row { display: flex; gap: 7px; align-items: center; }
.wtb-pay-secondary-input-row .mk-input { flex: 1; }

.wtb-pay-sec-remove { flex-shrink:0; background:none; border:none; color:rgba(255,255,255,.30); font-size:.85rem; cursor:pointer; padding:4px 6px; border-radius:4px; transition:color .15s; }
.wtb-pay-sec-remove:hover { color:#fc8181; }

/* ================================================================
   HINT BANNER (topo da aba)
   ================================================================ */
.wtb-hint-banner {
  background: rgba(99,179,237,.07);
  border: 1px solid rgba(99,179,237,.18);
  border-radius: 8px; padding: 8px 14px;
  font-size: .78rem; color: rgba(255,255,255,.55);
  margin-bottom: 8px; line-height: 1.5;
}
.wtb-hint-banner strong { color: #63b3ed; font-weight: 600; }
