/* ==========================================================
   Produkto naujienos: šio prototipo stiliai.
   Spalvos, tarpai, šriftai tik per var(--ds-*) iš ds/styles/tokens.css.
   ========================================================== */
:root {
  --nw-scrim: rgba(39, 47, 48, .42);  /* nėra DS, siūlyti į shared: modalo užsklanda (grey-900, 42 %) */
  --nw-shadow-widget: 0 1px 2px rgba(15, 83, 84, .08), 0 6px 18px rgba(15, 83, 84, .14); /* nėra DS, siūlyti į shared */
  --nw-shadow-modal: 0 24px 64px rgba(15, 40, 42, .22);  /* nėra DS, siūlyti į shared */
  --nw-modal-w: 720px;
  --nw-dock-pad: var(--ds-space-xl);
}

[hidden] { display: none !important; }
html.nw-locked { overflow: hidden; }

/* ---------- Demo puslapis ---------- */
.nw-intro { max-width: 640px; margin-top: var(--ds-space-md); }

/* ---------- Prototipo valdiklis (Linear / Figma stiliumi, tik peržiūrai) ---------- */
.nw-admin {
  position: fixed; z-index: 90; right: var(--ds-space-xl); bottom: var(--ds-space-xl);
  width: 232px; border: 1px solid var(--ds-grey-200); border-radius: var(--ds-radius-xl);
  background: var(--ds-white); box-shadow: var(--ds-shadow-md);
  font-size: var(--ds-text-xs-size); line-height: var(--ds-text-xs-lh); color: var(--ds-grey-800);
  transition: width var(--ds-duration) var(--ds-ease);
}
.nw-admin.is-closed { width: 124px; }
.nw-admin__head { display: flex; align-items: center; gap: var(--ds-space-sm); width: 100%; height: 32px; padding: 0 var(--ds-space-md) 0 var(--ds-space-lg); border: 0; border-radius: inherit; background: none; font-weight: 600; text-align: left; }
.nw-admin__head:hover { background: var(--ds-grey-100); }
.nw-admin__ico, .nw-admin__chev { flex: 0 0 auto; width: 14px; height: 14px; color: var(--ds-grey-500); }
.nw-admin__title { flex: 1; }
.nw-admin__chev { transition: transform var(--ds-duration) var(--ds-ease); }
.nw-admin.is-closed .nw-admin__chev { transform: rotate(180deg); }
.nw-admin__body { display: grid; gap: var(--ds-space-md); padding: var(--ds-space-xs) var(--ds-space-lg) var(--ds-space-lg); border-top: 1px solid var(--ds-grey-100); padding-top: var(--ds-space-md); }
.nw-admin__row { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-md); min-height: 26px; }
.nw-admin__label { color: var(--ds-grey-500); }
.nw-admin__value { display: inline-flex; align-items: center; gap: var(--ds-space-sm); font-weight: 600; }
.nw-admin__dot { width: 6px; height: 6px; border-radius: var(--ds-radius-full); background: var(--ds-orange-500); }
.nw-admin__dot.is-off { background: var(--ds-grey-300); }
.nw-admin__btn { display: flex; align-items: center; justify-content: center; gap: var(--ds-space-sm); height: 28px; margin-top: var(--ds-space-xxs); border: 1px solid var(--ds-grey-200); border-radius: var(--ds-radius-md); background: var(--ds-white); font-weight: 600; transition: background var(--ds-duration-fast), opacity var(--ds-duration-fast); }
.nw-admin__btn svg { width: 13px; height: 13px; }
.nw-admin__btn:hover:not(:disabled) { background: var(--ds-grey-100); }
.nw-admin__btn:disabled { opacity: .45; cursor: default; }

.nw-seg { display: inline-flex; padding: var(--ds-space-xxs); border-radius: var(--ds-radius-md); background: var(--ds-grey-100); }
.nw-seg button { height: 22px; padding: 0 var(--ds-space-md); border: 0; border-radius: var(--ds-radius-sm); background: none; color: var(--ds-grey-600); font-size: var(--ds-text-xs-size); font-weight: 600; transition: background var(--ds-duration-fast), color var(--ds-duration-fast), box-shadow var(--ds-duration-fast); }
.nw-seg button.is-on { background: var(--ds-white); color: var(--ds-grey-900); box-shadow: var(--ds-shadow-sm); }

