/* woda admin widgets: catalog, cart, cosmetics (public/admin-ui.js) */
:root {
  --rar-E: #8a97a8;
  --rar-C: #4cc38a;
  --rar-B: #3f8cff;
  --rar-A: #9b6bff;
  --rar-S: #ffb23f;
  --rar-R: #ff5d6c;
  --rar-U: #ff6fd8;
}

.w-player-head { display: flex; align-items: flex-start; gap: 16px; }
.w-player-head .admin-head { flex: 1; min-width: 0; }
.w-avatar { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--admin-line); }

.w-small { min-height: 30px !important; padding: 4px 10px !important; font-size: 12px; }

/* currency cards */
.w-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0 0 18px; }
.w-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 34, 56, .95), rgba(11, 20, 35, .95));
  border: 1px solid var(--admin-line);
}
.w-card img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.w-card-text { display: grid; min-width: 0; }
.w-card-text span { color: #9fb2ca; font-size: 12px; }
.w-card-text b { color: #f4f8ff; font-size: 20px; line-height: 1.2; }
.w-card-text small { color: #6f8199; font-size: 11px; }

/* equipped cosmetics */
.w-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.w-slot { display: grid; gap: 6px; }
.w-slot-button {
  display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 168px; padding: 12px 8px !important;
  color: #eaf2ff !important; background: rgba(255, 255, 255, .04) !important; border: 1px solid var(--admin-line) !important;
  border-radius: 10px; box-shadow: none !important; text-transform: none; cursor: pointer;
}
.w-slot-button:hover { border-color: rgba(98, 140, 255, .6) !important; background: rgba(98, 140, 255, .1) !important; }
.w-slot-button img { width: 92px; height: 92px; object-fit: contain; }
.w-slot-empty { width: 92px; height: 92px; display: grid; place-items: center; color: #4d5f78; font-size: 36px; }
.w-slot-title { color: #9fb2ca; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.w-slot-name { font-size: 13px; text-align: center; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-slot-actions { display: flex; justify-content: center; margin: 0; min-height: 30px; }

/* rarity accents */
.rarity-E { --rar: var(--rar-E); }
.rarity-C { --rar: var(--rar-C); }
.rarity-B { --rar: var(--rar-B); }
.rarity-A { --rar: var(--rar-A); }
.rarity-S { --rar: var(--rar-S); }
.rarity-R { --rar: var(--rar-R); }
.rarity-U { --rar: var(--rar-U); }
.w-slot-button[class*="rarity-"],
.w-tile[class*="rarity-"],
.w-own[class*="rarity-"],
.w-chip[class*="rarity-"] { box-shadow: inset 0 -3px 0 var(--rar) !important; }

/* modal + catalog */
.w-modal {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(2, 6, 12, .74); backdrop-filter: blur(6px);
}
.w-modal.visible { display: flex; }
.w-modal-panel {
  width: min(1100px, calc(100vw - 40px)); height: min(860px, calc(100vh - 40px)); display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: 12px; color: #eaf2ff; background: linear-gradient(180deg, #121f34, #08101d);
  border: 1px solid rgba(255, 211, 106, .22); box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
}
.w-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.w-modal-head h3 { margin: 0; }
.w-catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.w-catalog-filters button {
  min-height: 30px; padding: 4px 12px; font-size: 12px; color: #c7d6ea; background: transparent; border: 1px solid var(--admin-line); box-shadow: none;
}
.w-catalog-filters button.active { color: #fff; background: rgba(98, 140, 255, .2); border-color: rgba(98, 140, 255, .55); }
.w-catalog-body { flex: 1; overflow-y: auto; padding-right: 4px; }
.w-catalog-section h4 { margin: 14px 0 8px; color: #ffd36a; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.w-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.w-tile {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 140px; padding: 10px 6px !important;
  color: #eaf2ff !important; background: rgba(255, 255, 255, .045) !important; border: 1px solid rgba(146, 185, 255, .12) !important;
  border-radius: 8px; text-transform: none; cursor: pointer; font-weight: 600;
}
.w-tile:hover { background: rgba(98, 140, 255, .14) !important; border-color: rgba(98, 140, 255, .5) !important; }
.w-tile img { width: 72px; height: 72px; object-fit: contain; }
.w-tile-name { font-size: 12px; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w-tile-meta { color: #7f93ad; font-size: 10px; text-align: center; }
.w-tile.is-owned { border-color: rgba(76, 195, 138, .55) !important; }
.w-tile.is-current { outline: 2px solid #ffd36a; }
.w-tile-badge {
  position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px;
  color: #062014; background: #4cc38a;
}

/* cart */
.w-cart-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.w-quick { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.w-cart-flash { color: #7ff0bd; font-size: 13px; opacity: 0; transition: opacity .2s; }
.w-cart-flash.visible { opacity: 1; }
.w-basket { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; margin-bottom: 12px; }
.w-chip {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px 30px; align-items: center; gap: 8px; padding: 8px;
  border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid var(--admin-line);
}
.w-chip img { width: 44px; height: 44px; object-fit: contain; }
.w-chip-label { display: grid; min-width: 0; }
.w-chip-label b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-chip-label small { color: #7f93ad; font-size: 11px; }
.w-chip input { width: 96px !important; min-height: 34px !important; padding: 4px 8px !important; }
.w-chip-remove {
  min-height: 30px !important; padding: 0 !important; color: #ff9eab !important; background: transparent !important;
  border: 0 !important; box-shadow: none !important; font-size: 20px;
}
.w-cart-reason { display: grid; gap: 6px; max-width: 520px; margin-bottom: 10px; color: #9fb2ca; font-size: 13px; }

/* owned items */
.w-own-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.w-own {
  display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(146, 185, 255, .12); text-align: center;
}
.w-own.is-current { border-color: rgba(255, 211, 106, .6); }
.w-own img { width: 72px; height: 72px; object-fit: contain; }
.w-own b { font-size: 12px; line-height: 1.2; }
.w-own small { color: #7f93ad; font-size: 11px; }
.w-own form { margin: 0; }
.w-own-actions { display: flex; gap: 6px; justify-content: center; }
.w-own-form { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: end; }
.w-own-form label { display: grid; gap: 2px; font-size: 10px; color: #7f93ad; }
.w-own-form input { width: 58px !important; min-height: 30px !important; padding: 2px 6px !important; }

.w-details { margin-bottom: 18px; }
.w-details > summary { cursor: pointer; padding: 10px 0; color: #9fb2ca; font-weight: 700; }

.w-hero-cell { display: flex; align-items: center; gap: 10px; }
.w-hero-cell img { width: 56px; height: 32px; object-fit: cover; border-radius: 4px; }

.w-pick-one { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.w-pick-preview { display: flex; align-items: center; gap: 8px; min-height: 40px; color: #c7d6ea; font-size: 13px; }
.w-pick-preview img { width: 40px; height: 40px; object-fit: contain; }

.admin-player-cell { display: inline-flex; align-items: center; gap: 8px; }

.is-admin .pagination a,
.is-admin .pagination-gap {
  color: #c7d6ea;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--admin-line);
  box-shadow: none;
}
.is-admin .pagination a.active,
.is-admin .pagination a:hover {
  color: #fff;
  background: rgba(98, 140, 255, .25);
  border-color: rgba(98, 140, 255, .55);
}

.admin-player-cell img.tiny-icon { width: 28px; height: 28px; border-radius: 6px; }

/* hero win-rate (style of the old world-of-dota.com statistics page) */
.wr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.wr-filters input[name="q"] { width: 240px; }
.wr-filters label { display: inline-flex; align-items: center; gap: 6px; color: #9fb2ca; font-size: 13px; }
.wr-filters input[name="min"] { width: 90px; }
.wr-tabs { align-items: center; color: #9fb2ca; font-size: 13px; }
.wr-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.wr-head, .wr-row { display: grid; grid-template-columns: minmax(220px, 300px) 150px minmax(420px, 1fr); align-items: center; gap: 16px; }
.wr-head { padding: 8px 12px; color: #9fb2ca; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--admin-line); }
.wr-row { padding: 10px 12px; border-bottom: 1px solid rgba(146, 185, 255, .07); }
.wr-row:hover { background: rgba(98, 140, 255, .06); }
.wr-hero { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wr-hero b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-hero-img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; }
.wr-attr { width: 22px; height: 22px; flex: none; }
.wr-attr-big { width: 44px; height: 44px; flex: none; }
.wr-games { display: grid; color: #f4f8ff; font-size: 18px; font-weight: 800; }
.wr-games small { color: #7f93ad; font-size: 11px; font-weight: 500; }
.wr-bars { display: flex; gap: 8px; align-items: stretch; }
.wr-col { display: grid; grid-template-rows: auto 56px auto; justify-items: center; gap: 3px; width: 44px; }
.wr-pct { color: #c7d6ea; font-size: 11px; }
.wr-track { width: 34px; height: 56px; display: flex; align-items: flex-end; background: rgba(255, 255, 255, .04); border-radius: 4px; overflow: hidden; }
.wr-fill { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.wr-place { color: #7f93ad; font-size: 11px; }
.wr-p0 { background: #14b88f; } .wr-p1 { background: #66b814; } .wr-p2 { background: #8fb814; } .wr-p3 { background: #b8b814; }
.wr-p4 { background: #b88f14; } .wr-p5 { background: #b86614; } .wr-p6 { background: #b83d14; } .wr-p7 { background: #8f14b8; }
.wr-row-attr .wr-games { font-size: 20px; }

/* season reward tiers */
.w-tier-board { margin-bottom: 22px; }
.w-tier-board h3 { margin: 0 0 10px; }
.w-tier { display: grid; grid-template-columns: 230px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 10px; margin-bottom: 8px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(146, 185, 255, .1); }
.w-tier-places { display: flex; align-items: center; gap: 6px; color: #9fb2ca; font-size: 13px; }
.w-tier-places input { width: 70px !important; min-height: 34px !important; padding: 4px 8px !important; }
.w-tier-basket { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.w-chip-small { grid-template-columns: 32px auto 90px 26px; padding: 4px 6px; }
.w-chip-small img { width: 32px; height: 32px; }
.w-chip-name { font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-reward-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-reward-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 999px; background: rgba(255, 255, 255, .06); font-size: 12px; }
.w-reward-chip img { width: 24px; height: 24px; object-fit: contain; }

.w-promo-item { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.w-promo-item > label { min-width: 220px; }
.promo-tab-panel.hidden { display: none; }
.admin-row-actions form { margin: 0; }

.admin-row-actions { flex-wrap: nowrap; }
.admin-row-actions .button,
.admin-row-actions button,
.admin-row-actions a.ghost {
  min-height: 32px !important;
  padding: 6px 12px !important;
  font-size: 12px;
  white-space: nowrap;
}

.admin-form label.checkbox-label,
.promocode-form label.checkbox-label { display: flex; align-items: center; gap: 10px; color: #c7d6ea; font-size: 14px; }
label.checkbox-label input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; flex: none; }
