/*
  Home news and shared UI module.
  Extracted from the former modules/20-home-news-profile.css; keep after foundation and before 21-profile-legacy-ui.css.
*/

/*
 * Extracted from assets/app.css on 2026-04-06.
 * Section: Home, news, profile, map, footer and cookie sections
 * Source lines: 1701-3306
 */

.newsGrid{
  display:flex;
  flex-direction:column;
  gap: 14px;
  margin-top: 12px;
}
.newsCard{
  position: relative;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(8,12,18,.92), rgba(10,14,22,.96));
  border-radius: var(--r);
  overflow:hidden;
  padding: 16px;
  box-shadow: var(--shadow);
  display:flex;
  gap: 14px;
  align-items: stretch;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.newsCard::before{
  content:'';
  position:absolute;
  left:0; top:0; bottom:0;
  width: 5px;
  background: linear-gradient(180deg, rgba(240,140,40,.95), rgba(194,106,24,.65));
  border-radius: var(--r) 0 0 var(--r);
  opacity:.35;
}
.newsCard:hover{
  border-color: rgba(240,140,40,.28);
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
  transform: translateY(-1px);
}
.newsCard__tag{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,106,0,.35);
  background: rgba(255,106,0,.08);
  color: var(--text);
  font-weight: 900;
  font-size: 12px;
}
.newsCard__title{ margin: 0; font-size: clamp(18px, 1.2vw, 20px); font-weight: 1000; letter-spacing:.15px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.newsCard__text{ margin: 0; color: rgba(231,237,243,.88); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.newsCard__meta{ margin-top: 0; color: var(--muted); font-size: 12px; }

.newsCard__cover{
  position: relative;
  display:block;
  /* Make cover size fluid so text doesn't become too narrow on mid widths */
  flex: 0 0 clamp(220px, 26vw, 340px);
  max-width: clamp(220px, 26vw, 340px);
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--control-radius) - 2px);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  margin: 0;
}
.newsCard__cover img{
  width:100%;
  height: 100%;
  object-fit:cover;
  display:block;
  filter: saturate(1.08) contrast(1.06);
}

.newsCard__cover--placeholder{
  background:
    radial-gradient(380px 220px at 30% 20%, rgba(240,140,40,.18), rgba(0,0,0,.12)),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.08));
}
.newsCard__cover--placeholder::after{
  content: "";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.22));
  pointer-events:none;
}
.newsCard__body{ flex: 1 1 auto; min-width: 0; padding-left: 6px; display:flex; flex-direction:column; gap: 8px; }

@media (max-width: 980px){
  .newsCard{ flex-direction: column; }
  .newsCard__cover{
  position: relative; max-width: 100%; flex-basis: auto; width: 100%; }

}

@media (max-width: 520px){
  .newsCard{ padding: 12px; gap: 12px; }
  .newsCard__actions{ justify-content: flex-start; }
}
.newsCard__head{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom: 8px;
}
.newsCard__actions{
  margin-top: auto;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.newsCard__link{ color: inherit; text-decoration:none; }
.newsCard__link:hover{ color: var(--accent); }

.newsHero{
  margin: 12px auto 0;
  max-width: 920px;
  border-radius: var(--r2);
  overflow:hidden;
  border: 1px solid var(--border);
  /* Smart frame: ONLY side black borders for non-wide images.
     IMPORTANT: we DO NOT shrink the image to fit the borders.
     Instead we keep cover (full size) and crop top/bottom if needed. */
  background: rgba(0,0,0,.72);
  aspect-ratio: 16 / 7; /* Р СР ВµР Р…РЎРЉРЎв‚¬Р Вµ Р С—Р С• Р Р†РЎвЂ№РЎРѓР С•РЎвЂљР Вµ, РЎС“Р Т‘Р С•Р В±Р Р…Р ВµР Вµ РЎвЂЎР С‘РЎвЂљР В°РЎвЂљРЎРЉ Р Р…Р С•Р Р†Р С•РЎРѓРЎвЂљРЎРЉ */
  --media-frame: 12%;
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.newsHero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  filter: saturate(1.08) contrast(1.05);
}
.newsHero.is-wide{ background: rgba(0,0,0,.72); }
.newsHero.is-boxed{ background: rgba(0,0,0,.72); }

/* Side borders rendered as overlays (do not affect layout, do not shrink media). */
.newsHero.is-boxed::before,
.newsHero.is-boxed::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width: var(--media-frame);
  z-index: 2;
  pointer-events:none;
}
.newsHero.is-boxed::before{
  left:0;
  background: linear-gradient(to right, rgba(0,0,0,.90), rgba(0,0,0,.90) 70%, rgba(0,0,0,0));
}
.newsHero.is-boxed::after{
  right:0;
  background: linear-gradient(to left, rgba(0,0,0,.90), rgba(0,0,0,.90) 70%, rgba(0,0,0,0));
}
@media (max-width: 980px){
  .newsHero{ max-width: 100%; }
}

