/* ═══════════════════════════════════════════════════════════════════
   Widgets do Rainbow Client (os mesmos do Figma "Rainbow Client — Widgets")
   Desenhados no tamanho real do app; o ui.js escala cada um para caber
   na coluna ([data-fit]). Medidas e cores = principal/theme.h.
   ═══════════════════════════════════════════════════════════════════ */

[data-fit] { position: relative; width: 100%; }
[data-fit] > * { transform-origin: top left; position: absolute; top: 0; left: 0; }

.w {
  --w-bg: #111111;
  --w-panel: #151515;
  --w-card: #1c1c1c;
  --w-hover: #212121;
  --w-active: #2a2a2a;
  --w-line: rgba(255, 255, 255, .05);
  --w-line-2: rgba(255, 255, 255, .10);
  --w-check: rgba(255, 255, 255, .19);
  --w-text: #f2f2f2;
  --w-text-2: #868686;
  --w-text-3: #686868;
  font-family: var(--font);
  color: var(--w-text);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
}

.w * { box-sizing: border-box; }
.w svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: block; }
.w .i-fill svg, .w svg.i-fill { fill: currentColor; }
.w-row { display: flex; align-items: center; }
.w-grow { flex: 1; min-width: 0; }
.w-trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* moldura com brilho, como os "stages" do vape.gg */
.w-stage {
  position: relative;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .02));
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .4);
}

.w-stage > .w-stage-inner {
  border-radius: 19px;
  overflow: hidden;
  background: #0d0d0d;
}

/* ── Janela do launcher ────────────────────────────────────────── */
.w-window {
  background: var(--w-bg);
  border: 1px solid var(--w-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.w-head {
  height: 46px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  padding: 0 14px 0 18px;
}

.w-brand { display: flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; }
.w-brand img { width: 20px; height: 21px; object-fit: contain; }
.w-brand svg { width: 14px; height: 14px; color: var(--w-text-3); }

.w-tabs { display: flex; justify-content: center; gap: 4px; }
.w-tab { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--w-text-3); font-weight: 500; white-space: nowrap; }
.w-tab { --tab-bg: #111111; }
.w-tab svg { fill: currentColor; stroke: var(--tab-bg); stroke-width: 1.5; width: 17px; height: 17px; }
.w-tab.is-active { background: var(--w-active); color: var(--w-text); --tab-bg: #2a2a2a; }

.w-winbtns { display: flex; justify-content: flex-end; gap: 18px; color: var(--w-text-2); }
.w-winbtns svg { width: 14px; height: 14px; }

.w-body { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 0 14px 12px 12px; }
.w-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.w-searchrow { display: flex; gap: 8px; flex-shrink: 0; }
.w-search { flex: 1; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--w-line-2); border-radius: 8px; color: var(--w-text-3); font-size: 13px; }
.w-search svg { color: var(--w-text-2); }
.w-iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--w-line-2); border-radius: 8px; color: var(--w-text-2); }
.w-iconbtn svg { width: 18px; height: 18px; }

