/* ==========================================================================
   VICE — qbcore_vi_drugs cooker UI (tweak burn rates / name batch)
   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; }

:root {
  --v-font: "GTAArtDeco", Arial, sans-serif;
  --v-cream: #fff9cb; --v-pink: #ffb2c6; --v-pink-text: #ffc6d4; --v-lilac: #e5ddff; --v-lilac-soft: #ccc2f5;
  --v-peach: #ffd4a8; --v-lime: #e6ffa3; --v-ink: #0f0c1a; --v-cta: #fed1df; --v-cta-ink: #603a55;
  --v-s1: rgba(229, 221, 255, 0.05); --v-s2: rgba(229, 221, 255, 0.09); --v-ghost: rgba(255, 255, 255, 0.2);
  --v-grad-night: linear-gradient(189deg, #1f1f38 0.55%, #18182d 30.38%, #111222 65.19%, #0c0d1b 100%);
  --v-glow-top: radial-gradient(70% 180px at 50% 0%, rgba(255, 223, 128, 0.12), rgba(244, 113, 124, 0.08) 50%, transparent 100%);
  --v-sunset-line: linear-gradient(90deg, #ffdf80 0%, #f4717c 50%, #e963c7 100%);
  --v-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --v-glow-cta: 0 2px 71px rgba(255, 178, 199, 0.4);
  --v-glow-cta-sm: 0 2px 30px rgba(255, 178, 199, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; background: transparent; overflow: hidden; }
body { font-family: var(--v-font); color: #fff; -webkit-font-smoothing: antialiased; user-select: none; }
#root { width: 100%; height: 100%; }

@keyframes v-rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------- stage */
.v-stage {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(60% 70% at 50% 50%, rgba(12, 13, 27, 0.55), rgba(12, 13, 27, 0.15) 70%, transparent);
  animation: v-fade 0.3s var(--v-ease) both;
}
.v-plate {
  position: relative; width: 100%; border-radius: 24px; background: var(--v-glow-top), var(--v-grad-night);
  box-shadow: 0 40px 90px rgba(7, 7, 15, 0.55); overflow: hidden; animation: v-rise 0.42s var(--v-ease) both;
}
.v-plate::before { content: ""; position: absolute; left: 36px; top: 0; width: 64px; height: 3px; border-radius: 0 0 3px 3px; background: var(--v-sunset-line); }
.v-plate.tweak-plate { max-width: 640px; padding: 38px 36px 32px; }
.v-plate.batch-plate { max-width: 560px; padding: 38px 36px 32px; }

/* title stack */
.v-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v-eyebrow { font: 500 11px/1.2 var(--v-font); letter-spacing: 0.15em; text-transform: uppercase; color: var(--v-pink); }
.v-title { margin-top: 10px; font: 500 40px/0.92 var(--v-font); text-transform: uppercase; color: var(--v-cream); }
.v-subtitle { margin-top: 12px; font: 400 14px/1.45 var(--v-font); color: var(--v-lilac); opacity: 0.9; max-width: 480px; }
.v-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--v-s1); color: var(--v-pink);
}
.v-badge svg { width: 24px; height: 24px; }

/* ---------------------------------------------------- tweak ingredients */
.tweak-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.tweak-item-wrapper {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 16px; border-radius: 16px; background: var(--v-s1);
  transition: background 0.26s var(--v-ease);
}
.tweak-item-wrapper:focus-within { background: var(--v-s2); }
.tweak-item-wrapper.is-off { opacity: 0.55; }
.cooker-item-index { font: 500 10px/1 var(--v-font); letter-spacing: 0.15em; text-transform: uppercase; color: var(--v-peach); }
.cooker-item-label { min-height: 34px; font: 500 15px/1.15 var(--v-font); color: #fff; letter-spacing: -0.015em; }

.v-stepper { display: flex; align-items: center; gap: 6px; height: 42px; padding: 4px; border-radius: 1000px; background: rgba(12, 13, 27, 0.55); }
.v-stepper .input {
  flex: 1; min-width: 0; height: 34px; border: 0; border-radius: 1000px; background: transparent; color: var(--v-cream);
  font: 500 18px var(--v-font); text-align: center; outline: none; -moz-appearance: textfield;
}
.v-stepper .input::-webkit-outer-spin-button, .v-stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.v-stepper .input:disabled { cursor: not-allowed; color: var(--v-lilac-soft); }
.v-step {
  flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--v-s2); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s var(--v-ease), transform 0.12s;
}
.v-step svg { width: 14px; height: 14px; }
.v-step:hover { background: rgba(229, 221, 255, 0.18); }
.v-step:active { transform: scale(0.94); }
.v-step:disabled { opacity: 0.35; cursor: default; }