.pill--soft{
  border-color: rgba(46,204,113,.45);
  background: rgba(46,204,113,.10);
  color: var(--text);
}
.btn--sm{ padding: 7px 10px; font-size: 13px; border-radius: calc(var(--control-radius) - 2px); }
.btn--xs{ padding: 6px 8px; font-size: 12px; border-radius: calc(var(--control-radius) - 4px); }

.cmt__mod{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }

/* Reactions active state */
.btn.is-active{
  border-color: rgba(255, 155, 80, .55);
  background: rgba(255, 155, 80, .12);
}

.newsBody{
  margin-top: 14px;
}

/* News empty state */
.emptyState{
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: var(--r);
  padding: 18px;
  background: rgba(8,12,18,.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.emptyState__title{
  font-weight: 1000;
  color: var(--text900);
  letter-spacing:.2px;
}
.emptyState__text{
  margin-top: 4px;
  color: rgba(231,237,243,.82);
  line-height: 1.5;
}

/* Unified state blocks (loading / empty / error) */
.state{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: rgba(0,0,0,.14);
  color: rgba(231,237,243,.90);
}
.state__icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.state__icon i{ opacity:.92; }
.state__body{ min-width:0; }
.state__title{
  font-weight: 1000;
  letter-spacing:.2px;
  line-height: 1.2;
}
.state__text{
  margin-top: 4px;
  color: rgba(231,237,243,.78);
  line-height: 1.45;
  font-size: 13px;
}
.state__actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}
.state--info{ border-style: solid; border-color: rgba(255,255,255,.10); }
.state--ok{ border-style: solid; border-color: rgba(63,185,80,.35); background: rgba(63,185,80,.06); }
.state--warn{ border-style: solid; border-color: rgba(255,211,107,.35); background: rgba(255,211,107,.06); }
.state--error{ border-style: solid; border-color: rgba(248,81,73,.35); background: rgba(248,81,73,.06); }
.state--loading{ border-style: solid; border-color: rgba(255,255,255,.10); }

.spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.65);
  animation: spin 0.85s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .spinner{ animation: none; border-top-color: rgba(255,255,255,.18); }
}