.nw-skeleton { display: grid; gap: var(--ds-space-xl); max-width: 640px; margin-top: var(--ds-space-5xl); }
.nw-skeleton__item { display: grid; gap: var(--ds-space-md); padding: var(--ds-space-2xl); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); }
.nw-skeleton__item span { height: 12px; border-radius: var(--ds-radius-full); background: var(--ds-grey-100); }
.nw-skeleton__item span:first-child { width: 40%; height: 16px; background: var(--ds-grey-200); }
.nw-skeleton__item span:last-child { width: 70%; }

/* ---------- Šoninis meniu: widgetas prilipęs apačioje ---------- */
.ms-sidebar { display: flex; flex-direction: column; padding-bottom: 0; }
.nw-dock {
  position: sticky; bottom: 0; z-index: 2;
  margin-top: auto; padding: var(--ds-space-4xl) var(--nw-dock-pad) var(--nw-dock-pad);
  background: linear-gradient(to bottom, transparent, var(--ms-sidebar) var(--ds-space-4xl));
  view-transition-name: nw-dock;
}

/* Kitos kortelės „po apačia“, kaip Lovable: rodo, kad naujienų daugiau (šešėlis, kad nesidengtų su fonu) */
.nw-stack { box-shadow: 0 10px 0 -4px var(--ds-orange-100), var(--nw-shadow-widget); }
.nw-stack:hover { box-shadow: 0 12px 0 -4px var(--ds-orange-100), var(--nw-shadow-widget); }

/* Juostelė */
.nw-bar {
  display: flex; align-items: center; gap: var(--ds-space-lg); width: 100%;
  padding: var(--ds-space-lg) var(--ds-space-lg) var(--ds-space-lg) var(--ds-space-xl);
  border: 0; border-radius: var(--ds-radius-2xl); background: linear-gradient(110deg, var(--ds-white) 30%, var(--ds-orange-100));
  text-align: left; transition: transform var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration);
}
.nw-bar:hover { transform: translateY(-2px); }
.nw-bar__text { display: grid; flex: 1; min-width: 0; }
.nw-bar__text strong { font-size: var(--ds-text-intro-size); line-height: var(--ds-text-intro-lh); color: var(--ds-text-title); }
.nw-bar__text span { font-size: var(--ds-text-sm-size); line-height: var(--ds-text-sm-lh); color: var(--ds-text-muted); }

/* Animuotas ruporas: „turime naujienų“, šilta oranžinė, kad neatrodytų kaip DI */
.nw-horn-wrap { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--ds-radius-full); background: var(--ds-orange-100); }
.nw-bar .nw-horn-wrap { background: var(--ds-white); box-shadow: inset 0 0 0 1px var(--ds-orange-200); }
.nw-horn-wrap--lg { width: 48px; height: 48px; }
.nw-horn { width: 22px; height: 22px; overflow: visible; }
.nw-horn-wrap--lg .nw-horn { width: 26px; height: 26px; }
.nw-horn .h-body { fill: var(--ds-orange-500); transform-box: fill-box; transform-origin: 85% 50%; animation: nw-shout 3s var(--ds-ease) infinite; }
.nw-horn .h-w1, .nw-horn .h-w2 { fill: none; stroke: var(--ds-orange-400); stroke-width: 1.8; stroke-linecap: round; transform-box: fill-box; transform-origin: 0 50%; animation: nw-wave 3s ease-out infinite; }
.nw-horn .h-w2 { animation-delay: .15s; }
.nw-bar:hover .nw-horn .h-body, .nw-bar:hover .nw-horn .h-w1, .nw-bar:hover .nw-horn .h-w2 { animation-duration: 1.5s; }
@keyframes nw-shout { 0%, 55%, 100% { transform: none; } 8% { transform: rotate(-10deg) scale(1.06); } 16% { transform: rotate(4deg); } 24% { transform: none; } }
@keyframes nw-wave { 0%, 4% { opacity: 0; transform: scale(.6); } 14% { opacity: 1; transform: none; } 45%, 100% { opacity: 0; transform: translateX(3px) scale(1.1); } }