/* painel da direita: versões do Roblox */
.w-versions { width: 196px; flex-shrink: 0; background: var(--w-panel); border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.w-versions-title { font-weight: 500; padding: 0 6px 8px; }
.w-version { height: 30px; display: flex; align-items: center; padding: 0 10px; border-radius: 8px; color: var(--w-text-2); font-size: 12px; }
.w-version.is-active { background: var(--w-active); color: var(--w-text); }

/* ── Mods ──────────────────────────────────────────────────────── */
.w-modlist { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.w-mod { height: 76px; flex-shrink: 0; display: flex; align-items: center; padding: 0 14px 0 26px; background: var(--w-card); border-radius: 10px; }
.w-mod > svg { width: 24px; height: 24px; margin-right: 26px; }
.w-mod-title { font-weight: 500; }
.w-mod-desc { color: var(--w-text-2); font-size: 13px; margin-top: 3px; }
.w-adjust { display: flex; align-items: center; gap: 8px; padding: 0 8px; margin-right: 20px; color: var(--w-text-2); font-size: 13px; white-space: nowrap; }

.w-switch { width: 34px; height: 20px; border-radius: 10px; background: var(--w-active); position: relative; flex-shrink: 0; transition: background .25s; }
.w-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #969696; transition: transform .3s cubic-bezier(.22, 1, .36, 1), background .25s; }
.w-switch.is-on { background: #f2f2f2; }
.w-switch.is-on::after { transform: translateX(14px); background: #151515; }

.w-check { width: 18px; height: 18px; border-radius: 4px; background: var(--w-card); border: 1px solid var(--w-check); flex-shrink: 0; }
.w-check.is-on { background: #f2f2f2; border-color: #f2f2f2; }
.w-check.sm { width: 16px; height: 16px; }

/* ── Sub-tela (Céu / FastFlags) ────────────────────────────────── */
.w-screen { flex: 1; min-height: 0; background: var(--w-panel); border-radius: 12px; padding: 16px 16px 12px; display: flex; flex-direction: column; overflow: hidden; }
.w-back { font-size: 12px; line-height: 16px; color: var(--w-text-2); }
.w-screen-title { font-size: 15px; font-weight: 600; margin-top: 12px; }
.w-screen-desc { font-size: 12px; line-height: 16px; color: var(--w-text-2); margin-top: 6px; }

.w-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.w-btn { height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.w-btn-ghost { color: var(--w-text-2); }
.w-btn-primary { background: #f2f2f2; color: #151515; width: 118px; }
.w-btn-outline { border: 1px solid var(--w-line-2); color: var(--w-text-2); font-size: 13px; }

/* Emote Wheel Background: ajustes à esquerda, prévia à direita (igual ao app) */
.w-ewb { margin-top: 8px; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 236px; gap: 14px; }
.w-ewb-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; overflow: hidden; }
.w-ewb-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.w-ewb-tile { background: var(--w-card); border: 1px solid var(--w-line); border-radius: 10px; padding: 6px 6px 8px; min-width: 0; }
.w-ewb-well { height: 36px; border-radius: 7px; background: var(--w-bg); display: grid; place-items: center; }
.w-ewb-mini { width: 28px; height: 28px; border-radius: 50%; position: relative; background: #393b3d; }
.w-ewb-mini::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #17181b; }
.w-ewb-mini.is-img { background: conic-gradient(from 200deg, #ff5f6d, #ffc371, #47e891, #2fd3e8, #8b5cf6, #ff5f6d); }
.w-ewb-tile b { display: block; font-size: 12px; font-weight: 600; line-height: 16px; margin: 5px 4px 0; }
.w-ewb-tile span { display: block; font-size: 11px; line-height: 14px; color: var(--w-text-3); margin: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-ewb-row { background: var(--w-card); border-radius: 10px; padding: 7px 12px 9px; font-size: 12px; font-weight: 600; line-height: 16px; }
.w-ewb-row-hd { display: flex; justify-content: space-between; }
.w-ewb-row-hd span { font-weight: 400; color: var(--w-text-2); }
.w-ewb-slider { margin: 8px 7px 0; height: 4px; border-radius: 2px; background: var(--w-active); position: relative; }
.w-ewb-slider i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #d8d8d8; }
.w-ewb-slider i::after { content: ''; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.w-ewb-row.is-off, .w-ewb-row.is-off .w-ewb-row-hd span { color: #4a4a4a; }
.w-ewb-row.is-off .w-ewb-slider i { background: #4a4a4a; }
.w-ewb-row.is-off .w-ewb-slider i::after { background: #686868; }
.w-ewb-line { display: flex; align-items: center; justify-content: space-between; padding-bottom: 7px; }
.w-ewb-swatch { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 8px 0 4px; border: 1px solid var(--w-line-2); border-radius: 7px; background: var(--w-panel); }
.w-ewb-swatch::before { content: ''; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.w-ewb-prev { background: var(--w-bg); border: 1px solid var(--w-line); border-radius: 12px; display: grid; place-items: center; }
.w-ewb-wheel { width: 196px; height: 196px; border-radius: 50%; position: relative;
  background:
    conic-gradient(from -22.5deg, rgba(var(--sel), .5) 0 45deg, transparent 45deg),
    repeating-conic-gradient(from 22.5deg, rgba(255,255,255,.35) 0 .8deg, transparent .8deg 45deg),
    conic-gradient(from 200deg, #ff5f6d, #ffc371, #47e891, #2fd3e8, #8b5cf6, #ff5f6d); }
.w-ewb-wheel::after { content: ''; position: absolute; inset: 52px; border-radius: 50%; background: #17181b; box-shadow: inset 0 3px 0 -1px rgb(var(--sel)); }
.w-ewb-n { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; color: #fff; z-index: 1;
  transform: rotate(calc(var(--i) * 45deg)) translateY(-56px) rotate(calc(var(--i) * -45deg)); }
.w-ewb-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #fff; z-index: 1; }

/* FastFlags */
.w-toolbar { display: flex; align-items: center; gap: 8px; }
.w-dd { height: 34px; display: flex; align-items: center; gap: 14px; padding: 0 12px 0 14px; border: 1px solid var(--w-line-2); border-radius: 8px; color: var(--w-text-2); font-size: 13px; font-weight: 500; }
.w-dd svg { width: 14px; height: 14px; }
.w-fsearch { flex: 1; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px; border: 1px solid var(--w-line-2); border-radius: 8px; font-size: 13px; color: var(--w-text-3); }
.w-fsearch svg { color: var(--w-text-2); }
.w-fsearch .w-kbd { margin-left: auto; height: 20px; padding: 0 6px; border: 1px solid var(--w-line-2); border-radius: 4px; font-size: 12px; display: flex; align-items: center; }
.w-more { padding: 0 6px; color: var(--w-text-2); }
.w-more svg { width: 20px; height: 20px; }
.w-thead { margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 0 8px 10px; border-bottom: 1px solid var(--w-line-2); color: var(--w-text-2); font-size: 13px; font-weight: 500; }
.w-thead .w-col-flag { width: 305px; display: flex; align-items: center; gap: 8px; }
.w-count { padding: 0 6px; border-radius: 9px; background: var(--w-active); font-size: 12px; font-weight: 400; line-height: 18px; }
.w-frows { padding-top: 4px; }
.w-frow { height: 36px; display: flex; align-items: center; gap: 14px; padding: 0 8px; border-radius: 6px; font-size: 13px; }
.w-frow:nth-child(even) { background: var(--w-card); }
.w-frow .w-col-flag { width: 305px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-frow .w-col-flag i { font-style: normal; color: var(--w-text-3); }

/* ── Addons (overlay in-game) ──────────────────────────────────── */
.w-overlay { width: 1110px; height: 709px; display: flex; background: var(--w-card); border: 1px solid var(--w-line); border-radius: 12px; overflow: hidden; position: relative; }
.w-side { width: 250px; flex-shrink: 0; border-right: 1px solid var(--w-line); display: flex; flex-direction: column; }
.w-side-brand { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--w-line); font-weight: 600; }
.w-side-brand img { width: 22px; height: 23px; object-fit: contain; }
.w-side-in { padding: 14px 12px 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.w-caps { display: flex; justify-content: space-between; padding: 0 4px 0 2px; color: var(--w-text-3); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: .8px; }
.w-caps span { letter-spacing: 0; font-size: 12px; font-weight: 400; }
.w-select { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--w-line-2); border-radius: 8px; font-size: 13px; font-weight: 500; }
.w-select svg { width: 14px; height: 14px; color: var(--w-text-2); }
.w-newprofile { height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--w-line); border-radius: 8px; color: var(--w-text-2); font-size: 13px; margin-bottom: 10px; }
.w-addons { display: flex; flex-direction: column; gap: 2px; }
.w-addon { height: 34px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; color: var(--w-text-2); font-size: 13px; }
.w-addon .w-grow { white-space: nowrap; }
.w-addon.is-active { background: var(--w-active); color: var(--w-text); }
.w-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-topbar { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 24px; border-bottom: 1px solid var(--w-line); font-size: 13px; color: var(--w-text-2); }
.w-topbar b { color: var(--w-text); font-weight: 500; }
.w-topbar svg.sm { width: 14px; height: 14px; color: var(--w-text-3); }
.w-edithud { margin-left: auto; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 12px; border: 1px solid var(--w-line-2); border-radius: 8px; color: var(--w-text); font-weight: 500; }
.w-edithud svg { color: var(--w-text-2); }
.w-page { flex: 1; padding: 20px 14px 0 22px; }
.w-page h4 { font-size: 15px; font-weight: 600; letter-spacing: 0; padding-bottom: 18px; border-bottom: 1px solid var(--w-line-2); }
.w-page p { margin-top: 22px; font-size: 13px; font-weight: 600; }
.w-page small { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--w-text-2); }
.w-status { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-top: 1px solid var(--w-line); color: var(--w-text-2); font-size: 12px; }
.w-palette { position: absolute; left: 556px; top: 10px; width: 438px; height: 372px; background: var(--w-panel); border: 1px solid var(--w-line-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); overflow: hidden; display: flex; flex-direction: column; }
.w-psearch { height: 42px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--w-line); font-size: 13px; }
.w-psearch > svg { color: var(--w-text-2); }
.w-caret { display: inline-block; width: 1px; height: 16px; background: var(--w-text); margin-left: 1px; vertical-align: middle; animation: w-blink 1s steps(1) infinite; }
.w-esc { margin-left: auto; padding: 0 6px; border-radius: 4px; background: var(--w-card); color: var(--w-text-3); font-size: 12px; line-height: 20px; }
.w-results { padding: 8px 8px 0; overflow: hidden; }
.w-result { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; }
.w-result.is-active { background: var(--w-card); }
.w-result svg { color: var(--w-text-2); }
.w-result b { display: block; font-size: 13px; font-weight: 500; }
.w-result small { display: block; font-size: 12px; line-height: 16px; color: var(--w-text-2); white-space: nowrap; }
@keyframes w-blink { 50% { opacity: 0; } }

/* ── Discord ───────────────────────────────────────────────────── */
.w-discord { width: 301px; background: #232428; border-radius: 8px; padding: 10px 12px 14px; color: #f2f3f5; }
.w-discord-cap { font-size: 12px; line-height: 16px; font-weight: 600; color: #b5bac1; }
.w-discord-row { display: flex; gap: 12px; margin-top: 8px; }
.w-discord-icon { width: 56px; height: 56px; border-radius: 8px; background: #2b2d31; display: grid; place-items: center; flex-shrink: 0; }
.w-discord-icon img { width: 36px; height: 38px; object-fit: contain; }
.w-discord-name { font-size: 15px; font-weight: 600; line-height: 20px; }
.w-discord-det { font-size: 13px; line-height: 18px; color: #b5bac1; margin-top: 2px; }
.w-discord-time { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: #23a55a; font-size: 13px; font-weight: 500; font-family: var(--mono); }

/* ── Updater ───────────────────────────────────────────────────── */
.w-updater { width: 386px; height: 123px; background: #111; border: 1px solid var(--w-line); border-radius: 12px; padding: 12px 32px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.w-updater img { height: 44px; width: auto; }
.w-updater p { color: var(--w-text-2); font-size: 13px; font-weight: 500; }
.w-track { width: 100%; height: 3px; border-radius: 2px; background: var(--w-active); position: relative; overflow: hidden; margin-top: 4px; }
.w-track::after { content: ''; position: absolute; top: 0; height: 100%; width: 22%; border-radius: 2px; background: #f2f2f2; left: 0; animation: w-indet 1.6s cubic-bezier(.65, 0, .35, 1) infinite; will-change: transform; }
@keyframes w-indet { from { transform: translateX(-100%); } to { transform: translateX(455%); } }