/* News detail */
.newsDetail{ max-width: 920px; margin: 0 auto; }
.newsBody{
  font-size: 16px;
  line-height: 1.75;
  color: rgba(245,248,252,.94);
}
.newsBody p{ margin: 0 0 12px; }
.newsBody h2, .newsBody h3{
  margin: 18px 0 10px;
  line-height: 1.2;
  letter-spacing:.15px;
  color: var(--text900);
}
.newsBody h2{ font-size: 22px; }
.newsBody h3{ font-size: 18px; }
.newsBody a{ color: rgba(255,190,120,.95); text-decoration: underline; text-underline-offset: 3px; }
.newsBody a:hover{ color: var(--accent); }
.newsBody ul, .newsBody ol{ padding-left: 18px; margin: 0 0 12px; }
.newsBody li{ margin: 6px 0; }
.newsBody blockquote{
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 4px solid rgba(255,106,0,.45);
  background: rgba(255,255,255,.03);
  border-radius: calc(var(--control-radius) - 2px);
}
.newsBody code{
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.newsFooter{
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,12,18,.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.newsFooter__row{ display:flex; align-items:center; justify-content:space-between;
 gap: 12px; flex-wrap: wrap; }
.newsFooter__title{ font-weight: 1000; color: var(--text900); }
.newsFooter__actions{ display:flex; align-items:center; gap: 10px; }

/* News comments (MVP) */
.newsComments{ width: 100%; display: grid; gap: 12px; }
.newsComments__form{ width: 100%; display: grid; gap: 10px; }
.newsComments__textarea{ min-height: 84px; resize: vertical; }
.newsComments__actions{ display:flex; align-items:center; gap: 10px; justify-content:space-between;
 }
.newsComments__list{ display: grid; gap: 10px; }

.cmt{ display:flex; gap: 10px; padding: 10px 10px; border: 1px solid rgba(255,255,255,.10); border-radius: calc(var(--control-radius) - 2px); background: rgba(255,255,255,.02); }
.cmt__av{ width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); object-fit: cover; background: rgba(0,0,0,.25); }
.cmt__main{ flex: 1; min-width: 0; }
.cmt__head{ display:flex; align-items:baseline; justify-content:space-between;
 gap: 10px; }
.cmt__name{ font-weight: 1000; color: var(--text900); }
.cmt__meta{ font-size: 12px; color: var(--muted); white-space: nowrap; }
.cmt__body{ margin-top: 4px; color: var(--text); line-height: 1.5; word-break: break-word; }

.navLink.is-active{ border-color: var(--control-accent-border-active); background: var(--control-accent-bg-active); }


/* Buttons (legacy aliases for old markup) */
.btn-primary,
.btn-ghost{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 12px;
  min-height: 42px;
  border-radius: var(--r);
  font-weight: 950;
  cursor:pointer;
  user-select:none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    filter var(--transition-fast);
}

.btn-primary{
  border:1px solid rgba(240,140,40,.60);
  background: linear-gradient(180deg, rgba(240,140,40,.30), rgba(0,0,0,.14));
  color: var(--text900);
}
.btn-primary:hover{
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.btn-ghost{
  border:1px solid var(--border);
  background: rgba(0,0,0,.16);
  color: var(--text900);
}
.btn-ghost:hover{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  transform: translateY(-1px);
}
/* Modal */
html.modal-open{ overflow:hidden; }
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display:none;
}
#baseLightbox{ z-index: 100500; }

.modal.is-open{ display:block; }
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
}
.modal__dialog{
  position:relative;
  width: min(920px, calc(100% - 24px));
  /* Ensure dialogs never hide under the sticky header */
  margin: calc(var(--sticky-top) + 14px) auto 14px;
  max-height: calc(100vh - var(--sticky-top) - 28px - var(--safe-bottom));
  display:flex;
  flex-direction:column;
  border-radius: var(--radius-lg);
  border:1px solid var(--border);
  background: rgba(18,18,22,.94);
  box-shadow: var(--shadow);
  overflow:hidden;
}

@supports (height: 100dvh){
  .modal__dialog{ max-height: calc(100dvh - var(--sticky-top) - 28px - var(--safe-bottom)); }
}

