/* ── Workspace Container ─────────────────────────────────────────────────────── */
#workspace {
  position: absolute;
  top: 60px;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  overflow: hidden;
}

/* ── Recipe Reference Card ───────────────────────────────────────────────────── */
#ws-recipe-card {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 148px;
  z-index: 5;
  pointer-events: none;
}
.recipe-card {
  background: var(--c-ticket);
  border: 1px solid #c8b890;
  border-radius: 4px;
  padding: 8px 10px;
  font-family: var(--font-ticket);
  font-size: 10px;
  color: var(--c-ink);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
.rc-name  { font-weight: bold; font-size: 12px; border-bottom: 1px dashed #8a7858; margin-bottom: 5px; padding-bottom: 4px; }
.rc-glass { font-size: 11px; color: #5a4828; margin-bottom: 5px; }
.rc-ingredients { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.rc-ing   { display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.rc-ing.rc-poured { color: #8a7858; text-decoration: line-through; }
.rc-check { min-width: 12px; font-size: 9px; }
.rc-method { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: #7a6848; border-top: 1px dashed #8a7858; padding-top: 4px; margin-top: 2px; }
.rc-notes  { font-size: 8px; color: #8a7858; margin-top: 4px; font-style: italic; line-height: 1.3; }

/* ── Work Surface ────────────────────────────────────────────────────────────── */
#ws-surface {
  flex: 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px 8px 164px; /* leave room for recipe card */
  background: linear-gradient(to bottom, rgba(255,255,255,0.02) 0%, transparent 100%);
  border-radius: var(--r-sm);
  min-height: 0;
}

/* ── Sink ────────────────────────────────────────────────────────────────────── */
#ws-sink {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--c-steel-dark);
  border: 1px solid var(--c-steel);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 11px;
  font-family: var(--font-ui);
  color: var(--c-text-dim);
  cursor: pointer;
  transition: background 0.15s;
}
#ws-sink:hover { background: var(--c-steel); color: var(--c-wood-dark); }

/* ── Workspace Slots ─────────────────────────────────────────────────────────── */
.ws-slot {
  width: 90px;
  min-height: 110px;
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ws-slot:hover { border-color: rgba(200,168,50,0.3); background: rgba(200,168,50,0.04); }
.ws-slot-occupied { border-color: rgba(255,255,255,0.15); border-style: solid; }
.ws-slot-ready    { border-color: var(--c-perfect) !important; box-shadow: 0 0 12px rgba(68,204,68,0.35); }
body.holding .ws-slot:hover {
  border-color: var(--c-gold);
  background: rgba(200,168,50,0.08);
}

/* Shake animation */
.ws-shaking { animation: ws-shake 0.15s ease infinite; }
@keyframes ws-shake {
  0%   { transform: rotate(-6deg) translateX(-3px); }
  50%  { transform: rotate(6deg)  translateX(3px);  }
  100% { transform: rotate(-6deg) translateX(-3px); }
}

/* ── Workspace Item ──────────────────────────────────────────────────────────── */
.ws-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  position: relative;
}
.ws-item-gfx {
  position: relative;
  width: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ws-item-label {
  font-family: var(--font-ui);
  font-size: 9px;
  text-align: center;
  color: var(--c-text-dim);
  line-height: 1.3;
}
.ws-item-state {
  display: block;
  font-size: 8px;
  color: var(--c-gold);
  letter-spacing: 0.04em;
}
.serve-pulse { color: var(--c-perfect); animation: serve-blink 1s ease infinite; }
@keyframes serve-blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Graphic: glass */
.gfx-glass {
  width: 36px;
  height: 56px;
  border: 2px solid var(--c-steel);
  border-top: none;
  border-radius: 0 0 8px 8px;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.gfx-glass-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(100,180,240,0.6), rgba(100,180,240,0.3));
  transition: height 0.4s ease;
  border-radius: 0 0 6px 6px;
}

/* Graphic: tin */
.gfx-tin {
  width: 32px;
  height: 60px;
  border: 2px solid var(--c-steel);
  border-radius: 4px 4px 8px 8px;
  position: relative;
  overflow: hidden;
  background: rgba(184,196,204,0.15);
}
.gfx-tin-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(100,180,240,0.5), rgba(100,180,240,0.2));
  transition: height 0.4s ease;
}

/* Graphic: jigger */
.gfx-jigger {
  width: 24px;
  height: 32px;
  background: var(--c-steel-dark);
  clip-path: polygon(0% 0%, 100% 0%, 70% 50%, 70% 50%, 100% 100%, 0% 100%, 30% 50%);
  transition: background 0.2s;
}
.gfx-jigger-full { background: var(--c-gold); }

/* Badges */
.ws-strainer-badge { position: absolute; top: -8px; right: -6px; font-size: 14px; }
.ws-ice-badge      { position: absolute; top: -4px; left: -6px;  font-size: 12px; }
.ws-full-badge     {
  position: absolute; top: -6px; right: -6px;
  background: var(--c-perfect); color: #fff;
  border-radius: 50%; width: 14px; height: 14px;
  font-size: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}

/* Content dots (ingredient colors) */
.ws-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  max-width: 80px;
}
.ws-content-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: default;
}

/* ── Tool Shelf ──────────────────────────────────────────────────────────────── */
#ws-tools {
  display: flex;
  gap: 6px;
  align-items: stretch;
  padding: 4px 4px 2px;
  background: linear-gradient(to bottom, var(--c-wood) 0%, var(--c-wood-dark) 100%);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-wood-light);
  flex-shrink: 0;
}
.ws-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  min-width: 56px;
}
.ws-tool:hover { background: rgba(200,168,50,0.12); border-color: var(--c-gold); }
.ws-tool-icon  { font-size: 1.5rem; line-height: 1; }
.ws-tool-label { font-family: var(--font-ui); font-size: 9px; color: var(--c-text-dim); text-align: center; }

