/*
  Home data layout module.
  Extracted from the former modules/30-market-economy.css; keep after 33-market-table.css.
*/

/* ------------------------------
   WebChat (Home)
   ------------------------------ */
.homeMainGrid{
  display:grid;
  grid-template-columns: clamp(340px, 30vw, 460px) minmax(0, 1fr);
  grid-template-areas: "homeChat homeNews";
  gap: 14px;
  align-items:start;
}
.homeMainGrid__chat{ grid-area: homeChat; }
.homeMainGrid__news{ grid-area: homeNews; }

/* Tablet: keep page as 2 columns (main+sidebar), but stack chat under news */
@media (max-width: 1199px){
  .homeMainGrid{
    grid-template-columns: 1fr;
    grid-template-areas: "homeNews" "homeChat";
  }
}

.webchatPanel .panel__head .h1{ margin: 0; }

.webchat{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.webchat__list{
  height: 560px;
  overflow:auto;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(8,12,18,.55), rgba(10,14,22,.72));
  box-shadow: var(--shadow);
  padding: 10px;
}
@media (max-width: 1199px){
  .webchat__list{ height: 360px; }
}

.webchat__loading,
.webchat__empty{
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
}

.webchatMsg{
  display:flex;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.16);
  margin-bottom: 8px;
}
@keyframes webchatPop{
  from{
    opacity: 0;
    transform: translateY(10px) scale(.985);
    background: rgba(60,120,220,.10);
    border-color: rgba(120,180,255,.20);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
    background: rgba(0,0,0,.16);
    border-color: rgba(255,255,255,.06);
  }
}
.webchatMsg--new{
  animation: webchatPop .22s ease-out both;
}
@media (prefers-reduced-motion: reduce){
  .webchatMsg--new{ animation: none; }
}

.webchatMsg:last-child{ margin-bottom: 0; }

.webchatAvatar{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  object-fit: cover;
  flex: 0 0 auto;
}

.webchatBody{ min-width: 0; flex: 1; }

.webchatMeta{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.1;
  margin-bottom: 4px;
  min-width: 0;
}
.webchatTime{ color: var(--muted); font-variant-numeric: tabular-nums; }
.webchatPrefix{
  color: rgba(231,237,243,.92);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}
.webchatNick{
  font-weight: 1000;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.webchatBadge{
  font-size: 11px;
  font-weight: 1000;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(240,140,40,.28);
  background: rgba(240,140,40,.10);
  color: rgba(240,140,40,.95);
  white-space: nowrap;
}


.webchatDelivery{
  font-size: 11px;
  font-weight: 1000;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(231,237,243,.88);
  white-space: nowrap;
}
.webchatDelivery--sent{
  border-color: rgba(140,200,255,.24);
  background: rgba(140,200,255,.08);
  color: rgba(180,220,255,.95);
}
.webchatDelivery--queued{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  color: rgba(231,237,243,.78);
}
.webchatDelivery--delivered{
  border-color: rgba(120,255,180,.22);
  background: rgba(120,255,180,.08);
  color: rgba(160,255,210,.95);
}
.webchatDelivery--error{
  border-color: rgba(255,120,120,.28);
  background: rgba(255,120,120,.10);
  color: rgba(255,170,170,.95);
}

.webchatText{
  color: rgba(231,237,243,.92);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.webchat__composer{
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(15,23,34,.62);
  box-shadow: var(--shadow);
  padding: 10px;
}

.webchatMeRow{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 8px;
}
.webchatMeName{ font-weight: 1000; line-height: 1.1; }
.webchatMeId{ color: var(--muted); font-size: 12px; }

.webchat__form{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items:center;
}
.webchat__field{
  min-width: 0;
}
.webchat__input{
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 14px;
}
.webchat__input::placeholder{
  color: rgba(231,237,243,.48);
}
.webchat__send{
  white-space: nowrap;
  min-width: 132px;
  min-height: 42px;
  justify-self: end;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding-inline: 16px;
  border-radius: 14px;
}
.webchat__send .fa-paper-plane{
  font-size: 12px;
}

@media (max-width: 520px){
  .webchat__form{ grid-template-columns: 1fr; align-items: stretch; }
  .webchat__send{ width: 100%; justify-self: stretch; }
  .webchat__list{ height: 320px; }
}


.webchat__status{
  margin-top: 8px;
  font-size: 12px;
  min-height: 16px;
}

/* =========================
   Global loader (GIF)
   ========================= */
.globalLoader{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,10,12,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.globalLoader.is-active{
  opacity: 1;
  pointer-events: auto;
}
.globalLoader__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(18, 22, 28, .72);
  box-shadow: 0 14px 45px rgba(0,0,0,.45);
}
.globalLoader__gif{
  width: 140px;
  height: auto;
}
.globalLoader__text{
  font: 600 14px/1.2 var(--font);
  color: var(--text900);
  opacity: .9;
}


/* Accessibility: reduced motion (global) */
@media (prefers-reduced-motion: reduce){
  html:focus-within{ scroll-behavior:auto; }
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior:auto !important;
  }
  .btn:hover,
  .btn-ghost:hover,
  .navLink:hover,
  .playerRow:hover,
  .telemetryRow:hover,
  .rankTile:hover,
  .shopsTab:hover,
  .podiumCard--first,
  .podiumCard:hover{
    transform:none !important;
  }
}


