/* The notice card, as the chat widget draws it. Keep in step with the widget's src/ui/styles.css
   (section "Service notices"). */
.pnn-card { font-family: "PostNordSans", "PostNord Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

/* Colours: PostNord design tokens (pn-design-assets colors.js, as @postnord/web-components and
   my.postnord.no use them). Token name in each comment. Only PostNord tokens are used, also in the
   backgrounds and illustrations (the 17 May bunting uses the Norwegian flag's own colours). */
.pnn-card,
.pnn-swatch {
  --bg: #ffffff;
  --border: #8eddf9; /* blue200 */
  --title: #2d2013; /* gray900 */
  --text: #5e554a; /* gray700 */
  --tile: #005d92; /* blue700 */
  --tile-fg: #ffffff;
  --deco: #8eddf9; /* blue200 */
  --btn: #2d2013; /* gray900 */
  --pager-bg: #effbff; /* blue25 */
  --pager-border: #8eddf9; /* blue200 */
}
.pnn-card {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px 12px 12px;
  box-shadow: 0 1px 2px rgba(13, 35, 75, 0.06), 0 1px 1px rgba(13, 35, 75, 0.04);
  font-size: 14px;
  line-height: 1.4;
  color: var(--title);
}
.pnn-head { position: relative; display: flex; align-items: center; gap: 12px; }
.pnn-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tile); color: var(--tile-fg); }
.pnn-icon { width: 22px; height: 22px; }
.pnn-fill { fill: currentColor; stroke: none; }
.pnn-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pnn-texts { flex: 1; min-width: 0; }
.pnn-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--title); overflow-wrap: anywhere; }
.pnn-summary { margin: 1px 0 0; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.pnn-actions { flex: none; display: flex; align-items: center; gap: 2px; align-self: flex-start; }
.pnn-pager {
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--title);
  background: var(--pager-bg); border: 1px solid var(--pager-border); border-radius: 999px;
  padding: 3px 10px; margin-right: 2px; cursor: pointer;
}
.pnn-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--btn); cursor: pointer; }
.pnn-btn:hover, .pnn-pager:hover { background-color: rgba(127, 127, 127, 0.14); }
.pnn-btn:focus-visible, .pnn-pager:focus-visible, .pnn-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.pnn-chev, .pnn-x { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pnn-chev { transform: rotate(180deg); transition: transform 0.15s; }
.pnn-open .pnn-chev { transform: none; }
.pnn-body { position: relative; margin: 10px 4px 0 52px; color: var(--text); font-size: 14px; }
.pnn-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.pnn-link { display: inline-block; color: var(--title); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Tones (General presets: colour only) ---- */
.pnn-critical { --bg: #fef7f6; --border: #fbc2c1; --tile: #9b1c2e; --pager-bg: #fdefee; --pager-border: #fbc2c1; } /* coral25/200/700/50 */
.pnn-delay { --bg: #fff8f1; --border: #ffc8a3; --tile: #99290a; --pager-bg: #fff1e3; --pager-border: #ffc8a3; } /* orange25/200/700/50 */
.pnn-resolved { --bg: #edfbf3; --border: #abe3bb; --tile: #005e41; --pager-bg: #dcf6e7; --pager-border: #abe3bb; } /* green25/200/700/50 */

/* ---- Scenes (Weather & transport, Seasonal): background + static illustration ----
   Ground-type scenes draw a 16 px strip along the bottom; the card keeps room for it so text never
   overlaps. Illustrations sit behind the text (.pnn-head and .pnn-body come later in the markup). */
.pnn-scene { position: absolute; inset: 0; pointer-events: none; }
.pnn-strip { position: absolute; left: 0; bottom: 0; width: 100%; height: 16px; display: block; }
.pnn-card.pnn-snow, .pnn-card.pnn-rail, .pnn-card.pnn-road, .pnn-card.pnn-easter, .pnn-card.pnn-summer { padding-bottom: 26px; }
.pnn-deco { position: absolute; color: var(--deco); }

/* Snow: icy blue, snowbank, big flake in the corner */
.pnn-snow { --tile: #005d92; --bg: #effbff; } /* blue700, blue25 */
.pnn-card.pnn-snow { background: linear-gradient(180deg, #e0f8ff 0%, #effbff 75%); } /* blue50 → blue25 */
.pnn-snow .pnn-deco { right: -12px; bottom: -6px; width: 72px; height: 72px; opacity: 0.45; }

/* Storm: grey-blue sky, large cloud */
.pnn-storm { --tile: #0d234b; --bg: #effbff; } /* blue900 */
.pnn-card.pnn-storm { background: linear-gradient(180deg, #f3f2f2 0%, #effbff 100%); } /* gray50 → blue25 */
.pnn-storm .pnn-deco { right: -14px; bottom: -38px; width: 92px; height: 92px; opacity: 0.3; }

/* Rail: mountains and a track */
.pnn-rail { --tile: #0d234b; } /* blue900 */
.pnn-card.pnn-rail { background: linear-gradient(180deg, #ffffff 30%, #effbff 100%); }
.pnn-card.pnn-rail::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; border-top: 2px dashed #8eddf9; pointer-events: none; } /* blue200 */
.pnn-hills { position: absolute; right: 0; bottom: 11px; width: 170px; height: 42px; fill: #e0f8ff; } /* blue50 */
.pnn-hills .pnn-cap { fill: #ffffff; }

/* Road: a road with a dashed centre line */
.pnn-road { --border: #d3cecb; --tile: #5e554a; --pager-bg: #f9f8f8; --pager-border: #d3cecb; } /* gray200/700/25 */
.pnn-card.pnn-road { background: linear-gradient(180deg, #ffffff 30%, #f9f8f8 100%); }
.pnn-roadband { position: absolute; left: 0; right: 0; bottom: 0; height: 13px; background: linear-gradient(90deg, #ffffff 0 55%, transparent 55%) 0 5.5px / 18px 2px repeat-x, #e9e6e5; } /* gray100 */

/* IT: a light dot grid fading in from the right */
.pnn-it { --tile: #0d234b; } /* blue900 */
.pnn-card.pnn-it { background: linear-gradient(90deg, #ffffff 35%, #effbff 100%); }
.pnn-grid {
  position: absolute; top: 0; bottom: 0; right: 0; width: 45%; opacity: 0.55;
  background-image: radial-gradient(#8eddf9 1.1px, transparent 1.5px); background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%);
}

/* Christmas: coral red with a warm glow and gold sparkles */
.pnn-christmas {
  --bg: #9b1c2e; --border: #9b1c2e; --title: #ffffff; --text: #fdefee; /* coral700, coral50 */
  --tile: #ffc8a3; --tile-fg: #500715; --deco: #ffc8a3; --btn: #ffffff; /* orange200, coral900 */
  --pager-bg: rgba(255, 255, 255, 0.12); --pager-border: rgba(255, 255, 255, 0.6);
}
.pnn-card.pnn-christmas { background: radial-gradient(120% 140% at 100% 0%, rgba(240, 99, 101, 0.45) 0%, rgba(240, 99, 101, 0) 55%), #9b1c2e; } /* coral400 glow */
.pnn-christmas .pnn-deco { right: 70px; top: 50%; width: 56px; height: 56px; margin-top: -28px; }
.pnn-card.pnn-christmas:has(.pnn-pager) .pnn-deco { right: 118px; }
.pnn-open.pnn-christmas .pnn-deco { top: 34px; }
.pnn-christmas .pnn-link { color: #ffffff; }

/* Easter: spring colours, grass and three eggs */
.pnn-easter { --border: #ffc8a3; --tile: #f89142; --tile-fg: #4f1600; --pager-bg: #fff1e3; --pager-border: #ffc8a3; --bg: #fff8f1; } /* orange200/400/900/50/25 */
.pnn-card.pnn-easter { background: linear-gradient(180deg, #fff8f1 0%, #edfbf3 100%); } /* orange25 → green25 */
.pnn-eggs { position: absolute; right: 16px; bottom: 4px; width: 78px; height: 36px; }

/* 17 May: bunting in the Norwegian flag's colours along the top */
.pnn-national { --border: #d3cecb; --tile: #9b1c2e; --pager-bg: #f9f8f8; --pager-border: #d3cecb; } /* gray200, coral700 */
.pnn-card.pnn-national { padding-top: 22px; background: linear-gradient(180deg, #ffffff 40%, #f9f8f8 100%); }
.pnn-bunting { position: absolute; left: 0; top: 0; width: 100%; height: 14px; }

/* Summer: warm light, sun over the sea */
.pnn-summer { --border: #ffc8a3; --tile: #ed7123; --tile-fg: #4f1600; --pager-bg: #fff1e3; --pager-border: #ffc8a3; --bg: #fff8f1; } /* orange200/500/900 */
.pnn-card.pnn-summer { background: linear-gradient(180deg, #fff8f1 0%, #fff1e3 100%); }
.pnn-sun { position: absolute; right: 22px; bottom: -19px; width: 56px; height: 56px; }

/* ---- Effects: once, under 5 s, the first time a notice is shown (WCAG 2.2.2 needs no pause
   control then). Never with "reduce motion". Only transforms and opacity. ---- */
.pnn-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* Falling snow (snow; white for Christmas) */
.pnn-fx-snow i { position: absolute; top: -8px; width: 6px; height: 6px; border-radius: 50%; background: #8eddf9; opacity: 0; animation: pnn-fall-a 2.8s linear both; } /* blue200 */
.pnn-fx-snow i:nth-child(even) { width: 4px; height: 4px; background: #00a0d6; animation-name: pnn-fall-b; } /* blue400 */
.pnn-fx-snow.pnn-white i { background: #ffffff; }
.pnn-fx-snow.pnn-white i:nth-child(even) { background: #ffc8a3; } /* orange200 */
.pnn-fx-snow i:nth-child(1) { left: 6%; animation-delay: 0s; }
.pnn-fx-snow i:nth-child(2) { left: 14%; animation-delay: 0.7s; animation-duration: 3.1s; }
.pnn-fx-snow i:nth-child(3) { left: 23%; animation-delay: 0.3s; animation-duration: 2.5s; }
.pnn-fx-snow i:nth-child(4) { left: 31%; animation-delay: 1.1s; }
.pnn-fx-snow i:nth-child(5) { left: 40%; animation-delay: 0.5s; animation-duration: 3.2s; }
.pnn-fx-snow i:nth-child(6) { left: 48%; animation-delay: 0.1s; animation-duration: 2.6s; }
.pnn-fx-snow i:nth-child(7) { left: 57%; animation-delay: 0.9s; }
.pnn-fx-snow i:nth-child(8) { left: 65%; animation-delay: 0.4s; animation-duration: 3s; }
.pnn-fx-snow i:nth-child(9) { left: 73%; animation-delay: 1.3s; animation-duration: 2.6s; }
.pnn-fx-snow i:nth-child(10) { left: 81%; animation-delay: 0.2s; }
.pnn-fx-snow i:nth-child(11) { left: 89%; animation-delay: 0.8s; animation-duration: 3.1s; }
.pnn-fx-snow i:nth-child(12) { left: 95%; animation-delay: 1.4s; animation-duration: 2.5s; }
@keyframes pnn-fall-a {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: 0.95; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(12px, 160px, 0); }
}
@keyframes pnn-fall-b {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: 0.9; }
  80% { opacity: 0.7; }
  100% { opacity: 0; transform: translate3d(-10px, 160px, 0); }
}

/* Storm: slanted rain and a gust of wind */
.pnn-fx-storm i { position: absolute; top: -16px; width: 1.6px; height: 13px; border-radius: 1px; background: #00a0d6; opacity: 0; animation: pnn-rain 1.1s linear 3 both; } /* blue400 */
.pnn-fx-storm i:nth-child(1) { left: 10%; }
.pnn-fx-storm i:nth-child(2) { left: 20%; animation-delay: 0.45s; }
.pnn-fx-storm i:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.pnn-fx-storm i:nth-child(4) { left: 40%; animation-delay: 0.65s; }
.pnn-fx-storm i:nth-child(5) { left: 50%; animation-delay: 0.1s; }
.pnn-fx-storm i:nth-child(6) { left: 60%; animation-delay: 0.55s; }
.pnn-fx-storm i:nth-child(7) { left: 70%; animation-delay: 0.3s; }
.pnn-fx-storm i:nth-child(8) { left: 80%; animation-delay: 0.75s; }
.pnn-fx-storm i:nth-child(9) { left: 90%; animation-delay: 0.15s; }
.pnn-fx-storm i:nth-child(10) { left: 98%; animation-delay: 0.6s; }
@keyframes pnn-rain {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(18deg); }
  15% { opacity: 0.55; }
  100% { opacity: 0; transform: translate3d(-36px, 150px, 0) rotate(18deg); }
}
.pnn-wind { position: absolute; left: 0; top: 50%; width: 120px; height: 120px; margin-top: -40px; fill: none; stroke: #8eddf9; stroke-width: 3; stroke-linecap: round; opacity: 0; animation: pnn-wind 2.1s ease-in-out 0.3s 2 both; } /* blue200 */
@keyframes pnn-wind {
  0% { opacity: 0; transform: translate3d(-130px, 0, 0); }
  30%, 70% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(360px, 0, 0); }
}

/* Rail and road: a train / truck passes once, left to right */
.pnn-train, .pnn-truck { position: absolute; left: 0; display: block; animation: pnn-ride 3.8s cubic-bezier(0.45, 0, 0.55, 1) 0.2s both; }
.pnn-train { bottom: 9px; width: 14px; height: 14px; color: #0d234b; } /* blue900 */
.pnn-truck { bottom: 3px; width: 18px; height: 18px; color: #2d2013; } /* gray900 */
.pnn-train .pnn-icon, .pnn-truck .pnn-icon { width: 100%; height: 100%; display: block; }
@keyframes pnn-ride {
  0% { left: -24px; opacity: 0; }
  10%, 88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* IT: a soft scan line sweeps across */
.pnn-scan { position: absolute; top: 0; bottom: 0; left: -90px; width: 80px; background: linear-gradient(90deg, rgba(142, 221, 249, 0), rgba(142, 221, 249, 0.6), rgba(142, 221, 249, 0)); animation: pnn-scan 2.6s ease-in-out 0.2s both; }
@keyframes pnn-scan {
  0% { left: -90px; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Christmas: sparkles twinkle (with white snow from .pnn-fx-snow.pnn-white) */
.pnn-fx-on-christmas .pnn-deco g > * { transform-box: fill-box; transform-origin: center; animation: pnn-twinkle 1.2s ease-in-out 3 both; }
.pnn-fx-on-christmas .pnn-deco g > :nth-child(2n) { animation-delay: 0.4s; }
.pnn-fx-on-christmas .pnn-deco g > :nth-child(3n) { animation-delay: 0.8s; }
@keyframes pnn-twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.55); }
}

/* Easter: the eggs hop up one by one */
.pnn-fx-on-easter .pnn-egg { transform-box: fill-box; transform-origin: 50% 100%; animation: pnn-hop 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pnn-fx-on-easter .pnn-egg:nth-child(2) { animation-delay: 0.3s; }
.pnn-fx-on-easter .pnn-egg:nth-child(3) { animation-delay: 0.6s; }
@keyframes pnn-hop {
  0% { opacity: 0; transform: translateY(26px) scale(0.85); }
  60% { opacity: 1; transform: translateY(-5px) scale(1.04); }
  80% { transform: translateY(1px) scale(0.99); }
  100% { opacity: 1; transform: none; }
}

/* 17 May: confetti in the flag's colours */
.pnn-fx-confetti i { position: absolute; top: -10px; width: 4px; height: 8px; border-radius: 1px; background: #ba0c2f; opacity: 0; animation: pnn-confetti-a 2.8s ease-in both; }
.pnn-fx-confetti i:nth-child(3n) { background: #00205b; }
.pnn-fx-confetti i:nth-child(3n + 1) { background: #ffffff; box-shadow: 0 0 0 0.6px #d3cecb; }
.pnn-fx-confetti i:nth-child(even) { animation-name: pnn-confetti-b; }
.pnn-fx-confetti i:nth-child(1) { left: 5%; }
.pnn-fx-confetti i:nth-child(2) { left: 12%; animation-delay: 0.5s; }
.pnn-fx-confetti i:nth-child(3) { left: 19%; animation-delay: 0.2s; }
.pnn-fx-confetti i:nth-child(4) { left: 27%; animation-delay: 0.8s; }
.pnn-fx-confetti i:nth-child(5) { left: 34%; animation-delay: 0.1s; }
.pnn-fx-confetti i:nth-child(6) { left: 41%; animation-delay: 0.6s; }
.pnn-fx-confetti i:nth-child(7) { left: 48%; animation-delay: 0.3s; }
.pnn-fx-confetti i:nth-child(8) { left: 55%; animation-delay: 0.9s; }
.pnn-fx-confetti i:nth-child(9) { left: 62%; animation-delay: 0.15s; }
.pnn-fx-confetti i:nth-child(10) { left: 69%; animation-delay: 0.7s; }
.pnn-fx-confetti i:nth-child(11) { left: 76%; animation-delay: 0.35s; }
.pnn-fx-confetti i:nth-child(12) { left: 83%; animation-delay: 1s; }
.pnn-fx-confetti i:nth-child(13) { left: 90%; animation-delay: 0.25s; }
.pnn-fx-confetti i:nth-child(14) { left: 96%; animation-delay: 0.55s; }
@keyframes pnn-confetti-a {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(14px, 150px, 0) rotate(540deg); }
}
@keyframes pnn-confetti-b {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(-12px, 150px, 0) rotate(-450deg); }
}

/* Summer: the sun rises and its rays turn */
.pnn-fx-on-summer .pnn-sun { animation: pnn-rise 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pnn-fx-on-summer .pnn-rays { transform-box: fill-box; transform-origin: center; animation: pnn-spin 4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pnn-rise {
  0% { opacity: 0.3; transform: translateY(28px); }
  100% { opacity: 1; transform: none; }
}
@keyframes pnn-spin {
  0% { transform: rotate(-120deg); }
  100% { transform: none; }
}

/* Resolved: the check pops in */
.pnn-fx-on-pop .pnn-tile { animation: pnn-pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pnn-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pnn-fx { display: none; }
  .pnn-card, .pnn-card * { animation: none !important; transition: none !important; }
}