/* Kortelė */
.nw-card {
  position: relative; border-radius: var(--ds-radius-2xl); background: linear-gradient(to bottom, var(--ds-white) 55%, var(--ds-peach));
  transition: transform var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration);
}
.nw-card:hover { transform: translateY(-2px); }
.nw-card__hit { position: absolute; inset: 0; z-index: 1; border: 0; border-radius: inherit; background: none; }
.nw-card__img { width: calc(100% - 2 * var(--ds-space-sm)); aspect-ratio: 16 / 9; object-fit: cover; margin: var(--ds-space-sm) var(--ds-space-sm) 0; border-radius: var(--ds-radius-lg); }
.nw-card__body { display: grid; gap: var(--ds-space-xxs); padding: var(--ds-space-md) var(--ds-space-lg) var(--ds-space-lg); }
.nw-card__eyebrow { display: flex; align-items: center; gap: var(--ds-space-sm); font-size: var(--ds-text-xs-size); line-height: var(--ds-text-xs-lh); font-weight: 600; color: var(--ds-orange-700); }
.nw-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--ds-text-sm-size); line-height: var(--ds-text-sm-lh); color: var(--ds-text-title); }
.nw-card__close {
  position: absolute; z-index: 2; top: var(--ds-space-md); right: var(--ds-space-md);
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--ds-radius-full);
  background: var(--ds-white); color: var(--ds-grey-700); box-shadow: var(--ds-shadow-sm);
  opacity: 0; transform: scale(.8); transition: opacity var(--ds-duration-fast), transform var(--ds-duration-fast);
}
.nw-card:hover .nw-card__close, .nw-card__close:focus-visible { opacity: 1; transform: none; }

.nw-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: var(--ds-radius-full); background: var(--ds-orange-500); }
.nw-card__eyebrow .nw-dot { animation: nw-ping 2s ease-out infinite; }
@keyframes nw-ping { 0% { box-shadow: 0 0 0 0 var(--ds-orange-300); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }

/* Peržiūrėjus: kaip meniu punktas */
.nw-mini {
  display: flex; align-items: center; gap: 10px; width: calc(100% + var(--nw-dock-pad) - 18px); min-height: 37px;
  margin-left: calc(-1 * var(--nw-dock-pad)); padding: 0 12px 0 29.5px; border: 0; border-radius: 0 20px 20px 0;
  background: none; color: var(--ms-nav-ink); font-size: 15px; font-weight: 600; text-align: left;
  transition: background var(--ds-duration) var(--ds-ease);
}
.nw-mini:hover { background: rgba(255, 255, 255, .18); }
.nw-mini__ico { width: 20px; height: 20px; fill: currentColor; opacity: .7; }

::view-transition-group(nw-dock) { animation-duration: .35s; animation-timing-function: var(--ds-ease); }

/* ---------- Modalas ---------- */
.nw-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--ds-space-4xl) var(--ds-space-xl); }
.nw-modal__scrim { position: absolute; inset: 0; background: var(--nw-scrim); backdrop-filter: blur(2px); }
.nw-modal__panel {
  position: relative; display: flex; flex-direction: column;
  width: min(var(--nw-modal-w), 100%); max-height: min(860px, 100%);
  border-radius: var(--ds-radius-3xl); overflow: hidden;
  background: linear-gradient(to bottom, var(--ds-peach), var(--ds-white) 220px);
  box-shadow: var(--nw-shadow-modal);
}
.nw-t-enter { transition: opacity .3s var(--ds-ease), transform .35s var(--ds-ease); }
.nw-t-leave { transition: opacity .2s var(--ds-ease), transform .2s var(--ds-ease); }
.nw-t-from { opacity: 0; transform: translateY(12px) scale(.97); }
.nw-t-to { opacity: 1; transform: none; }

