/* News (NewsPopup variant of the blue popup): filter chips, cards, article, empty state. Units via --u. */

.news-list-root,
.news-article-root {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---- empty state (TRI-1467) ---------------------------------------------------------------------------- */
/* EmptyState: a vertical layout group (spacing 18, padding 40 on the sides, middle centre) in a rect 80 units short:
   the 220 unit illustration, the 44 unit title, the 80 unit body and the 112 unit yellow button, centred as one block. */
.news-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: calc(18 * var(--u));
  padding: calc(40 * var(--u)) calc(40 * var(--u));
  text-align: center;
}
.news-empty__robot {
  align-self: center;
  flex: none;
  width: calc(220 * var(--u));
  height: calc(220 * var(--u));
}
/* Rubik Bold at its own spacing, like the native "No news yet" (not the airy button tracking) */
.news-empty h2 {
  flex: none;
  height: calc(44 * var(--u));
  line-height: calc(44 * var(--u));
  font-weight: var(--w-bold);
  letter-spacing: 0.01em;
  font-size: calc(34 * var(--u));
  color: #031c26;
}
/* Rubik Bold, 24, normal style: the font asset carries the weight (no extra bold spacing) */
.news-empty p {
  flex: none;
  min-height: calc(80 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--u));
  line-height: 1.185;
  color: #808890;
}
.news-empty .btn {
  flex: none;
  width: 100%;
  height: calc(112 * var(--u));
}

/* The compact popup (a phone's empty list): the block sits in a popup as tall as itself. The same measured padding as
   the wide one (below): the dome over the robot and the straight foot under the button leave equal air. */
.layout-phone .is-compact .news-empty {
  flex: none;
  padding: calc(66 * var(--u)) calc(40 * var(--u)) calc(42 * var(--u));
}

/* Wide: the popup is as tall as its content, so the empty state is one compact block, not a full-height
   panel with blank space above the robot and under the button. */
.layout-wide .news-list-root,
.layout-wide .news-article-root {
  flex: 0 1 auto;
}
.layout-wide .news-empty {
  flex: none;
  gap: calc(22 * var(--u));
  /* the white panel is a dome (its top is highest over the robot) with a straight foot: measured on the render, the
     robot's antenna tips stood 49 px under the dome at 0.52 px per unit while the button's lower edge stood 60 px
     over the panel's foot. 10 units move from under the button to over the robot, which makes both about 54 px. */
  padding: calc(66 * var(--u)) calc(48 * var(--u)) calc(42 * var(--u));
}
/* at the desktop popup scale (a unit is about half a pixel) the phone's 24 unit body would be 12 px */
.layout-wide .news-empty__robot {
  width: calc(260 * var(--u));
  height: calc(260 * var(--u));
}
.layout-wide .news-empty h2 {
  height: auto;
  font-size: calc(40 * var(--u));
  line-height: 1.2;
}
.layout-wide .news-empty p {
  min-height: 0;
  font-size: calc(28 * var(--u));
  line-height: 1.3;
}

