/* Tagboard — ticker Home + pagina */

.xg-tb-ticker {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  margin: 0.85rem 0 0.15rem;
  padding: 0.28rem 0.4rem 0.28rem 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.1), rgba(15, 23, 42, 0.55) 28%, rgba(15, 23, 42, 0.45));
  min-height: 2.2rem;
  overflow: hidden;
  font-size: 90%;
}

.xg-tb-ticker__badge,
.xg-tb-ticker__more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 1.95rem;
  padding: 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.xg-tb-ticker__badge:hover,
.xg-tb-ticker__more:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

.xg-tb-ticker__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.xg-tb-ticker__track {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}

.xg-tb-ticker--marquee .xg-tb-ticker__track {
  animation: xg-tb-marquee 42s linear infinite;
}

.xg-tb-ticker--static .xg-tb-ticker__track {
  animation: none;
  max-width: 100%;
}

.xg-tb-ticker--static .xg-tb-ticker__group {
  min-width: 0;
  max-width: 100%;
  padding-right: 0;
  gap: 0.35rem;
  overflow: hidden;
}

.xg-tb-ticker--static .xg-tb-ticker__item {
  max-width: 100%;
  overflow: hidden;
}

.xg-tb-ticker__group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  min-width: 100%;
  padding-right: 2.5rem;
  box-sizing: border-box;
}

.xg-tb-ticker--marquee:hover .xg-tb-ticker__track,
.xg-tb-ticker--marquee:focus-within .xg-tb-ticker__track {
  animation-play-state: paused;
}

@keyframes xg-tb-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .xg-tb-ticker--marquee .xg-tb-ticker__track {
    animation: none;
  }
  .xg-tb-ticker__group[aria-hidden="true"] {
    display: none;
  }
  .xg-tb-ticker__group {
    min-width: 0;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    gap: 0.2rem;
    padding-right: 0;
  }
  .xg-tb-ticker__viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
  }
}

.xg-tb-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 0.78rem;
  max-width: 42rem;
}

.xg-tb-ticker__item:hover .xg-tb-ticker__body {
  color: #fff;
}

.xg-tb-ticker__who {
  font-weight: 800;
  color: #7dd3fc;
}

.xg-tb-ticker__crest {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
  margin: 0 0.05rem;
}

.xg-tb-ticker__team {
  font-weight: 650;
  color: #94a3b8;
  font-size: 0.9em;
}

.xg-tb-ticker__sep {
  color: #64748b;
}

.xg-tb-ticker__body {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
}

.xg-tb-ticker__when {
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.xg-tb-ticker--empty {
  align-items: center;
}
.xg-tb-ticker__empty-msg {
  margin: 0;
  font-size: 0.78rem;
  flex: 1 1 auto;
}
.xg-tb-ticker__empty-msg a {
  color: #7dd3fc;
  font-weight: 700;
}

/* Pagina */
.xg-tb-page {
  padding-bottom: 2.5rem;
}

.xg-tb-page__hero {
  margin: 0.5rem 0 1.1rem;
}

.xg-tb-page__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.xg-tb-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.xg-tb-page__lead {
  margin: 0;
  max-width: 40rem;
  color: #94a3b8;
  line-height: 1.45;
}

.xg-tb-flash {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  font-weight: 650;
}

.xg-tb-flash--ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.xg-tb-flash--err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

/* Lista stile log: Gamertag (Team) · messaggio … data */
.xg-tb-board {
  padding: 0;
  margin-bottom: 1rem;
  overflow: hidden;
}

.xg-tb-board__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.35);
}

.xg-tb-board__title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.xg-tb-board__count {
  font-size: 0.78rem;
}

.xg-tb-log {
  display: flex;
  flex-direction: column;
}

.xg-tb-log__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.xg-tb-log__row:last-child {
  border-bottom: 0;
}

.xg-tb-log__row:hover {
  background: rgba(14, 165, 233, 0.05);
}

.xg-tb-log__line {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
  font-size: 0.92rem;
  color: #e2e8f0;
  word-break: break-word;
}

.xg-tb-log__who {
  color: #7dd3fc;
  font-weight: 800;
  white-space: nowrap;
}

.xg-tb-log__team {
  color: #94a3b8;
  font-weight: 650;
}

.xg-tb-log__sep {
  color: #64748b;
  margin: 0 0.2rem;
}

.xg-tb-log__body {
  color: #e2e8f0;
}

.xg-tb-log__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.xg-tb-log__when {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.xg-tb-feed__empty {
  padding: 1.2rem 0.9rem;
  margin: 0;
}

.xg-tb-msg__del {
  margin: 0;
  display: inline;
}

.xg-tb-msg__del-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f87171;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.15rem;
  opacity: 0.75;
}

.xg-tb-msg__del-btn:hover {
  opacity: 1;
}

/* Editor in basso */
.xg-tb-compose {
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.xg-tb-compose__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.xg-tb-compose__input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 3.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
  color: #f1f5f9;
  font: inherit;
  line-height: 1.4;
}

.xg-tb-compose__input--editor {
  min-height: 4.2rem;
  font-size: 0.95rem;
}

.xg-tb-compose__input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.xg-tb-emoji {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.55rem 0 0.65rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.xg-tb-emoji__btn {
  appearance: none;
  border: 0;
  background: transparent;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.xg-tb-emoji__btn:hover {
  background: rgba(56, 189, 248, 0.15);
}

.xg-tb-compose__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.xg-tb-compose__btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.xg-tb-compose__hint,
.xg-tb-compose__guest {
  margin: 0;
  font-size: 0.82rem;
}

.xg-tb-page .visually-hidden,
.xg-tb-ticker .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  /* Home ticker: lista compatta (max 3), niente marquee */
  .xg-tb-ticker {
    align-items: flex-start;
    margin: 0.45rem 0 0.1rem;
    padding: 0.22rem 0.35rem;
    min-height: 0;
  }
  .xg-tb-ticker--marquee .xg-tb-ticker__track {
    animation: none;
    width: 100%;
    max-width: 100%;
  }
  .xg-tb-ticker__group[aria-hidden="true"] {
    display: none;
  }
  .xg-tb-ticker__viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }
  .xg-tb-ticker__group,
  .xg-tb-ticker--static .xg-tb-ticker__group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0;
  }
  .xg-tb-ticker__item,
  .xg-tb-ticker--static .xg-tb-ticker__item {
    max-width: 100%;
    white-space: nowrap;
    line-height: 1.25;
    padding: 0.05rem 0;
  }
  .xg-tb-ticker__badge,
  .xg-tb-ticker__more {
    align-self: stretch;
    width: 1.7rem;
  }

  .xg-tb-log__row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .xg-tb-log__meta {
    justify-content: flex-end;
  }
  .xg-tb-log__who {
    white-space: normal;
  }
}