.v-meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.v-meter i { height: 4px; border-radius: 2px; background: rgba(229, 221, 255, 0.1); transition: background 0.26s var(--v-ease); }
.v-meter i.on { background: var(--v-pink); }
.v-meter i.on.hot { background: #f4717c; }
.tweak-item-wrapper .cooker-hint { text-align: left; font-size: 11px; color: var(--v-lilac-soft); }

/* -------------------------------------------------------------- batch */
.cooker-batch-form { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.batch-paper { position: relative; }
.batch-paper label { display: block; margin: 0 0 10px 4px; font: 500 10px/1 var(--v-font); letter-spacing: 0.15em; text-transform: uppercase; color: var(--v-peach); }
#batch-name {
  width: 100%; height: 54px; padding: 0 70px 0 22px; border: 1px solid transparent; border-radius: 1000px; background: rgba(229, 221, 255, 0.06);
  color: var(--v-cream); font: 500 18px var(--v-font); letter-spacing: 0.02em; outline: none; user-select: text;
  transition: border-color 0.26s var(--v-ease), background 0.26s var(--v-ease);
}
#batch-name::placeholder { color: rgba(229, 221, 255, 0.35); }
#batch-name:focus { border-color: rgba(255, 249, 203, 0.45); background: rgba(229, 221, 255, 0.08); }
.batch-count { position: absolute; right: 22px; bottom: 19px; font: 500 12px/1 var(--v-font); color: var(--v-lilac-soft); }
.batch-count.ok { color: var(--v-lime); }

/* -------------------------------------------------------------- shared */
.cooker-hint { font: 400 12px/1.4 var(--v-font); color: var(--v-lilac-soft); }
.cooker-error { padding: 10px 16px; border-radius: 12px; background: rgba(244, 113, 124, 0.14); color: var(--v-pink-text); font: 400 13px/1.35 var(--v-font); }
.cooker-error:empty { display: none; }
.v-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 26px; }
.v-actions .v-keyhint { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font: 400 12px var(--v-font); color: var(--v-lilac-soft); }
.v-key { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 9px; border-radius: 1000px; background: var(--v-cream); color: var(--v-ink); font: 500 10px/1 var(--v-font); letter-spacing: 0.04em; }
.v-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 1000px;
  background: transparent; color: #fff; font: 500 13px/1 var(--v-font); letter-spacing: -0.015em; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--v-ghost); transition: background 0.26s var(--v-ease), box-shadow 0.26s var(--v-ease), opacity 0.26s;
}
.v-btn:hover { background: var(--v-s2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.v-btn:active { transform: scale(0.97); }
.v-btn.cta { background: var(--v-cta); color: var(--v-cta-ink); box-shadow: var(--v-glow-cta-sm); }
.v-btn.cta:hover { background: #ffe1ea; box-shadow: var(--v-glow-cta); }
.v-btn svg { width: 16px; height: 16px; }
button:disabled { opacity: 0.5; cursor: wait; }
button:focus-visible { outline: 2px solid var(--v-cream); outline-offset: 3px; }


@media (max-width: 700px) {
  .tweak-items { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* keep 1080p proportions at every resolution (--vs set by vice-scale.js) */
.v-plate { zoom: var(--vs, 1); }
