
:root {
  --bg-dark: #121417;
  --bg-card: #1c1f24;
  --text-main: #f0f2f5;
  --text-muted: #8c96a5;
  --accent-green: #1db954;
  --accent-gold: #f4b400;
  --accent-blue: #0088cc;
  --accent-red: #d32f2f;
  --poker-teal: #056b6b;
  --poker-felt: radial-gradient(ellipse at center, #0a8484 0%, #034b4b 65%, #012b2b 100%);
  --table-border: #14b8a6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* CARTE DA POKER CSS */
.poker-card {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 48px;
  height: 68px;
  background: #ffffff;
  border-radius: 5px;
  border: 1px solid #c0c0c0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  padding: 3px 5px;
  font-weight: bold;
  user-select: none;
}
.poker-card.red { color: #d32f2f; }
.poker-card.black { color: #111111; }
.poker-card .val { font-size: 18px; line-height: 1; }
.poker-card .suit { font-size: 22px; text-align: right; line-height: 1; }

.poker-card-mini {
  width: 18px;
  height: 25px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  border: 1px solid #ffffff;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  display: inline-block;
}

/* FICHES CSS */
.poker-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px dashed #ffffff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 6px rgba(0,0,0,0.6);
}
.chip-1c { background: #8d6e63; color: #fff; }
.chip-5c { background: #f44336; color: #fff; }
.chip-10c { background: #2196f3; color: #fff; }
.chip-25c { background: #4caf50; color: #fff; }
.chip-1e { background: #ff9800; color: #fff; }
.chip-5e { background: #9c27b0; color: #fff; }

.chip-stack {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* =======================================================
   INFO BADGE & HELP TOOLTIP GLOBALE (SUPER-ADMIN & BACKOFFICE)
   ======================================================= */
.info-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #2196f3 0%, #1976d2 100%);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 900;
  border: 1.5px solid #bbdefb;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-left: 6px;
  user-select: none;
  transition: all 0.15s ease;
  line-height: 1;
}

.info-help-btn:hover {
  transform: scale(1.2);
  background: radial-gradient(circle, #42a5f5 0%, #1e88e5 100%);
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.8);
}

.info-help-btn .info-tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 135%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #0d121a;
  color: #f0f6fc;
  text-align: left;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #388bfd;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.95), 0 0 12px rgba(56, 139, 253, 0.3);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  width: 280px;
  max-width: 320px;
  z-index: 999999;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Freccia verso l'alto poiché il tooltip si apre verso il basso */
.info-help-btn .info-tooltip-box::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #388bfd transparent;
}

/* Allineamento per pulsanti all'estrema destra */
.info-help-btn.align-right .info-tooltip-box,
.info-help-btn .info-tooltip-box.align-right {
  left: auto;
  right: -10px;
  transform: translateY(-4px);
}
.info-help-btn.align-right .info-tooltip-box::after,
.info-help-btn .info-tooltip-box.align-right::after {
  left: auto;
  right: 14px;
}

/* Allineamento per pulsanti all'estrema sinistra */
.info-help-btn.align-left .info-tooltip-box,
.info-help-btn .info-tooltip-box.align-left {
  left: -10px;
  right: auto;
  transform: translateY(-4px);
}
.info-help-btn.align-left .info-tooltip-box::after,
.info-help-btn .info-tooltip-box.align-left::after {
  left: 14px;
  right: auto;
}

.info-help-btn:hover .info-tooltip-box {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.info-help-btn.align-right:hover .info-tooltip-box,
.info-help-btn:hover .info-tooltip-box.align-right {
  transform: translateY(0);
}
.info-help-btn.align-left:hover .info-tooltip-box,
.info-help-btn:hover .info-tooltip-box.align-left {
  transform: translateY(0);
}

/* ==========================================================================
   SELETTORE LINGUA LUSSO CON BANDIERE VETTORIALI (IT / EN)
   Evita problemi con i font emoji di Windows che mostrano "IT ɪᴛ" o "EN ɢʙ"
   ========================================================================== */
.lang-switcher-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 20, 29, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 20px;
  padding: 2px 4px;
  gap: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  user-select: none;
  vertical-align: middle;
}

.lang-switcher-pill .lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.6px;
}

.lang-switcher-pill .lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher-pill .lang-btn.active {
  background: linear-gradient(135deg, #ffd54f 0%, #ff9800 100%);
  color: #0b0f14;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.lang-flag {
  width: 17px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
