/* =================================================
   BASE / RESET
   ================================================= */

:root {
  --font-base: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --farmar-blue: #0b2a4a;
  --card-bg: rgba(255,255,255,0.92);
  --border-soft: #e6eaee;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  color: var(--farmar-blue);
}

p, li, span {
  font-size: 14px;
  line-height: 1.5;
}

.small {
  font-size: 12px;
  color: #64748b;
}

/* =================================================
   TOP BAR / HEADER
   ================================================= */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 72px;
  padding: 0 24px;      /* kun sider */

  background: var(--farmar-blue);
  color: #fff;
}

.logo img {
  height: 34px;
  display: block;
}

.datetime {
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}

/* =================================================
   TOP BANNER
   ================================================= */

#top-banner.pp-banner {
  background: var(--farmar-blue);
  color: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 16px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#top-banner .pp-banner-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
}

/* =================================================
   PAGE LAYOUT
   ================================================= */

.content {
  padding: 0;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 10px;
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =================================================
   CARD SYSTEM (EN SANNHET)
   ================================================= */

.card {
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--farmar-blue);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 6px;
}

/* =================================================
   WEATHER
   ================================================= */

.weather-top {
  display: flex;
  gap: 12px;
}

.weather-icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.weather-details {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

/* =================================================
   MAP / FLEET
   ================================================= */

#map {
  width: 100%;
  height: 44vh;
  min-height: 380px;
  max-height: 560px;
  border-radius: 12px;
  box-shadow: none;
  margin-bottom: 0;
}


/* Gjør kartet litt “snillere” med tooltips over kortet ditt */
#map .leaflet-tooltip.vessel-label {
  font-family: var(--font-base);
  font-size: 12px;
  line-height: 1.2;

  /* Farmar-ish: mørk pill med glass */
  background: rgba(11, 42, 74, 0.65); /* basert på --farmar-blue */
  color: rgba(255, 255, 255, 0.94);

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);

  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;

  pointer-events: none; /* labels stjeler ikke klikk på marker */
}

/* Fjern Leaflet sin “pil” */
#map .leaflet-tooltip.vessel-label:before {
  display: none;
}

/* =================================================
   INTERNNYHETER
   ================================================= */

.pp-internnyheter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.internnyhet-linje {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  border-left: 4px solid var(--farmar-blue);
}

/* =================================================
   RIKSNYHETER
   ================================================= */

#nrk-news ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#nrk-news li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}

#nrk-news li:last-child {
  border-bottom: none;
}

/* =================================================
   SOLPRODUKSJON
   ================================================= */

.solar-section {
  padding: 16px 12px 24px;
}

/* =================================================
   BACKGROUND
   ================================================= */

.background {
  position: fixed;
  inset: 0;
  background-image: url("/assets/backgound.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* =================================================
   RESPONSIVE
   ================================================= */

@media (max-width: 992px) {
  .dashboard-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 10px;
}

  #map {
  width: 100%;
  height: 44vh;
  min-height: 380px;
  max-height: 560px;
  border-radius: 12px;
  box-shadow: none;
  margin-bottom: 0;
}
}
/* ===========================
   WIND panel (injected by weather.en-US.js)
   =========================== */

.kystwind-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.kystwind-rows > div {
  padding: 6px 0;
  border-bottom: 1px dashed #e6eaee;
}

.kystwind-rows > div:last-child {
  border-bottom: none;
}

.kystwind-updated {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}
/* =================================================
   RIKSNYHETER – Farmar style
   ================================================= */

.riksnyheter,
#nrk-news {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Én nyhetsrad */
.riksnyhet {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  transition: background 0.15s ease;
}

.riksnyhet:hover {
  background: rgba(255,255,255,1);
}

/* Tittel */
.riksnyhet a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #0b2a4a;
  text-decoration: none;
  line-height: 1.4;
}

.riksnyhet a:hover {
  text-decoration: underline;
}

/* Tid */
.riksnyhet-time {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Fallback hvis <ul><li> brukes */
#nrk-news ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#nrk-news li {
  padding: 8px 10px;
  border-radius: 10px;
}

#nrk-news li:hover {
  background: rgba(255,255,255,0.9);
}

#nrk-news li a {
  font-weight: 500;
  color: #0b2a4a;
  text-decoration: none;
}

#nrk-news li a:hover {
  text-decoration: underline;
}

#nrk-news .nrk-time {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* =================================================
   FARTØY I DRIFT – tabell
   ================================================= */

.fleet-table {
  font-size: 13px;
}

.fleet-header,
.fleet-row {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr 1fr 0.7fr 0.7fr;
  gap: 8px;
  align-items: center;
}

.fleet-header {
  font-weight: 700;
  color: #64748b;
  padding-bottom: 6px;
  border-bottom: 1px solid #e6eaee;
}

.fleet-row {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fleet-row:last-child {
  border-bottom: none;
}

.fleet-row strong {
  font-weight: 600;
  color: #0b2a4a;
}

.fleet-row .eta {
  color: #ea580c;
  font-weight: 600;
}

.fleet-updated-time {
  margin-top: 6px;
}
.fleet-row .emoji {
  opacity: 0.85;
  margin-right: 2px;
}
/* =================================================
   Promo video
   ================================================= */

.weather-video {
  margin-top: 12px;
}

.weather-video__ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.weather-video__ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* =================================================
   FLEET cards (kart + tabell)
   ================================================= */

.map-card #map {
  border-radius: 12px;
}

.fleet-card .fleet-table {
  font-size: 13px;
}

.fleet-card .fleet-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
}