/* ── Glass Rack ──────────────────────────────────────────────────────────────── */
#ws-glasses {
  display: flex;
  gap: 4px;
  align-items: stretch;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  flex-shrink: 0;
}
.ws-glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  min-width: 46px;
  flex-shrink: 0;
}
.ws-glass:hover { background: rgba(200,168,50,0.1); border-color: var(--c-gold); }
.ws-glass-icon  { font-size: 1.3rem; line-height: 1; }
.ws-glass-label { font-family: var(--font-ui); font-size: 8px; color: var(--c-text-dim); text-align: center; white-space: nowrap; }

/* ── Hint Bar ────────────────────────────────────────────────────────────────── */
#ws-hint {
  display: none;
  justify-content: center;
  padding: 2px;
}

/* ── Held Item Cursor ────────────────────────────────────────────────────────── */
#held-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(26,18,8,0.92);
  border: 2px solid var(--c-gold);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--c-text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
}
#held-cursor.held-visible { display: flex; }
.hc-icon  { font-size: 1.1rem; }
.hc-label { font-size: 12px; }
body.holding { cursor: grabbing !important; }
body.holding * { cursor: grabbing !important; }

/* ── Jigger Fill UI ──────────────────────────────────────────────────────────── */
.jf-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  width: 100%;
}
.jf-title {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--c-gold);
  text-align: center;
  font-weight: bold;
  margin-bottom: 2px;
}
.jf-marks {
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  width: 100%;
}
.jf-mark {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.1s;
}
.jf-mark:hover    { background: rgba(200,168,50,0.2); border-color: var(--c-gold); }
.jf-target        { border-color: var(--c-perfect) !important; }
.jf-label         { font-family: var(--font-mono); font-size: 9px; color: var(--c-text); min-width: 36px; }
.jf-line          { flex: 1; height: 1px; background: rgba(255,255,255,0.2); }

/* ── Free Pour Overlay ───────────────────────────────────────────────────────── */
#fp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,18,8,0.88);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 20;
  cursor: pointer;
  user-select: none;
}
.fp-label { color: var(--c-gold); font-family: var(--font-ui); font-size: 14px; font-weight: bold; }
.fp-sub   { color: var(--c-text-dim); font-family: var(--font-ui); font-size: 11px; }
.fp-bar-wrap {
  width: 36px;
  height: 130px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-steel-dark);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.fp-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0;
  border-radius: 0 0 3px 3px;
  transition: height 40ms linear;
}
.fp-target-line {
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: var(--c-gold);
  pointer-events: none;
}
.fp-target-txt {
  position: absolute; left: 40px;
  font-size: 9px; color: var(--c-gold); font-family: var(--font-mono);
  pointer-events: none;
  white-space: nowrap;
}
.fp-hint { color: var(--c-text-dim); font-family: var(--font-ui); font-size: 10px; }

/* ── Ticket area drop zone ───────────────────────────────────────────────────── */
.well-ticket {
  transition: background 0.2s, border-color 0.2s;
}
body.holding .well-ticket {
  background: rgba(200,168,50,0.12);
  border-color: var(--c-gold) !important;
  cursor: pointer;
}

/* Ticket clear animation */
.ticket-cleared {
  animation: ticket-fly 0.6s ease forwards;
}
@keyframes ticket-fly {
  0%   { opacity: 1; transform: scale(1) translateY(0); }
  60%  { transform: scale(1.05) translateY(-6px); }
  100% { opacity: 0; transform: scale(0.8) translateY(-20px); }
}

/* ── Toast type: hint ────────────────────────────────────────────────────────── */
.toast.hint   { border-color: var(--c-blue); }
.toast.info   { border-color: var(--c-steel-dark); }
