/* ==========================================================================
   NP INVESTOR — AKTIE-HERO-PANEL (/aktier/-sider)
   On-brand: rundet 14px, 1px var(--np-line)-border, subtil gradient (som
   .npinv-quote), mono-tal, groen/roed for op/ned. OUR markup -> normal
   specificitet, ingen !important noedvendig.
   ========================================================================== */

.npsp { margin: 0 0 28px; }

.npsp__panel {
	border: 1px solid var(--np-line);
	border-radius: 14px;
	background: linear-gradient(180deg, #ffffff, var(--np-bg-soft));
	box-shadow: var(--np-shadow-sm);
	padding: 22px 24px;
}

/* --- Header: navn + ticker + kurs --- */
.npsp__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 20px;
}
.npsp__id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.npsp__name {
	font-family: var(--np-font-display);
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 700;
	color: var(--np-ink);
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.npsp__ticker {
	display: inline-flex; align-items: center;
	font-family: var(--np-font-mono);
	font-size: 12.5px; font-weight: 600;
	letter-spacing: .03em;
	color: var(--np-slate-600);
	background: var(--np-bg-alt);
	border: 1px solid var(--np-line);
	border-radius: 999px;
	padding: 3px 10px;
	line-height: 1;
}

.npsp__quote { text-align: right; min-width: 0; }
.npsp__price {
	font-family: var(--np-font-mono);
	font-size: clamp(26px, 3.4vw, 36px);
	font-weight: 600;
	color: var(--np-ink);
	line-height: 1.05;
}
.npsp__change {
	font-family: var(--np-font-mono);
	font-size: 15px; font-weight: 600;
	margin-top: 3px;
}
.npsp__quote.is-up   .npsp__change { color: var(--np-up-ink); }
.npsp__quote.is-down .npsp__change { color: var(--np-down-ink); }
.npsp__arrow { font-size: .85em; }

.npsp__updated {
	display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
	font-family: var(--np-font-sans);
	font-size: 12px; color: var(--np-slate-400);
	margin-top: 5px;
}
.npsp__countdown {
	font-family: var(--np-font-mono);
	font-weight: 600; color: var(--np-slate-600);
	font-variant-numeric: tabular-nums;
}
.npsp__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--np-slate-400); flex: none;
}
.npsp__dot.is-live {
	background: var(--np-up);
	box-shadow: 0 0 0 2px rgba(18,161,80,.18);
	animation: npsp-pulse 1.8s ease-in-out infinite;
}
.npsp__dot.is-delayed {
	background: #e0a800;
	box-shadow: 0 0 0 2px rgba(224,168,0,.18);
}
.npsp__dot.is-stale { background: var(--np-slate-400); }
@keyframes npsp-pulse {
	0%, 100% { box-shadow: 0 0 0 2px rgba(18,161,80,.20); }
	50%      { box-shadow: 0 0 0 5px rgba(18,161,80,.04); }
}
@media (prefers-reduced-motion: reduce) { .npsp__dot.is-live { animation: none; } }

/* Valuta efter kurs + periode efter aendring */
.npsp__cur {
	font-size: .46em; font-weight: 600;
	color: var(--np-slate-400); letter-spacing: .02em;
	vertical-align: baseline;
}
.npsp__period {
	font-family: var(--np-font-sans); font-weight: 500;
	font-size: 11.5px; color: var(--np-slate-400);
}

/* --- Noegletal-raekke (intraday) --- */
.npsp__stats {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 14px 22px; margin-top: 16px; padding-top: 16px;
	border-top: 1px solid var(--np-line);
}
.npsp__stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.npsp__stats span { font-size: 11.5px; color: var(--np-slate-400); }
.npsp__stats strong {
	font-family: var(--np-font-mono); font-size: 14px;
	color: var(--np-ink); font-weight: 600;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Fundamentals + markedsstemning (plugin-blokke, on-brand override) --- */
.npsp-extra .npinv-fundamentals,
.npsp-extra .npinv-sentiment {
	border: 1px solid var(--np-line) !important;
	border-radius: 14px !important;
	background: var(--np-bg) !important;
	margin: 0 0 18px !important;
	box-shadow: var(--np-shadow-sm) !important;
	font-family: var(--np-font-sans) !important;
}
.npsp-extra .npinv-fundamentals strong,
.npsp-extra .npinv-fundamentals [style*="font-weight:700"] { color: var(--np-ink) !important; }

/* --- Blurb --- */
.npsp__blurb {
	margin: 14px 0 0;
	color: var(--np-slate-600);
	font-family: var(--np-font-sans);
	font-size: 15px; line-height: 1.55;
}

/* --- Graf --- */
.npsp__chart { margin-top: 18px; }
.npsp__chart-top {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap;
	margin-bottom: 10px;
}
.npsp__ranges {
	display: inline-flex; gap: 4px;
	background: var(--np-bg-soft);
	border: 1px solid var(--np-line);
	border-radius: 999px;
	padding: 3px;
}
.npsp__range {
	appearance: none; border: 0; cursor: pointer;
	background: transparent;
	font-family: var(--np-font-sans);
	font-size: 12.5px; font-weight: 600;
	color: var(--np-slate-600);
	padding: 5px 13px; border-radius: 999px; line-height: 1;
	transition: background .15s ease, color .15s ease;
}
.npsp__range:hover { color: var(--np-ink); }
.npsp__range.is-active {
	background: var(--np-bg);
	color: var(--np-ink);
	box-shadow: var(--np-shadow-sm);
}
.npsp__range-chg {
	font-family: var(--np-font-mono);
	font-size: 14px; font-weight: 600;
}
.npsp__range-chg.is-up   { color: var(--np-up-ink); }
.npsp__range-chg.is-down { color: var(--np-down-ink); }

.npsp__svg {
	width: 100%;
	height: 200px;
	display: block;
	overflow: visible;
}

/* --- CTA-raekke --- */
.npsp__cta { margin-top: 20px; }
.npsp__cta-label {
	display: block;
	font-family: var(--np-font-sans);
	font-size: 11px; font-weight: 600;
	letter-spacing: .05em; text-transform: uppercase;
	color: var(--np-slate-400);
	margin-bottom: 8px;
}
.npsp__cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.npsp__btn {
	flex: 1 1 200px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--np-font-sans);
	font-size: 15px; font-weight: 600;
	color: #fff;
	padding: 13px 20px;
	border-radius: var(--np-radius-sm);
	line-height: 1;
	transition: filter .15s ease, transform .15s ease;
}
/* Tekst ALTID hvid — temaets artikel-link-farve har !important og ville ellers
   goere teksten moerk/usynlig (isaer Nordnet: groen tekst paa groen bund). */
.npsp__btn,
.npsp__btn:link,
.npsp__btn:visited,
.npsp__btn:hover,
.npsp__btn:focus,
.npsp__btn span { color: #fff !important; }
.npsp__btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.npsp__btn--saxo    { background: #1442f0; }
.npsp__btn--nordnet { background: var(--np-up); }
.npsp__btn--nordnet { background: #0a7d33; } /* moerkere groen -> bedre hvid kontrast */

/* --- Nyheds-sektion under artiklen --- */
.npsp-news { margin-top: 8px; }
.npsp-news .npinv-stock-news { margin: 32px 0 0; }

/* --- Responsivt --- */
@media (max-width: 600px) {
	.npsp__panel { padding: 18px 16px; }
	.npsp__head { flex-direction: column; align-items: stretch; }
	.npsp__quote { text-align: left; }
	.npsp__svg { height: 160px; }
	.npsp__btn { flex: 1 1 100%; }
}
