/*
 * Nyhetsstudio Archive – Stylesheet
 * assets/css/nyhetsstudio.css
 *
 * Designed to work alongside your theme's base styles.
 * Uses CSS custom properties so it inherits the theme's
 * colour scheme automatically.
 */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --ns-accent-cat:    #131722;
  --ns-accent-light:  #FCEBEB;
  --ns-accent-dark:   #0bac6e;
  --ns-spine-color:   rgba(0, 0, 0, 0.12);
  --ns-line-color:    rgba(252, 73, 73, 0.5);
  --ns-dot-size:      15px;
  --ns-gutter:        24px;     /* space between spine and content */
  --ns-content-max:   740px;
  --color-background-primary: #f1f1f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ns-spine-color: rgba(255, 255, 255, 0.15);
    --ns-accent-light: rgba(226, 75, 74, 0.15);
    --ns-accent-dark:  #f07877;
    --ns-line-color:    rgba(252, 73, 73, 0.5);
    --color-background-primary: #232323;
    --ns-accent-cat:        #121316;
  }
}


/* ── Wrapper ────────────────────────────────────────────────── */
.ns-wrap {
  max-width: var(--ns-content-max);
  width:100%;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  font-family:Verdana, Geneva, Tahoma, sans-serif;
}

.ns-wrap img{
  border-radius: 4px;
  width: 100%;
}


/* ── Header ─────────────────────────────────────────────────── */
.ns-header {
  margin-bottom: 2.5rem;
}

.ns-header__title-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.ns-header__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: capitalize;
}

.ns-header__tagline {
  color: var(--ns-muted, #666);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* Live badge */
.ns-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ns-accent-light);
  color: var(--ns-accent-dark);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  align-self: center;
}

.ns-live-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ns-accent);
  animation: ns-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes ns-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}


/* ── Filter pills ───────────────────────────────────────────── */
.ns-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ns-filter__btn {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
}

.ns-filter__btn:hover {
  opacity: 0.85;
}

.ns-filter__btn.is-active {
  background: var(--ns-accent-cat);
  opacity: 1;
  color:#fff !important
}

.ns-filter__btn.is-active span,
.ns-filter__btn.is-active {
  color: #fff;    /* safe over both red and dark text */
}


/* ── Tips callout ───────────────────────────────────────────── */
.ns-tips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ns-accent-light);
  border-left: 3px solid var(--ns-accent);
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.ns-tips p { margin: 0; }

.ns-tips__cta {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ns-accent-dark);
  text-decoration: none;
  border: 1px solid var(--ns-accent);
  border-radius: 4px;
  padding: 5px 12px;
  transition: background 0.15s;
}

.ns-tips__cta:hover {
  background: var(--ns-accent);
  color: #fff;
}


/* ── Timeline ────────────────────────────────────────────────── */
.ns-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Vertical spine */
.ns-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ns-line-color);
}


/* ── Individual post ─────────────────────────────────────────── */
.ns-post {
  position: relative;
  padding-left: calc(var(--ns-dot-size) + var(--ns-gutter));
  padding-bottom: 2.25rem;
  transition: opacity 0.25s;
}

.ns-post.is-hidden {
  display: none;
}