.nw-modal__head { display: flex; align-items: flex-start; gap: var(--ds-space-xl); padding: var(--ds-space-4xl) var(--ds-space-5xl) var(--ds-space-3xl); }
.nw-modal__head > div { flex: 1; display: grid; gap: var(--ds-space-xs); }
.nw-modal__title { font-size: 26px; line-height: 34px; } /* tarp h1 ir h2, nėra DS */
.nw-close { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; margin: calc(-1 * var(--ds-space-xs)) calc(-1 * var(--ds-space-md)) 0 0; padding: 0; border: 0; border-radius: var(--ds-radius-full); background: var(--ds-white); color: var(--ds-grey-700); box-shadow: var(--ds-shadow-sm); transition: background var(--ds-duration-fast); }
.nw-close:hover { background: var(--ds-grey-100); }

.nw-feed { flex: 1; overflow-y: auto; padding: 0 var(--ds-space-5xl); overscroll-behavior: contain; scrollbar-width: thin; }
.nw-entry { display: grid; gap: var(--ds-space-lg); padding: var(--ds-space-4xl) 0; border-top: 1px solid var(--ds-border); }
.nw-entry:first-of-type { border-top: 0; padding-top: var(--ds-space-md); }
.nw-entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-md); font-size: var(--ds-text-sm-size); line-height: var(--ds-text-sm-lh); color: var(--ds-text-muted); }
.nw-entry__area::before { content: '·'; margin-right: var(--ds-space-md); }
.nw-entry__date { display: flex; align-items: center; gap: var(--ds-space-sm); margin-left: auto; }
.nw-entry__title { font-size: var(--ds-h2-size); line-height: var(--ds-h2-lh); }
.nw-entry__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: var(--ds-space-xs) 0; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-xl); }
.nw-entry__text { font-size: var(--ds-text-md-size); line-height: var(--ds-text-md-lh); }
.nw-entry__points { display: grid; gap: var(--ds-space-xs); margin: 0; padding-left: var(--ds-space-2xl); }
.nw-entry__points li::marker { color: var(--ds-teal-500); }
.nw-entry__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-lg); margin-top: var(--ds-space-xs); }
.nw-entry__foot .btn-ds { gap: var(--ds-space-sm); text-decoration: none; }

/* Minimalios reakcijos */
.nw-react { display: flex; align-items: center; gap: var(--ds-space-xxs); margin-left: auto; font-size: var(--ds-text-sm-size); color: var(--ds-text-muted); }
.nw-react > span { margin-right: var(--ds-space-xs); }
.nw-react button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--ds-radius-full); background: none; font-size: 15px; filter: grayscale(1); opacity: .6; transition: background var(--ds-duration-fast), opacity var(--ds-duration-fast), filter var(--ds-duration-fast), transform var(--ds-duration-fast); }
.nw-react button:hover { background: var(--ds-grey-100); opacity: 1; filter: none; }
.nw-react button.is-on { background: var(--ds-teal-100); opacity: 1; filter: none; transform: scale(1.1); }
.nw-react.is-voted button:not(.is-on) { opacity: .35; }

.nw-modal__foot { display: flex; justify-content: center; padding: var(--ds-space-xl) var(--ds-space-5xl); border-top: 1px solid var(--ds-border); background: var(--ds-white); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .nw-modal { padding: var(--ds-space-xl) 0 0; align-items: end; }
  .nw-modal__panel { max-height: 100%; border-radius: var(--ds-radius-3xl) var(--ds-radius-3xl) 0 0; }
  .nw-modal__head { padding: var(--ds-space-3xl) var(--ds-space-2xl) var(--ds-space-xl); }
  .nw-modal__title { font-size: var(--ds-h2-size); line-height: var(--ds-h2-lh); }
  .nw-feed, .nw-modal__foot { padding-left: var(--ds-space-2xl); padding-right: var(--ds-space-2xl); }
  .nw-react { margin-left: 0; }
}
