/* ═════════════════════════════════════════════════════════════
 *  Vice Drops · pickup prompt — GTA VI "Vice" design layer
 *
 *  Body contract (unchanged):
 *    body.pickup-off
 *    body.pickup-style-{arc|minimal|ring|tag}
 *    body[data-pickup-name] / [data-pickup-count]
 *    --pickup-scale, --pickup-accent, --pickup-accent-rgb
 *
 *  Layout: a world dot, then a small night plate with the key pill on
 *  the left, the item name as the title and "TAKE · x3" as the
 *  subtitle underneath. Sunset strip on the plate's top-left.
 * ═════════════════════════════════════════════════════════════ */

@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-lilac: #e5ddff;
  --v-lilac-soft: #ccc2f5;
  --v-peach: #ffd4a8;
  --v-ink: #0f0c1a;
  --v-night: linear-gradient(189deg, #1f1f38 0.55%, #18182d 30.38%, #111222 65.19%, #0c0d1b 100%);
  --v-sunset-line: linear-gradient(90deg, #ffdf80 0%, #f4717c 50%, #e963c7 100%);
  --v-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body { margin: 0; background: transparent; }

@keyframes pickupIn {
  from { opacity: 0; translate: 0 6px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes pickupOut {
  from { opacity: 1; translate: 0 0; }
  to   { opacity: 0; translate: 0 4px; }
}
@keyframes pickupRingPulse {
  0%   { transform: scale(1); opacity: 0.5; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

.pickup-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  overflow: hidden;
}

.pickup {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

body.pickup-anchor-screen .pickup-primary {
  transform: none !important;
  left: 50%;
  top: auto;
  bottom: 22vh;
}
body.pickup-anchor-screen .pickup-primary .pickup-body {
  transform: translate(-50%, 0) scale(calc(var(--pickup-scale, 1) * var(--vres, 1)));
  transform-origin: center;
}
body.pickup-anchor-screen .pickup-primary .pickup-ring { display: none; }

.pickup-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-7px, -50%) scale(calc(var(--pickup-scale, 1) * var(--vres, 1)));
  transform-origin: 7px center;
  animation: pickupIn 200ms var(--v-ease) both;
  font-family: var(--v-font);
  letter-spacing: -0.015em;
  color: #fff;
}
.pickup-leave .pickup-body { animation: pickupOut 200ms ease-out both; }

/* ── world dot ─────────────────────────────────────────────── */
.pickup-ring {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pickup-ring-outer,
.pickup-ring-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.pickup-ring-outer {
  border: 1.5px solid rgba(229, 221, 255, 0.7);
  background: rgba(12, 13, 27, 0.45);
}
.pickup-ring-inner {
  inset: 4px;
  background: var(--v-lilac);
}
.pickup-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 178, 198, 0.75);
  animation: pickupRingPulse 2.4s ease-out infinite;
}
.pickup-primary .pickup-ring-outer { border-color: var(--v-cream); }
.pickup-primary .pickup-ring-inner { background: var(--pickup-accent, var(--v-pink)); }
.pickup-primary .pickup-ring::after { animation-duration: 1.6s; }

/* ── the tag: key pill + title / subtitle stack ────────────── */
.pickup-tag {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas:
    "key label label"
    "key action count";
  align-items: center;
  justify-content: start;
  column-gap: 10px;
  row-gap: 3px;
  padding: 9px 16px 9px 9px;
  border-radius: 12px;
  background: var(--v-night);
  box-shadow: 0 14px 34px rgba(7, 7, 15, 0.5);
  overflow: hidden;
  white-space: nowrap;
}
.pickup-tag::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  width: 64px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--v-sunset-line);
}

.pickup-key {
  grid-area: key;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  box-sizing: border-box;
  border-radius: 1000px;
  background: var(--v-cream);
  color: var(--v-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 500 12px/1 var(--v-font);
  letter-spacing: 0.04em;
}

/* main line: the item name */
.pickup-label {
  grid-area: label;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 500 15px/1.05 var(--v-font);
  color: var(--v-cream);
  text-transform: uppercase;
  letter-spacing: 0;
}

/* subtitle: the action word + stack count */
.pickup-action {
  grid-area: action;
  font: 500 9.5px/1.2 var(--v-font);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--v-lilac-soft);
}
.pickup-count {
  grid-area: count;
  font: 500 9.5px/1.2 var(--v-font);
  letter-spacing: 0.08em;
  color: var(--pickup-accent, var(--v-pink));
}
.pickup-count:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: rgba(229, 221, 255, 0.4);
  vertical-align: middle;
}

.pickup:not(.pickup-primary) .pickup-tag { display: none; }
body.pickup-off .pickup-layer { display: none; }
body[data-pickup-count="0"] .pickup-count { display: none; }
body.inventory-open .pickup-layer { opacity: 0; }

/* name hidden: the action becomes the title */
body[data-pickup-name="0"] .pickup-label { display: none; }
body[data-pickup-name="0"] .pickup-tag { grid-template-areas: "key action count"; }
body[data-pickup-name="0"] .pickup-action { font-size: 12px; color: var(--v-cream); }

/* ── style: minimal (no plate, text over the world) ────────── */
body.pickup-style-minimal .pickup-ring { display: none; }
body.pickup-style-minimal .pickup-primary .pickup-ring { display: block; width: 6px; height: 6px; }
body.pickup-style-minimal .pickup-primary .pickup-ring::after,
body.pickup-style-minimal .pickup-primary .pickup-ring-outer { display: none; }
body.pickup-style-minimal .pickup-tag {
  background: transparent;
  box-shadow: none;
  padding: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6);
}
body.pickup-style-minimal .pickup-tag::before { display: none; }
body.pickup-style-minimal .pickup-key { text-shadow: none; }

/* ── style: ring (dots only) ───────────────────────────────── */
body.pickup-style-ring .pickup-tag { background: transparent; box-shadow: none; padding: 0; }
body.pickup-style-ring .pickup-tag::before { display: none; }
body.pickup-style-ring .pickup-action,
body.pickup-style-ring .pickup-label,
body.pickup-style-ring .pickup-count { display: none; }
body.pickup-style-ring .pickup-ring { width: 18px; height: 18px; }
body.pickup-style-ring .pickup-primary .pickup-ring-outer { border-width: 2px; }

/* ── style: tag (pill, accent key, no dot) ─────────────────── */
body.pickup-style-tag .pickup-ring { display: none; }
body.pickup-style-tag .pickup-tag { border-radius: 1000px; padding: 7px 20px 7px 7px; }
body.pickup-style-tag .pickup-tag::before { left: 24px; }
body.pickup-style-tag .pickup-key {
  background: var(--pickup-accent, var(--v-pink));
  color: #603a55;
}

body.anim-reduced .pickup-ring::after,
body.anim-off .pickup-ring::after { animation: none; display: none; }
body.anim-off .pickup-body { animation: none; }
body.anim-off .pickup { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .pickup-ring::after { animation: none; display: none; }
}

/* resolution scale: the prompt keeps 1080p proportions from 720p to 4K */
:root { --vres: 1; }
@media (max-height: 800px) { :root { --vres: 0.8; } }
@media (min-height: 1300px) { :root { --vres: 1.333; } }
@media (min-height: 1700px) { :root { --vres: 1.6; } }
@media (min-height: 2000px) { :root { --vres: 2; } }

/* narrow / portrait screens */
@media (max-width: 520px) { :root { --vres: 0.7; } }
