/* HaiGames SDK — Emoji Guess styles
 *
 * Shared overlay/sheet/header/buddy-comment come from games/games.css.
 * This file only holds emoji-guess-specific elements (chip rows, big emoji, input, etc.).
 *
 * Namespace: .hg-emoji-*
 */

.hg-emoji-sheet {
  /* Slightly roomier than TTT (we have chips + input + feedback stacked). */
  max-width: 520px;
}

/* ---------- Category chips (horizontal scroll on narrow viewports) ---------- */

.hg-emoji-chiprow {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px 2px;
  margin: 0 -2px 8px -2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.hg-emoji-chiprow::-webkit-scrollbar { display: none; }

.hg-emoji-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hg-emoji-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}
.hg-emoji-chip.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28) 0%, rgba(139, 92, 246, 0.38) 100%);
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
}

/* ---------- Difficulty segmented control ---------- */

.hg-emoji-diffrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.hg-emoji-seg {
  padding: 8px 4px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hg-emoji-seg:hover { color: rgba(255, 255, 255, 0.85); }
.hg-emoji-seg.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28) 0%, rgba(139, 92, 246, 0.38) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ---------- Big emoji display ---------- */

.hg-emoji-display {
  text-align: center;
  font-size: 72px;
  line-height: 1.05;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  letter-spacing: 6px;
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  margin-bottom: 8px;
  /* Fallback font stack for colorful emoji across OSes. */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
    "EmojiOne Color", "Twemoji", sans-serif;
}

.hg-emoji-badge {
  text-align: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
  min-height: 14px;
  font-weight: 600;
}

/* ---------- Input ---------- */

.hg-emoji-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  margin-bottom: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.hg-emoji-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.hg-emoji-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(167, 139, 250, 0.5);
}
.hg-emoji-input:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Action buttons row ---------- */

.hg-emoji-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
  margin-bottom: 12px;
}

.hg-emoji-btn {
  padding: 11px 10px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
  border: 1px solid transparent;
}
.hg-emoji-btn:active { transform: scale(0.97); }
.hg-emoji-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.hg-emoji-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.hg-emoji-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.hg-emoji-btn-primary {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.35) 0%, rgba(139, 92, 246, 0.5) 100%);
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
}
.hg-emoji-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.48) 0%, rgba(139, 92, 246, 0.62) 100%);
}

/* ---------- Feedback area (reuses .hg-buddy-comment base) ---------- */

.hg-emoji-feedback {
  font-style: normal; /* override italic from base so it's easier to scan */
  text-align: left;
}
.hg-emoji-feedback.tone-good {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
  color: rgba(220, 252, 231, 0.95);
}
.hg-emoji-feedback.tone-bad {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: rgba(254, 226, 226, 0.95);
}
.hg-emoji-feedback.tone-warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: rgba(254, 243, 199, 0.95);
}

.hg-emoji-feedback strong { color: #fff; font-weight: 700; }
.hg-emoji-feedback em { font-style: italic; color: rgba(255, 255, 255, 0.75); }

.hg-emoji-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
}
.hg-emoji-hint-line {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}
.hg-emoji-hint-line:first-child { margin-top: 0; }
.hg-emoji-nostreak {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin-left: 4px;
}

/* ---------- Stats bar ---------- */

.hg-emoji-stats {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}

/* ---------- Narrow-viewport tweaks ---------- */

@media (max-width: 420px) {
  .hg-emoji-display {
    font-size: 60px;
    min-height: 104px;
    letter-spacing: 4px;
  }
  .hg-emoji-actions {
    grid-template-columns: 1fr 1fr;
  }
  .hg-emoji-actions .hg-emoji-btn-primary {
    grid-column: 1 / -1;
  }
}