/* ---- filter chips ------------------------------------------------------------------------------------------ */
.news-chips {
  flex: none;
  display: flex;
  gap: calc(8 * var(--u));
  height: calc(56 * var(--u));
  margin: calc(8 * var(--u)) calc(20 * var(--u)) calc(14 * var(--u));
  overflow-x: auto;
  scrollbar-width: none;
}
.news-chips::-webkit-scrollbar {
  display: none;
}
.news-chip {
  flex: none;
  height: 100%;
  padding: 0 calc(26 * var(--u));
  border-radius: 999px;
  background: #e3e8f0;
  font-weight: var(--w-extrabold);
  font-size: calc(22 * var(--u));
  letter-spacing: var(--tmp-bold);
  color: #292f42;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.news-chip:hover {
  background: #d6dde9;
}
.news-chip.is-active {
  background: var(--brand-green);
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.news-chip:active {
  transform: scale(0.96);
}

/* ---- list and cards (NewsListItem.prefab) ---------------------------------------------------------- */
.news-list {
  padding: calc(4 * var(--u)) calc(18 * var(--u)) calc(40 * var(--u));
}
.news-list__item {
  margin-bottom: calc(18 * var(--u));
  animation: news-in 260ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 50ms);
}
@keyframes news-in {
  from {
    opacity: 0;
    transform: translateY(calc(24 * var(--u)));
  }
}
.reduced-motion .news-list__item {
  animation: none;
}
.news-card {
  position: relative;
  width: 100%;
  min-height: calc(330 * var(--u));
  display: grid;
  grid-template-columns: calc(190 * var(--u)) minmax(0, 1fr) calc(28 * var(--u));
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(22 * var(--u)) calc(24 * var(--u)) calc(20 * var(--u));
  border-radius: calc(40 * var(--u));
  background: rgba(247, 250, 255, 0.92);
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e3e9f3,
    0 calc(5 * var(--u)) calc(12 * var(--u)) rgba(27, 37, 89, 0.12);
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.news-card.is-unread {
  background: #fbf8f2;
}
.news-card:hover {
  background: #fff;
}
.news-card:active {
  transform: scale(0.985);
}
.news-card__thumb {
  position: relative;
  width: calc(190 * var(--u));
  height: calc(220 * var(--u));
}
.news-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(30 * var(--u));
  background: #5cabeb;
}
.news-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-thumb__icon {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.news-thumb__letter {
  font-weight: var(--w-bold);
  font-size: calc(76 * var(--u));
  color: rgba(255, 255, 255, 0.92);
}
.news-card__dot {
  position: absolute;
  right: calc(-6 * var(--u));
  top: calc(-6 * var(--u));
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  border-radius: 50%;
  background: #ff4c3d;
  box-shadow: 0 0 0 calc(4 * var(--u)) #fbf8f2;
}
.news-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}
.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(6 * var(--u)) calc(10 * var(--u));
  min-height: calc(32 * var(--u));
}
.news-card__spacer {
  flex: 1 0 0;
}
.news-card__date {
  flex: none;
  font-weight: var(--w-medium);
  font-size: calc(21 * var(--u));
  color: #7a808c;
  font-variant-numeric: tabular-nums;
}
.news-pill {
  --accent: #5cabeb;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(34 * var(--u));
  padding: 0 calc(14 * var(--u)) 0 calc(12 * var(--u));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, #fff);
  font-weight: var(--w-extrabold);
  letter-spacing: var(--tmp-bold);
  font-size: calc(21 * var(--u));
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 62%, #001a40);
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}
.news-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-pill img {
  width: calc(26 * var(--u));
  height: calc(26 * var(--u));
  object-fit: contain;
}
.news-pinned {
  display: inline-flex;
  align-items: center;
  height: calc(30 * var(--u));
  padding: 0 calc(12 * var(--u));
  border-radius: 999px;
  background: #ffc500;
  font-weight: var(--w-bold);
  font-size: calc(16 * var(--u));
  color: #57380a;
}
.news-card__title {
  font-weight: var(--w-extrabold);
  font-size: calc(36 * var(--u));
  line-height: 1.15;
  letter-spacing: calc(var(--tmp-bold) - 0.02em);
  color: #0e1c29;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-card__subtitle {
  font-weight: var(--w-medium);
  font-size: calc(22 * var(--u));
  line-height: 1.3;
  color: #4d5261;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-card__gift {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  margin-top: calc(2 * var(--u));
}
.news-card__gift img {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  object-fit: contain;
}
.news-card__gift small,
.news-gift__text small {
  display: block;
  font-weight: var(--w-medium);
  font-size: calc(15 * var(--u));
  letter-spacing: 0.06em;
  color: #aaaaa3;
}
.news-card__gift b,
.news-gift__text b {
  display: block;
  font-weight: var(--w-extrabold);
  letter-spacing: var(--tmp-bold);
  font-size: calc(24 * var(--u));
  color: #f08a0f;
  font-variant-numeric: tabular-nums;
}
.news-card__chevron {
  width: calc(28 * var(--u));
  height: calc(40 * var(--u));
  opacity: 0.85;
}
.news-list__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(8 * var(--u)) calc(30 * var(--u)) 0;
  text-align: center;
}
.news-list__footer p {
  font-weight: var(--w-medium);
  font-size: calc(24 * var(--u));
  line-height: 1.35;
  color: #808890;
}
.news-markall {
  height: calc(64 * var(--u));
  padding: 0 calc(36 * var(--u));
  border-radius: 999px;
  background: #e3e8f0;
  font-weight: var(--w-extrabold);
  letter-spacing: var(--tmp-bold);
  font-size: calc(24 * var(--u));
  color: #292f42;
  transition: background var(--t-fast), transform var(--t-fast);
}
.news-markall:hover {
  background: #d6dde9;
}
.news-markall:active {
  transform: scale(0.97);
}