@media (max-width: 600px){
  .modal__dialog{ margin: calc(var(--sticky-top) + 10px) auto 10px; max-height: calc(100vh - var(--sticky-top) - 20px - var(--safe-bottom)); }
  @supports (height: 100dvh){
    .modal__dialog{ max-height: calc(100dvh - var(--sticky-top) - 20px - var(--safe-bottom)); }
  }
}
.modal__head{
  display:flex; align-items:center; justify-content:space-between;
   padding: 14px 16px;
  border-bottom:1px solid var(--border);
}
.modal__title{ font-weight: 1000; }
.modal__close{
  width: 34px; height: 34px;
  border-radius: var(--r);
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-size: 18px;
  cursor:pointer;

  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.modal__close:hover{ border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.modal__content{ padding: 16px; overflow:auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }



/* Modal animation (Rust-style) */
/*
  Р вЂ™Р В°Р В¶Р Р…Р С•: Р СР С•Р Т‘Р В°Р В»Р С”Р В° Р Р…Р Вµ Р Т‘Р С•Р В»Р В¶Р Р…Р В° "Р В±Р В»Р С•Р С”Р С‘РЎР‚Р С•Р Р†Р В°РЎвЂљРЎРЉ" Р С‘Р Р…РЎвЂљР ВµРЎР‚РЎвЂћР ВµР в„–РЎРѓ, Р ВµРЎРѓР В»Р С‘ JS Р Р…Р Вµ Р Т‘Р С•Р В±Р В°Р Р†Р С‘Р В» Р Т‘Р С•Р С—.Р С”Р В»Р В°РЎРѓРЎРѓ.
  Р В Р В°Р Р…РЎРЉРЎв‚¬Р Вµ Р Р†Р С‘Р Т‘Р С‘Р СР С•РЎРѓРЎвЂљРЎРЉ Р В·Р В°Р Р†Р С‘РЎРѓР ВµР В»Р В° Р С•РЎвЂљ .is-anim РІвЂ вЂ™ Р С‘РЎвЂљР С•Р С–: backdrop Р Р…Р ВµР Р†Р С‘Р Т‘Р С‘Р С, Р Р…Р С• Р С—Р ВµРЎР‚Р ВµР С”РЎР‚РЎвЂ№Р Р†Р В°Р ВµРЎвЂљ Р С”Р В»Р С‘Р С”Р С‘.
  Р вЂќР ВµР В»Р В°Р ВµР С Р В°Р Р…Р С‘Р СР В°РЎвЂ Р С‘РЎР‹ РЎвЂљР В°Р С”, РЎвЂЎРЎвЂљР С•Р В±РЎвЂ№ Р Т‘Р С•РЎРѓРЎвЂљР В°РЎвЂљР С•РЎвЂЎР Р…Р С• Р В±РЎвЂ№Р В»Р С• Р С•Р Т‘Р Р…Р С•Р С–Р С• Р С”Р В»Р В°РЎРѓРЎРѓР В° .is-open.
*/
.modal__backdrop{
  opacity: 0;
  transition: opacity .16s ease;
}
.modal__dialog{
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
}
.modal.is-open .modal__backdrop{ opacity: 1; }
.modal.is-open .modal__dialog{
  transform: translateY(0) scale(1);
  opacity: 1;
}
.playerHeader{
  display:grid;
  grid-template-columns: 72px 1fr 240px;
  gap: 14px;
  align-items:start;
}
@media (max-width: 900px){
  .playerHeader{ grid-template-columns: 72px 1fr; }
  .playerHeader__side{ grid-column: 1 / -1; }
}
.playerHeader__ava{
  width:72px; height:72px; border-radius: 18px;
  overflow:hidden; border:1px solid var(--border);
}
.playerHeader__ava img{ width:100%; height:100%; object-fit:cover; display:block; }
.playerHeader__name{ font-size: 22px; font-weight: 1000; line-height:1.1; }
.playerHeader__id{ color: var(--muted); font-size: 12px; margin-top: 4px; }
.playerHeader__badges{ margin-top: 10px; display:flex; flex-wrap:wrap; gap:8px; }
.playerHeader__side{ display:grid; gap: 10px; }
.miniKV{ display:flex; justify-content:space-between;
 gap:10px; border:1px solid var(--border); border-radius: var(--r); padding:10px; background: rgba(255,255,255,.02); }
.miniKV span{ color: var(--muted); font-size: 12px; }
.miniKV b{ font-weight: 1000; font-size: 12px; }

.statsTable{ margin-top: 14px; border:1px solid var(--border); border-radius: var(--r); overflow:hidden; }
.statRow{
  display:grid;
  grid-template-columns: 1fr 140px 120px;
  gap: 10px;
  padding: 10px 12px;
  border-top:1px solid var(--border);
  align-items:center;
}
.statRow--head{
  border-top:none;
  background: rgba(255,255,255,.02);
  font-weight: 1000;
}
.statRow__name{ font-weight: 900; }
.statRow__value{ text-align:right; font-variant-numeric: tabular-nums; }
.statRow__rank{ text-align:right; }

.rank{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--control-border);
  background: rgba(255,255,255,.02);
  font-weight: 1000;
  font-size: 12px;
}
.rank--1{ border-color: rgba(255,215,0,.45); background: rgba(255,215,0,.10); }
.rank--2{ border-color: rgba(192,192,192,.45); background: rgba(192,192,192,.08); }
.rank--3{ border-color: rgba(205,127,50,.55); background: rgba(205,127,50,.12); }


/* Top places block */
.topPlaces{
  margin-top: 14px;
  border:1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,.02);
  padding: 12px;
}
.topPlaces__title{
  font-weight: 1000;
  margin-bottom: 10px;
}
.topPlaces__grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.topCard:focus{
  outline: 2px solid rgba(255,106,0,.45);
  outline-offset: 2px;
}



