/* ==========================================================================
   VICE LAYER — qbcore_vi_petty (admin editor + lockpick / match-pairs /
   pickpocket minigames). GTA VI design system. GTA Art Deco 400 / 500 only.
   ========================================================================== */
@font-face { font-family: "GTAArtDeco"; src: url("fonts/GTAArtDeco-Regular.ttf") format("truetype"); font-weight: 400; font-display: block; }
@font-face { font-family: "GTAArtDeco"; src: url("fonts/GTAArtDeco-Medium.ttf") format("truetype"); font-weight: 500 900; font-display: block; }

html, html.dark, :root {
  /* shadcn tokens (HSL) → Vice */
  --background: 236 38% 8%;
  --foreground: 0 0% 100%;
  --card: 240 29% 14%;
  --card-foreground: 0 0% 100%;
  --popover: 238 31% 12%;
  --popover-foreground: 0 0% 100%;
  --primary: 53 100% 90%;
  --primary-foreground: 255 37% 8%;
  --secondary: 240 26% 18%;
  --secondary-foreground: 0 0% 100%;
  --muted: 240 26% 18%;
  --muted-foreground: 252 71% 86%;
  --accent: 240 26% 20%;
  --accent-foreground: 0 0% 100%;
  --destructive: 355 86% 70%;
  --destructive-foreground: 0 0% 100%;
  --border: 245 30% 22%;
  --input: 245 30% 22%;
  --ring: 53 100% 90%;
  --font-sans: "GTAArtDeco", Arial, sans-serif;
  --font-mono: "GTAArtDeco", Arial, sans-serif;
}

html, body, #root, #root * { font-family: "GTAArtDeco", Arial, sans-serif !important; }
#root { letter-spacing: -0.01em; }
#root .font-semibold, #root .font-bold { font-weight: 500 !important; }
#root *, #root *::before { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* editor */
#root .vp-editor::before { content: ""; position: absolute; left: 32px; top: 0; width: 64px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #ffdf80 0%, #f4717c 50%, #e963c7 100%); z-index: 3; }
#root .vp-editor [class*="rounded-lg"][class*="border"], #root .vp-editor [class*="rounded-xl"][class*="border"] { border-color: rgba(229, 221, 255, 0.08) !important; }
#root .vp-editor .rounded-lg:not(button):not(input), #root .vp-editor .rounded-xl { border-radius: 16px; }
#root .vp-editor [role="tablist"] { border-radius: 1000px !important; border: 0 !important; background: rgba(229, 221, 255, 0.05) !important; padding: 4px; gap: 2px; }
#root .vp-editor [role="tab"] { border-radius: 1000px !important; color: #ccc2f5; font-weight: 500 !important; }
#root .vp-editor [role="tab"][data-state="active"] { background: #fff9cb !important; color: #0f0c1a !important; box-shadow: none !important; }
#root .vp-editor button:not([role="tab"]):not(nav button) { border-radius: 1000px !important; }
#root .vp-editor input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), #root .vp-editor select, #root .vp-editor [role="combobox"] { border-radius: 1000px !important; background: rgba(229, 221, 255, 0.06) !important; border-color: transparent !important; color: #fff !important; }
#root .vp-editor input:focus, #root .vp-editor [role="combobox"]:focus { border-color: rgba(255, 249, 203, 0.45) !important; box-shadow: none !important; }
#root .vp-editor textarea { border-radius: 18px !important; }
#root .vp-editor [role="switch"][data-state="checked"] { background: #ffb2c6 !important; }
#root .vp-editor h3, #root .vp-editor h4 { color: #fff9cb; font-weight: 500; }
/* "%" / "ms" input suffixes sit flush on the pill */
#root .vp-editor input + div, #root .vp-editor input + span { border-radius: 0 1000px 1000px 0 !important; }