/* ---- article ------------------------------------------------------------------------------------------------ */
.news-back {
  position: absolute;
  left: calc(-68 * var(--u));
  top: calc(6 * var(--u));
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background var(--t-fast), transform var(--t-fast);
}
.news-back:hover {
  background: rgba(255, 255, 255, 0.32);
}
.news-back:active {
  transform: scale(0.94);
}
.news-back img {
  width: calc(24 * var(--u));
  height: calc(37 * var(--u));
  transform: scaleX(-1);
}
.news-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: calc(4 * var(--u));
  background: rgba(27, 37, 89, 0.08);
}
.news-progress span {
  display: block;
  height: 100%;
  background: var(--brand-green);
  transform-origin: left center;
  transform: scaleX(0);
}
.news-article {
  padding: calc(20 * var(--u)) calc(30 * var(--u)) calc(50 * var(--u));
}
.news-article__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--u));
  margin-bottom: calc(18 * var(--u));
}
.news-article__title {
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0e1c29;
}
.news-article__subtitle {
  margin-top: calc(12 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.35;
  color: #4d5261;
}
.news-article__figure {
  margin: calc(24 * var(--u)) 0 0;
  overflow: hidden;
  border-radius: calc(28 * var(--u));
  background: #eef2f8;
  min-height: calc(120 * var(--u));
}
.news-article__figure img {
  width: 100%;
  height: auto;
}
.news-article__heading {
  margin-top: calc(30 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(var(--size, 32) * var(--u));
  line-height: 1.2;
  color: #0e1c29;
}
.news-article__paragraph {
  margin-top: calc(16 * var(--u));
  font-weight: var(--w-regular);
  font-size: calc(28 * var(--u));
  line-height: 1.5;
  color: #2c3340;
  white-space: pre-line;
}
.news-gift {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  margin-top: calc(30 * var(--u));
  padding: calc(18 * var(--u)) calc(22 * var(--u));
  border-radius: calc(32 * var(--u));
  background: #fff6e3;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #f3dfb4;
}
.news-gift__icon {
  width: calc(72 * var(--u));
  height: calc(72 * var(--u));
  object-fit: contain;
}
.news-gift__text {
  flex: 1;
  min-width: 0;
}
.news-gift .btn {
  --btn-h: calc(72 * var(--u));
  --btn-font: calc(26 * var(--u));
  padding: 0 calc(30 * var(--u));
  flex: none;
}
.news-card__gift .news-rewards,
.news-gift__text .news-rewards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(10 * var(--u)) calc(22 * var(--u));
  color: var(--ink);
}
.news-reward {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  white-space: nowrap;
}
.news-reward img {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  object-fit: contain;
  flex: none;
}
.news-gift .btn.is-claimed:disabled {
  --btn-base: var(--brand-green);
  opacity: 0.85;
}
.news-gift.is-celebrating {
  animation: news-gift-flash 700ms var(--ease-out);
}
@keyframes news-gift-flash {
  30% {
    background: #cfedd6;
    transform: scale(1.02);
  }
}
.news-gift__burst {
  position: absolute;
  right: calc(30 * var(--u));
  top: 0;
  pointer-events: none;
}
.news-gift__burst span {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  white-space: nowrap;
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--brand-green);
  text-shadow: 0 calc(2 * var(--u)) 0 #fff;
  animation: news-gift-rise 1.4s var(--ease-out) both;
  animation-delay: calc(var(--i) * 140ms);
}
.news-gift__burst img {
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
}
@keyframes news-gift-rise {
  from {
    opacity: 0;
    transform: translateY(calc(20 * var(--u)));
  }
  25% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(calc(-120 * var(--u)));
  }
}
.reduced-motion .news-gift.is-celebrating,
.reduced-motion .news-gift__burst span {
  animation: none;
}
.reduced-motion .news-gift__burst span {
  opacity: 1;
}
.news-article__actions {
  margin-top: calc(40 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(22 * var(--u));
}
.news-next {
  min-width: calc(360 * var(--u));
  height: calc(64 * var(--u));
  padding: 0 calc(40 * var(--u));
  border-radius: 999px;
  background: var(--brand-green);
  font-weight: var(--w-extrabold);
  letter-spacing: var(--tmp-bold);
  font-size: calc(24 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  box-shadow: inset 0 calc(-5 * var(--u)) 0 rgba(0, 0, 0, 0.18);
  transition: transform var(--t-fast), filter var(--t-fast);
}
.news-next:hover {
  filter: brightness(1.06);
}
.news-next:active {
  transform: translateY(calc(3 * var(--u)));
}
.news-report {
  height: calc(44 * var(--u));
  padding: 0 calc(18 * var(--u));
  border-radius: calc(18 * var(--u));
  background: #f0f0f2;
  font-weight: var(--w-extrabold);
  letter-spacing: var(--tmp-bold);
  font-size: calc(18 * var(--u));
  color: #667385;
  transition: transform 200ms var(--ease-spring);
}
.news-report.is-thanked {
  transform: scale(1.2);
}
.news-report__reasons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(8 * var(--u));
}
.news-report__reasons button {
  height: calc(40 * var(--u));
  padding: 0 calc(18 * var(--u));
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #d6e3f3;
  font-weight: var(--w-medium);
  font-size: calc(20 * var(--u));
  color: #29639e;
}

/* Wide: the popup is drawn at a desktop scale (a unit about half a pixel), so the list's small print gets the
   same legible floors as the phone, and the popup is wider so the chips and cards breathe. */
.layout-wide .blue-popup.news {
  --pw: min(calc(100vw - 208px), calc(1040 * var(--u)));
}
.layout-wide .news-chips { height: max(30px, calc(56 * var(--u))); }
.layout-wide .news-chip { font-size: max(12px, calc(22 * var(--u))); padding: 0 max(12px, calc(26 * var(--u))); }
.layout-wide .news-card__date { font-size: max(12px, calc(21 * var(--u))); }
.layout-wide .news-pill { height: auto; min-height: max(22px, calc(34 * var(--u))); padding: 3px 9px 3px 8px; font-size: max(11px, calc(21 * var(--u))); }
.layout-wide .news-pill img { width: max(14px, calc(26 * var(--u))); height: max(14px, calc(26 * var(--u))); }
.layout-wide .news-pinned { height: auto; min-height: 20px; padding: 2px 8px; font-size: max(11px, calc(16 * var(--u))); }
.layout-wide .news-card__title { font-size: max(17px, calc(36 * var(--u))); }
.layout-wide .news-card__subtitle { font-size: max(13px, calc(22 * var(--u))); }
.layout-wide .news-card__gift small,
.layout-wide .news-gift__text small { font-size: max(11px, calc(15 * var(--u))); }
.layout-wide .news-card__gift b,
.layout-wide .news-gift__text b { font-size: max(14px, calc(24 * var(--u))); }
.layout-wide .news-card__gift img { width: max(20px, calc(40 * var(--u))); height: max(20px, calc(40 * var(--u))); }
.layout-wide .news-reward img { width: max(17px, calc(34 * var(--u))); height: max(17px, calc(34 * var(--u))); }
.layout-wide .news-list__footer p { font-size: max(13px, calc(24 * var(--u))); }
.layout-wide .news-markall { height: max(34px, calc(64 * var(--u))); font-size: max(12px, calc(24 * var(--u))); }
.layout-wide .news-article__title { font-size: max(22px, calc(44 * var(--u))); }
.layout-wide .news-article__subtitle { font-size: max(15px, calc(28 * var(--u))); }
.layout-wide .news-article__heading { font-size: max(17px, calc(var(--size, 32) * var(--u))); }
.layout-wide .news-article__paragraph { font-size: max(15px, calc(28 * var(--u))); }
.layout-wide .news-next { height: max(36px, calc(64 * var(--u))); font-size: max(13px, calc(24 * var(--u))); }
.layout-wide .news-report { height: max(28px, calc(44 * var(--u))); font-size: max(11px, calc(18 * var(--u))); }
.layout-wide .news-report__reasons button { height: max(28px, calc(40 * var(--u))); font-size: max(12px, calc(20 * var(--u))); }

@media (max-width: 759px) {
  .news-chips { height: 28px; }
  .news-chip { font-size: 11px; padding: 0 10px; }
  .news-card__body { gap: 5px; }
  .news-card__meta,
  .news-article__meta { flex-wrap: wrap; gap: 5px 7px; }
  .news-card__date { font-size: 11px; color: #626b7b; }
  .news-pill { height: auto; min-height: 21px; padding: 4px 7px; font-size: 11px; }
  .news-pinned { height: auto; min-height: 19px; padding: 3px 6px; font-size: 10px; }
  .news-card__subtitle { font-size: max(11px, calc(22 * var(--u))); }
  .news-card__gift small,
  .news-gift__text small { font-size: 11px; color: #77796d; }
  .news-card__gift b,
  .news-gift__text b { font-size: max(12px, calc(24 * var(--u))); }
  .news-reward img { width: 15px; height: 15px; }
  .news-gift { gap: 9px; padding: 10px; }
  .news-gift .btn { --btn-h: 32px; --btn-font: 12px; padding: 0 12px; }
  .news-next,
  .news-report,
  .news-report__reasons button,
  .news-markall {
    height: auto;
    min-height: 30px;
    max-width: 100%;
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1.25;
  }
  .news-article__actions { gap: 12px; }
  .news-report { text-wrap: balance; }
}