/* Timeline dot */
.ns-post__dot {
  position: absolute;
  left: 0;
  top: 3px;
  width: var(--ns-dot-size);
  height: var(--ns-dot-size);
  border-radius: 50%;
  background: var(--ns-accent);
  border: 1px solid var(--body-bg, #fff);  /* punch through the spine */
  z-index: 1;
}

/* Category-coloured dots – add more slugs as needed */
.ns-post__dot--krim    { background: #E24B4A; }
.ns-post__dot--sport   { background: #378ADD; }
.ns-post__dot--okonomi { background: #EF9F27; }
.ns-post__dot--by-og-uteliv { background: #1D9E75; }
.ns-post__dot--default { background: #888780; }

/* Meta row */
.ns-post__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  flex-wrap: wrap;
}

.ns-post__time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.ns-post__date-label {
  color: var(--ns-accent-dark);
  font-weight: 600;
}

.ns-post__clock {
  color: var(--ns-accent);
  font-weight: 700;
}

.ns-post__author {
  color: var(--ns-muted, #666);
  font-size:0.9rem
}

.ns-post__share {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--ns-muted, #888);
  padding: 2px 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.ns-post__share:hover { opacity: 1; }

/* Post body */
.ns-post__cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.ns-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 3px;
  text-decoration: none;
  background: rgba(0,0,0,0.06);
  color: inherit;
  transition: background 0.15s;
}

.ns-tag:hover { background: rgba(0,0,0,0.12); }

/* Coloured tag variants – mirror your category slugs */
.ns-tag--krim    { background: rgba(226,75,74,0.12); color: #A32D2D; }
.ns-tag--sport   { background: rgba(55,138,221,0.12); color: #185FA5; }
.ns-tag--okonomi { background: rgba(239,159,39,0.12); color: #854F0B; }
.ns-tag--by-og-uteliv { background: rgba(29,158,117,0.12); color: #0F6E56; }


/* ── Pagination ─────────────────────────────────────────────── */

/* ── Load-more button ──────────────────────────────────────── */

.ns-load-more {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: 11px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--ns-spine-color);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: inherit;
  transition: background 0.15s;
}
.ns-load-more:hover    { background: var(--ns-accent-light); }
.ns-load-more:disabled { opacity: 0.5; cursor: default; }

.ns-no-more {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  opacity: 0.45;
  margin-top: 1rem;
}

.ns-empty {
  padding: 2rem 0;
  text-align: center;
  opacity: 0.5;
}



/* ── Post body — full width, stacked layout ──────────────────────────── */

.ns-post__body {
  display: block;        /* single column — title, image, text stacked */
}

/* Title sits above the image */
.ns-post__title {
  font-size: 1.30rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.25;
  color: inherit;
  padding: 20px 0 10px 0;
}

/* No link style on title — there is no single view */
.ns-post__title a,
.ns-post__title {
  text-decoration: none;
  color: inherit;
  pointer-events: none;  /* title is not clickable */
  cursor: default;
}

/* ── Featured image ──────────────────────────────────────────── */
.ns-post__thumb {
  /* Pull the figure out of the post's left padding so the image
     stretches edge-to-edge across the full content column.
     The negative margin mirrors the padding-left on .ns-post. */
  margin: 0.25rem calc( -1 * (var(--ns-dot-size) + var(--ns-gutter)) ) 1rem 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ns-spine-color);
  line-height: 0;
  width:100%;
}

.ns-post__thumb-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.ns-post__thumb-caption {
  font-size: 0.75rem;
  color: var(--ns-muted, #666);
  padding: 6px 2px 0;
  line-height: 1.4;
}

.ns-post__thumb-caption strong,
.ns-post__thumb-caption b {
  font-weight: 600;
}

/* ── Post content ──────────────────────────────────────────── */

.ns-post__content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: inherit;
}

.ns-post__content p          { margin: 0 0 0.85em; }
.ns-post__content p:last-child { margin-bottom: 0; }
.ns-post__content a          { color: var(--ns-accent); }
.ns-post__content strong,
.ns-post__content b          { font-weight: 600; }
.ns-post__content ul,
.ns-post__content ol         { padding-left: 1.4em; margin-bottom: 0.85em; }
.ns-post__content blockquote {
  border-left: 3px solid var(--ns-accent);
  margin: 0 0 0.85em;
  padding: 0.4em 0 0.4em 1em;
  font-style: italic;
  color: var(--ns-muted, #555);
}

/* ── Tag pills (hashtag style) ───────────────────────────── */

.ns-post__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.ns-tag--tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 3px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.05);
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}

.ns-tag--tag:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .ns-tag--tag               { background: rgba(255,255,255,0.08); }
  .ns-tag--tag:hover         { background: rgba(255,255,255,0.14); }
}


/* ── Filter pills — link variant ─────────────────────────── */

/*
 * Pills are now <a> tags instead of <button>s.
 * Keep the same visual but ensure they look like links,
 * not browser-default anchor styles.
 */
.ns-filter__btn {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}


/* ══ Tips form ══════════════════════════════════════════════ */

.ns-tips__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ns-accent-dark);
  background: none;
  border: 1px solid var(--ns-accent);
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ns-tips__cta:hover {
  background: var(--ns-accent);
  color: #fff;
}

.ns-tips-form {
  background: var(--color-background-secondary, #242424);
  border: 1px solid var(--color-border-secondary, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  margin-top:-30px;
  animation: ns-slide-down 0.2s ease;
  color:#fff
}

@keyframes ns-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ns-tips-form__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ns-tips-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ns-tips-form__field label:first-child {
  font-weight: 700;
  font-size: 0.95rem;
}

.ns-tips-form__field input[type="text"],
.ns-tips-form__field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--color-border-secondary, rgba(255,255,255,0.18));
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: inherit;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.15s;
}
.ns-tips-form__field input[type="text"]:focus,
.ns-tips-form__field textarea:focus {
  outline: none;
  border-color: var(--ns-accent);
}

.ns-tips-form__hint {
  font-size: 0.82rem;
  opacity: 0.65;
  margin: 0;
}

.ns-tips-form__upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ns-accent);
  text-decoration: underline;
  cursor: pointer;
}
.ns-tips-form__upload:hover { opacity: 0.8; }

.ns-tips-form__filename {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 4px;
}

.ns-tips-form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.ns-tips-form__cancel {
  background: var(--color-background-tertiary, rgba(255,255,255,0.08));
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  transition: background 0.15s;
}
.ns-tips-form__cancel:hover { background: rgba(255,255,255,0.14); }

.ns-tips-form__submit {
  background: #2B7FFF;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ns-tips-form__submit:hover { background: #1a6de0; }


/* ══ Share popover ══════════════════════════════════════════ */

.ns-share {
  position: relative;
  margin-left: auto;
}

.ns-share__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--ns-muted, #888);
  padding: 2px 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.ns-share__toggle:hover,
.ns-share__toggle[aria-expanded="true"] { opacity: 1; }

.ns-share__popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-background-primary, #fff);
  border: 1px solid var(--color-border-secondary, rgba(0,0,0,0.12));
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  padding: 6px;
  min-width: 180px;
  z-index: 100;
  animation: ns-pop-in 0.15s ease;
}

@keyframes ns-pop-in {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ns-share__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.ns-share__item:hover { background: var(--color-background-secondary, rgba(0,0,0,0.05)); }

.ns-share__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ns-share__facebook svg { color: #1877F2; }
.ns-share__twitter  svg { color: #e3e3e3; }
.ns-share__whatsapp svg { color: #25D366; }
.ns-share__email    svg { color: #888; }
.ns-share__copy     svg { color: #c7c7c7; }

/* Success state on copy button */
.ns-share__copy.is-copied { color: #1D9E75; }

/* ── Tips success banner ──────────────────────────────────── */
.ns-tips-success {
  background: rgba(29,158,117,0.12);
  border-left: 3px solid #1D9E75;
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0F6E56;
  margin-bottom: 1.5rem;
  animation: ns-slide-down 0.2s ease;
}



