/* My Gear — compact armory / SimC-style import list. Original art only. */
.mg-root {
  --mg-gold: #e8c872;
  --mg-ink: #dce4f0;
  --mg-muted: #8b93a7;
  --mg-line: #2a3142;
  --mg-bis: #3dff7a;
  --mg-up: #e0b432;
  --mg-miss: #e07070;
  position: relative;
  width: 100%;
  flex: none;
  margin: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--mg-ink);
  font-family: Inter, system-ui, sans-serif;
}
.mg-root.is-open { z-index: 5; }

.mg-shell {
  border: 1px solid var(--mg-line);
  background: #12151c;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.mg-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--mg-line);
  min-height: 0;
}
.mg-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.mg-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mg-gold);
  white-space: nowrap;
}
.mg-summary {
  font-size: 12px;
  color: var(--mg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.mg-root.is-loaded.is-open .mg-summary { color: #c8d0e0; }

.mg-toggle {
  appearance: none;
  border: 1px solid var(--mg-line);
  background: #1a1e28;
  color: var(--mg-gold);
  font: 600 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex: none;
}
.mg-toggle:hover { border-color: #3a4256; }

.mg-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.mg-form input, .mg-form select {
  height: 28px;
  border: 1px solid var(--mg-line);
  background: #0e1118;
  color: var(--mg-ink);
  border-radius: 5px;
  padding: 0 8px;
  font: 12px Inter, system-ui, sans-serif;
}
.mg-form input[name="name"] { width: 140px; min-width: 90px; flex: 0 1 140px; }
.mg-form select[name="realm"] { width: 170px; min-width: 110px; flex: 0 1 170px; }
.mg-form button[type="submit"], .mg-clear {
  appearance: none;
  height: 28px;
  border: 1px solid #3a3220;
  background: linear-gradient(180deg, #2a2414, #1a160c);
  color: var(--mg-gold);
  font: 650 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.mg-form button[type="submit"]:disabled { opacity: .55; cursor: wait; }
.mg-clear { border-color: var(--mg-line); background: #1a1e28; color: var(--mg-muted); }

.mg-msg {
  display: none;
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  color: #f0c070;
  background: #1a1610;
  border-bottom: 1px solid var(--mg-line);
}
.mg-msg.is-on { display: block; }
.mg-msg.is-err { color: #ff9eae; background: #1a1014; }

.mg-body { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
.mg-root.is-open.is-loaded .mg-body { display: flex; }

.mg-table-wrap { overflow: auto; width: 100%; flex: 1 1 auto; min-height: 0; }
.mg-gear {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.25;
  table-layout: fixed;
}
.mg-gear th, .mg-gear td {
  padding: 4px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #1c212c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg-gear thead th {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b93a7;
  background: #151821;
  padding: 5px 8px;
  border-bottom: 1px solid var(--mg-line);
}
.mg-gear .c-slot { width: 88px; color: #9aa3b5; font-weight: 600; }
.mg-gear .c-item { width: auto; }
.mg-gear .c-status { width: 108px; }
.mg-gear .c-rec { width: 22%; }
.mg-gear .c-mod { width: 20%; }
.mg-gear .c-alt { width: 14%; color: var(--mg-muted); }

.mg-gear tbody tr.mg-st-bis td { background: rgba(61, 255, 122, 0.055); }
.mg-gear tbody tr.mg-st-bis td.c-slot { box-shadow: inset 3px 0 0 #3dff7a; }
.mg-gear tbody tr.mg-st-up td { background: rgba(224, 180, 50, 0.075); }
.mg-gear tbody tr.mg-st-up td.c-slot { box-shadow: inset 3px 0 0 #e0b432; }
.mg-gear tbody tr.mg-st-miss td { background: rgba(224, 80, 80, 0.08); }
.mg-gear tbody tr.mg-st-miss td.c-slot { box-shadow: inset 3px 0 0 #e07070; }
.mg-gear tbody tr.mg-st-na td { background: #12151c; color: var(--mg-muted); }
.mg-gear tbody tr:hover td { filter: brightness(1.06); }

.mg-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; vertical-align: middle; }
.mg-item img { width: 16px; height: 16px; border-radius: 2px; flex: none; }
.mg-item a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.mg-item .ilvl { color: var(--mg-muted); font-variant-numeric: tabular-nums; flex: none; font-size: 11px; }
.mg-empty { color: var(--mg-muted); }

.mg-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.mg-pill-bis { color: #8dffb8; background: rgba(61, 255, 122, 0.14); }
.mg-pill-up { color: #ffd27a; background: rgba(224, 180, 50, 0.16); }
.mg-pill-miss { color: #ff9eae; background: rgba(200, 60, 70, 0.16); }
.mg-pill-na { color: #8b93a7; background: rgba(139, 147, 167, 0.12); }

.mg-shop {
  appearance: none;
  border: 1px solid var(--mg-line);
  background: #1a1e28;
  color: var(--mg-gold);
  font: 650 10px/1 Inter, system-ui, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.mg-shop:hover { border-color: #3a4256; }
.mg-shop[disabled], .mg-shop.is-off { opacity: .35; cursor: default; color: var(--mg-muted); }

.mg-mod-ok { color: #8dffb8; }
.mg-mod-need { color: #ffd27a; }
.mg-alt-link { color: #9db4d8; text-decoration: none; }
.mg-alt-link:hover { text-decoration: underline; }

.mg-foot {
  display: flex;
  justify-content: flex-end;
  padding: 4px 10px 6px;
  border-top: 1px solid var(--mg-line);
}

/* Narrow: keep the table in flow, collapse to a button + one-line summary. */
@media (max-width: 1100px) {
  .mg-root { margin: 6px 0 8px; }
  .mg-root:not(.is-open) .mg-form,
  .mg-root:not(.is-loaded):not(.is-open) .mg-form { display: none; }
  .mg-root:not(.is-open) .mg-bar { justify-content: space-between; }
  .mg-gear { font-size: 11px; table-layout: auto; }
  .mg-gear .c-alt { display: none; }
}

.mg-foot { flex: none; }

/* Natural-height armory: all sixteen slots, no inner vertical scrollbar. */
.mg-root, .mg-shell { height:auto; overflow:visible; }
.mg-body { flex:none; overflow:visible; }
.mg-table-wrap { overflow-x:auto; overflow-y:visible; flex:none; }
.mg-gear { table-layout:fixed; }
.mg-gear th, .mg-gear td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:5px 6px; }
.mg-gear .c-slot { width:110px; }
.mg-gear .c-item { width:24%; }
.mg-gear .c-status { width:90px; }
.mg-gear .c-rec { width:22%; }
.mg-gear .c-mod { width:22%; }
.mg-gear .c-alt { width:20%; }
.mg-item { flex-wrap:nowrap; max-width:100%; }
.mg-item a { overflow:hidden; text-overflow:ellipsis; }
.mg-item .mg-item-icon { flex:none; }
.mg-item-icon img { display:block; }
.mg-foot { align-items:center; gap:8px; flex-wrap:wrap; padding:8px 10px; }
.mg-form { flex-wrap:wrap; }
.mg-clear { margin-left:auto; }
.mg-upgrade-link { border:0; cursor:pointer; font-family:inherit; }
.mg-upgrade-link:hover { filter:brightness(1.25); text-decoration:underline; }
.mg-recommendations { margin-top:0; padding:8px 10px; border:1px solid #2a3142; border-radius:8px; background:#12151c; font-size:12px; line-height:1.35; color:#b8bfd0; }
.mg-recommendations h3 { margin:0 0 6px; font-size:12px; color:#e8c872; text-transform:uppercase; letter-spacing:.04em; }
.mg-recommendations p { margin:5px 0 0; }
.mg-reco-note { color:#8b93a7; }
.mg-az { margin:2px 0 0; }
.mg-az-title { margin:0 0 2px; font-size:11px; font-weight:700; color:#e8c872; letter-spacing:.04em; text-transform:uppercase; }
.mg-az-list { list-style:none; margin:0; padding:0; }
.mg-az-list li { margin:0; padding:1px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mg-az-list a, .mg-recommendations .mg-wiki { color:#9db4d8; text-decoration:none; }
.mg-az-list a:hover, .mg-recommendations .mg-wiki:hover { text-decoration:underline; }
.mg-recommendations .iconsmall { display:none !important; }
.mg-az-note, .mg-races p { margin:3px 0 0; }
.mg-races { margin-top:5px; }
.mg-gems { margin-top:5px; }
.mg-gems-list { list-style:none; margin:0; padding:0; }
.mg-gems-list li { margin:0; padding:1px 0; }
.mg-gems-list a { color:#9db4d8; text-decoration:none; }
.mg-gems-list a:hover { text-decoration:underline; }


.mg-upgrade-link { border:0; cursor:pointer; font-family:inherit; }
.mg-upgrade-link:hover { filter:brightness(1.25); }
@media (max-width:1100px) {
 .mg-gear { min-width:950px; }
 .mg-gear .c-alt { display:table-cell; }
 .mg-root { margin:0; }
}

/* One equipped icon only — hide extras Wowhead prepends via iconizeLinks. */
.mg-item:has(.mg-own-icon) img:not(.mg-own-icon),
.mg-item:has(.mg-own-icon) .iconsmall,
.mg-item:has(.mg-own-icon) .iconmedium,
.mg-item:has(.mg-own-icon) .iconlarge,
.mg-item:has(.mg-own-icon) ins { display: none !important; }
.mg-item .mg-own-icon { width: 16px; height: 16px; border-radius: 2px; flex: none; }
.mg-item a { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }

.mg-rec-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin:0 0 6px; }
.mg-rec-head h3 { margin:0; }
.mg-buy-gems { appearance:none; background:#1c2130; border:1px solid #2a3142; color:#e8ecf4;
  border-radius:999px; padding:4px 10px; font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap; }
.mg-buy-gems:hover, .mg-buy-gems.on { border-color:#5ee0c5; color:#5ee0c5; }
.mg-chip-row { display:flex; flex-wrap:wrap; gap:5px; margin:0 0 6px; }
.mg-chip { appearance:none; background:#1c2130; border:1px solid #2a3142; color:#e8ecf4;
  border-radius:999px; padding:3px 9px; font-size:11px; font-weight:650; cursor:pointer; min-height:24px; }
.mg-chip.on { background:#12362f; border-color:#5ee0c5; color:#5ee0c5; }
.mg-chip-build { font-weight:600; }
.mg-build-hint { margin:0 0 6px; font-size:11px; color:#8b93a7; }
.mg-rec-body { min-width:0; }
.mg-gems-panel { margin-top:8px; border-top:1px solid #2a3142; padding-top:8px; overflow:auto; }
.mg-gems-panel table { width:100%; border-collapse:collapse; font-size:11px; }
.mg-gems-panel th, .mg-gems-panel td { text-align:left; padding:3px 6px 3px 0; border-bottom:1px solid #232836; vertical-align:top; }
.mg-gems-panel th { color:#8b93a7; font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.mg-gem-price { white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:700; color:#ffb020; }
.mg-gem-note { color:#8b93a7; }
.mg-gems-meta { margin:6px 0 0; font-size:10px; color:#8b93a7; }
.mg-item .spd-badge { margin-left:6px; font-size:10px; font-weight:800; color:#3dff7a; white-space:nowrap; }
.mg-item .spd-badge.spd-down { color:#e07070; }
.mg-item .spd-est { font-weight:600; opacity:.8; margin-left:3px; font-size:9px; }
.mg-az-list li { white-space:normal; overflow:visible; text-overflow:unset; }