/* dialogs / popovers from radix */
[role="dialog"], [data-radix-popper-content-wrapper] > div { border-radius: 24px !important; }
[role="dialog"] { background: radial-gradient(70% 180px at 50% 0%, rgba(255, 223, 128, 0.10), rgba(244, 113, 124, 0.07) 50%, transparent 100%), linear-gradient(189deg, #1f1f38 0.55%, #18182d 30.38%, #111222 65.19%, #0c0d1b 100%) !important; border: 0 !important; }
[role="dialog"] h2 { color: #fff9cb; text-transform: uppercase; font-weight: 500 !important; letter-spacing: 0; }
[role="dialog"] button { border-radius: 1000px !important; }
[role="listbox"], [role="menu"] { border-radius: 16px !important; background: #151628 !important; border: 0 !important; }

/* scrollbars */
#root ::-webkit-scrollbar, .custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
#root ::-webkit-scrollbar-thumb, .custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(229, 221, 255, 0.16) !important; border-radius: 1000px; }
#root ::-webkit-scrollbar-track, .custom-scrollbar::-webkit-scrollbar-track { background: transparent !important; }

/* editor surfaces: near-black utility fills → translucent lilac on the night plate */
#root .vp-editor .bg-\[\#050505\], #root .vp-editor .bg-\[\#0a0a0a\], #root .vp-editor .bg-\[\#0b0b0b\], #root .vp-editor .bg-\[\#0d0d0d\], #root .vp-editor .bg-black { background-color: rgba(229, 221, 255, 0.045) !important; }
#root .vp-editor .bg-\[\#111\], #root .vp-editor .bg-\[\#131313\] { background-color: rgba(229, 221, 255, 0.06) !important; }
#root .vp-editor .bg-\[\#1a1a1a\], #root .vp-editor .bg-\[\#1f1f1f\] { background-color: rgba(229, 221, 255, 0.09) !important; }
#root .vp-editor .bg-\[\#2a2a2a\] { background-color: rgba(229, 221, 255, 0.14) !important; }
#root .vp-editor .bg-\[\#1a3a5c\] { background-color: rgba(204, 194, 245, 0.16) !important; }
#root .vp-editor .rounded-xl.border { border: 0 !important; border-radius: 24px !important; }
#root .vp-editor .border-white\/10, #root .vp-editor .border-white\/5 { border-color: rgba(229, 221, 255, 0.07) !important; }
#root .vp-editor .text-gray-400, #root .vp-editor .text-gray-500, #root .vp-editor [class*="text-[#888"], #root .vp-editor [class*="text-white/5"], #root .vp-editor [class*="text-white/6"] { color: #ccc2f5 !important; }
[role="dialog"] .bg-\[\#050505\], [role="dialog"] .bg-\[\#0a0a0a\], [role="dialog"] .bg-\[\#0d0d0d\], [role="dialog"] .bg-\[\#111\], [role="dialog"] .bg-black { background-color: rgba(229, 221, 255, 0.05) !important; }

/* minigames: titles read cream, key hints become cream key chips */
#root [style*="text-transform: uppercase"][style*="letter-spacing: 1.5px"] { color: #fff9cb !important; }
#root [style*="z-index: 9999"] [style*="width: 64px"][style*="height: 64px"] { border-radius: 12px !important; }

/* ---- resolution scaling (--vs = viewport height / 1080, from vice-scale.js) ----
   editor: lay out at 1080p size, then scale, so 720p..4K and ultrawide keep the same proportions */
#root .vp-editor { width: calc(92vw / var(--vs, 1)) !important; height: calc(70vh / var(--vs, 1)) !important; scale: var(--vs, 1); }
[data-radix-popper-content-wrapper] > * { scale: var(--vs, 1); transform-origin: var(--radix-popper-transform-origin, top left); }
[role="dialog"] { scale: var(--vs, 1); }
/* minigames */
#root .fixed.inset-0.flex.items-end.justify-center.pointer-events-none > div { scale: var(--vs, 1); transform-origin: 50% 100%; }
#root .fixed.inset-0.flex.items-center.justify-center.pointer-events-none > div { scale: var(--vs, 1); }
#root [style*="z-index: 9999"] > div[style*="width: 732px"] { scale: var(--vs, 1); }
