/* [30-hud-side] Pastilles de quêtes, files actives, queue slots et boutons du bord droit */
/* ==========================================================================
   PASTILLES DE QUÊTES SUR LE BORD GAUCHE (sous le médaillon du joueur)
   ========================================================================== */
/* Colonne gauche : médaillons ronds colorés + petite pastille carrée */
#left-quest-badges-strip {
  position: absolute;
  top: 146px;
  left: 9px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.quest-portrait-disc {
  position: relative;
  width: 53px;
  height: 53px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #0c0c0c;
  box-shadow: 0 0 0 2px #b8b2a0, 0 0 0 3px #222, 0 3px 8px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.quest-portrait-disc:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #e7d7c3, 0 0 0 3px #222, 0 0 10px rgba(237, 211, 178, 0.6);
}
.quest-portrait-disc.disc-green { background: radial-gradient(circle at 50% 40%, #67b297 0%, #2b614d 60%, #0e261d 100%); }
.quest-portrait-disc.disc-blue { background: radial-gradient(circle at 50% 40%, #6fb4ea 0%, #1f5e9e 60%, #0a2440 100%); }
.quest-portrait-disc.disc-steel { background: radial-gradient(circle at 50% 45%, #9fb6cc 0%, #3c5874 55%, #121e2c 100%); }

.quest-disc-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
}
.quest-disc-art img { width: 100%; height: 100%; display: block; }
.quest-disc-svg { position: absolute; inset: 1px; width: 47px; height: 47px; }

.quest-alert-dot {
  position: absolute;
  right: -6px;
  bottom: -2px;
  width: 17px;
  height: 17px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3a3a3a, #0c0c0c);
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.quest-alert-dot.dot-red { background: linear-gradient(180deg, #ce4535, #7a241a); }
.quest-alert-dot[hidden] { display: none; }
.quest-alert-dot svg { width: 12px; height: 12px; }

/* ==========================================================================
   FILES ACTIVES — Style (barres fines, progression en fond)
   ========================================================================== */
#right-queues-strip {
  --q-h: 18px;
  position: absolute;
  top: 30px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  z-index: 80;
  pointer-events: none;
  font-family: 'Josefin Sans', 'Gill Sans', 'Trebuchet MS', sans-serif;
}
#right-queues-strip > * {
  pointer-events: auto;
}

/* Minuteur d'évènement : bandeau noir, bord gauche biseauté doré + petit triangle or */
.sale-timer-ribbon {
  position: relative;
  box-sizing: border-box;
  height: 16px;
  margin-bottom: 5px;
  padding: 0 8px 0 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, var(--gold-sand), #93764f);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
/* le bandeau n'a pas de « .hidden » global : sans cette règle il restait affiché sans protection */
.sale-timer-ribbon.hidden { visibility: hidden; } /* garde sa place : les files de la bande de droite restent sous la barre du haut */
.sale-timer-ribbon::before {
  content: '';
  position: absolute;
  inset: 0 0 1px 2px;
  z-index: -1;
  background: linear-gradient(180deg, #121212 0%, #040404 100%);
  clip-path: polygon(9.5px 0, 100% 0, 100% 100%, 0 100%);
}
.sale-timer-ribbon::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 4px;
  border-left: 6px solid #b18f62;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.sale-timer-ribbon > * { position: relative; }
.sale-timer-ribbon { isolation: isolate; }
.sale-timer-ribbon strong { font-weight: 700; color: #fff; }

.queue-marches-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ============================================================
   QUEUE SLOTS — carré d'icône ; ouvert : icône | barre noire | SPEED UP
   ============================================================ */
.queue-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--q-h);
  padding-right: 3px;
  box-sizing: border-box;
}

/* Au repos : carré sombre à liseré or (colonne de droite) */
.queue-slot-icon {
  position: relative;
  z-index: 2;
  width: var(--q-h);
  height: var(--q-h);
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(180deg, #282a2b 0%, #0a0b0c 100%);
  border: 1px solid #785e3c;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #000, 0 1px 3px rgba(0, 0, 0, 0.8);
  transition: filter 0.15s;
}
.queue-slot-icon svg {
  width: 12px;
  height: 12px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
}
.queue-slot-icon:hover { filter: brightness(1.2); }

/* File active : carré rouge à liseré or */
.queue-slot.has-activity .queue-slot-icon {
  background: linear-gradient(180deg, #b23e31 0%, #7a261d 55%, #501710 100%);
  border-color: #c4a67f;
  box-shadow: inset 0 0 0 1px #0f2e24, inset 0 2px 0 rgba(242, 171, 163, 0.35), 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 2e contremaître libre — petit voyant vert */
.queue-slot.idle-builder .queue-slot-icon::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 5px;
  height: 5px;
  background: #58a387;
  border-radius: 50%;
  border: 1px solid #38735d;
  box-shadow: 0 0 3px #58a387;
}

/* Barre : fermée par défaut, s'ouvre à droite de l'icône */
.queue-slot-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--q-h);
  width: 0;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
}
.queue-slot.expanded .queue-slot-bar {
  width: 262px;
  opacity: 1;
}
.queue-slot.expanded .queue-slot-icon { order: -1; }

/* Piste noire à fin liseré, progression rouge qui la remplit */
.queue-slot-bar .queue-progress-track {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  right: 56px;
  height: auto;
  margin: 0;
  overflow: hidden;
  background: var(--ink-black);
  border: 1px solid #817463;
  border-left: none;
  border-radius: 0;
}
.queue-slot-bar .queue-progress-bar {
  height: 100%;
  background: linear-gradient(180deg, #ca4233 0%, #952e23 55%, #5e1a12 100%);
  transition: width 0.5s ease;
}
.queue-slot-bar .queue-progress-bar.bar-return {
  background: linear-gradient(180deg, #cda775 0%, #9a7038 50%, #64461e 100%) !important;
}
.queue-slot-bar .queue-progress-bar.bar-scout {
  background: linear-gradient(180deg, #59b392 0%, #2c745a 50%, #184836 100%) !important;
}

.queue-bar-text {
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin-right: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 0 6px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px #000;
}
.queue-inline-name { overflow: hidden; text-overflow: ellipsis; }
.queue-inline-time { flex-shrink: 0; margin-left: auto; font-variant-numeric: tabular-nums; }

/* SPEED UP : bouton rouge arrondi, séparé de la piste */
.btn-speedup-red {
  position: absolute;
  right: 0;
  top: 2px;
  z-index: 1;
  box-sizing: border-box;
  width: 52px;
  height: 14px;
  padding: 0;
  background: linear-gradient(180deg, #d65344 0%, #a43528 50%, #7a241a 100%);
  border: 1px solid #e8b0aa;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(243, 225, 202, 0.5), 0 0 0 1px #0f2e24, 0 1px 3px rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: inherit;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 12px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.btn-speedup-red:hover { filter: brightness(1.15); }

/* Marches dans le slot — affichage vertical en liste vers le bas */
#queue-slot-marches {
  height: auto;
  min-height: var(--q-h);
  align-items: flex-start;
}

#queue-slot-marches .queue-slot-icon {
  align-self: flex-start;
}

#queue-slot-marches .queue-slot-bar {
  height: auto;
  min-height: var(--q-h);
  flex-direction: column;
  align-items: stretch;
  background: none;
  border: none;
  padding: 0;
  margin-right: -1px;
}

#queue-slot-marches.expanded .queue-slot-bar {
  width: 262px;
}

.queue-slot-bar .queue-marches-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 0;
}

/* Cartes de marche : même rangée que les files (piste noire + SPEED UP) */
.march-inline-card {
  position: relative;
  height: var(--q-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.march-inline-card .queue-progress-track {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  right: 56px;
  overflow: hidden;
  background: var(--ink-black);
  border: 1px solid #817463;
  border-left: none;
}
.march-inline-card .queue-progress-bar {
  height: 100%;
  background: linear-gradient(180deg, #ca4233 0%, #952e23 55%, #5e1a12 100%);
  transition: width 0.5s ease;
}
.march-inline-card .queue-progress-bar.bar-return {
  background: linear-gradient(180deg, #cda775 0%, #9a7038 50%, #64461e 100%) !important;
}
.march-inline-card .queue-progress-bar.bar-scout {
  background: linear-gradient(180deg, #59b392 0%, #2c745a 50%, #184836 100%) !important;
}
.march-inline-card .march-text {
  z-index: 1;
  flex: 1;
  min-width: 0;
  margin-right: 56px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 8px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 1px #000;
}
.march-inline-card .march-text > span { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.march-inline-card .btn-speedup-march:disabled { filter: grayscale(0.8); cursor: wait; }

/* Active queue card — compat legacy (display toggling) */
.active-queue-card {
  display: none;
}

/* Ancien layout (masquer les anciens éléments dans les cards refondues) */
.queue-row-top,
.queue-row-bottom {
  display: none;
}

.queue-countdown {
  font-family: monospace;
  font-weight: bold;
  font-size: 10px;
  color: var(--gold-highlight);
}

/* Tags pour marches (gardés pour compatibilité) */
.queue-tag {
  background: #2f735c;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 7px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 1px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.queue-tag.tag-return {
  background: linear-gradient(180deg, #805c2e 0%, #483419 100%) !important;
  color: #f7ecde !important;
  border: 1px solid var(--gold-bright);
}

.queue-tag.tag-scout {
  background: linear-gradient(180deg, #235643 0%, #123327 100%) !important;
  color: #cce2da !important;
  border: 1px solid #8abeab;
}

/* ==========================================================================
   COLONNE DE BOUTONS ROUGES SUR LE BORD DROIT (comme l'original)
   ========================================================================== */
#right-gold-action-bar {
  position: absolute;
  top: 30px;
  right: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 80;
}

.gold-icon-btn {
  width: 30px;
  height: 30px;
  background: linear-gradient(180deg, #b04135 0%, #70241b 55%, #41120d 100%);
  border: 1px solid #b18f62;
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px #0b211a, inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s, filter 0.15s;
}

.gold-icon-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
  border-color: #e9c9a0;
}
