/* =========================================
ROOT VARIABLES
========================================= */
:root{
  /* Dark base (clean radio portal atmosphere) */
  --bg: #0b0d10;
  --bgDeep: #07080a;

  /* Surfaces */
  --panel: #10151b;
  --panel2: #121a22;
  --panel3: #16212b;
  --surface: #0f1720;
  --text: #f2f6ff;
  --muted: rgba(242,246,255,0.70);
  --line: rgba(255,255,255,0.12);
  --line2: rgba(255,255,255,0.08);

  /* Base accent (cyan/blue) */
  --cyan: #00cfff;
  --cyanHi: #5ae6ff;
  --cyanBorder: rgba(0,207,255,0.32);
  --cyanGlow: rgba(0,207,255,0.18);

  /* Orange highlight accent (used for hover/active/LIVE) */
  --accent: #ff9500;
  --accentHi: rgba(255,255,255,0.92);
  --accentBorder: rgba(255,149,0,0.32);
  --accentGlow: rgba(255,149,0,0.35);

  /* Keep the explicit orange vars as aliases (requested earlier) */
  --accent2: var(--accent);
  --accent2Hi: #ffb14a;
  --accent2Border: var(--accentBorder);
  --accent2Glow: var(--accentGlow);

  /* Legacy aliases used in post.css */
  --gold: var(--accent2);
  --gold2: var(--accent2Hi);

  /* Extra glow */
  --uiGlow: rgba(0,207,255,0.08);

  /* Theme-required variables */
  --border: rgba(255,255,255,0.08);
  --blueBadge: #4b7792;

  --shadow: 0 16px 34px rgba(0,0,0,0.45);
  --radius: 6px;
  --radiusSharp: 3px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shared bar styling */
  --barTop: #111a22;
  --barBottom: #0b1016;
  --barBorder: var(--border);
  --barShadow: 0 12px 26px rgba(0,0,0,0.42);

  --siteWidth: 1440px;

  --s1: 8px;
  --s2: 12px;
  --s3: 16px;
  --s4: 22px;
  --s5: 28px;
}

/* Theme switching removed (single fixed NanoFM dark theme). */

/* =========================================
BASE / RESET
========================================= */
*{ box-sizing: border-box; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;

  background:
    linear-gradient(
      180deg,
      #081018 0%,
      #07080a 100%
    );

  overflow-x:hidden;
}

/* =========================================
GLOBAL LINK CLEANUP
========================================= */

a::before,
a::after{
  content:none !important;
  display:none !important;
}

a{
  text-decoration:none;
  color:inherit;
}

/* =========================================
ACCESSIBILITY
========================================= */
.skip{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip:focus{
  left: 12px;
  top: 12px;
  width:auto;
  height:auto;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--accentBorder);
  border-radius: var(--radius);
  z-index: 9999;
}

/* =========================================
MAIN LAYOUT
========================================= */
.mmMain{
  width: min(var(--siteWidth), calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 20px;
}

/* Shared panel glow/shadow */
.mmBanner,
.newsSection,
.sidebar .mmCol--shows{
  box-shadow:
    var(--shadow),
    0 0 18px var(--uiGlow);
}

/* =========================================
MUSIC PANEL
========================================= */
.npBar{
  /* tighter placement under header */
  margin: -12px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.npBar__row{
  display:flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.npBar__avatar{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.10);
  display: none;
}
body.is-live .npBar__avatar{ display: inline-block; }
/* LIVE statusbar: kun tekst (ingen avatar/ikon/prikker) */
body.is-live .npBar__avatar{ display: none !important; }
body.is-live .npBar__label{ display: none !important; }
body.is-live .npBar__label::before{ display: none !important; }
.npBar__label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.74);
  white-space: nowrap;
}
.npBar__label::before{
  content:"";
  display:inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 8px;
  background: rgba(255,255,255,0.28);
}
/* Fjern prik før "NU SPILLER:" */
.npBar__label::before{
  display: none;
  content: none;
}
body.is-live .npBar__label::before{
  background: var(--accent);
}
.npBar__title{
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.npBar__track{
  margin-top: 6px;
  height: 2px;
  border-radius: 999px;
  background: rgba(0,207,255,0.14);
  overflow: hidden;
}
.npBar__fill{
  height: 100%;
  width: 0%;
  background: rgba(0,207,255,0.78);
  transition: width 350ms linear;
}

/* LIVE mode: hide "Recently Played" column */
body.is-live #recently{
  display:none;
}

/* LIVE mode: hide all AutoDJ/Music panels (queue + recently played) */
body.is-live .musicPanel{
  display: none;
}

/* LIVE overlay on banner */
.mmLiveOverlay{
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  display:none;
}
body.is-live .mmLiveOverlay{ display:block; }
.mmLiveOverlay__pill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.26);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 3px rgba(0,207,255,0.06);
}
.mmLiveOverlay__dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accentGlow);
}
.mmLiveOverlay__avatar{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
}
.mmLiveOverlay__top{
  font-weight: 900;
  letter-spacing: .3px;
  color: rgba(255,255,255,0.94);
  line-height: 1.1;
  white-space: nowrap;
}
.mmLiveOverlay__sub{
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  margin-top: 2px;
  line-height: 1.1;
  max-width: 52ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* LIVE takeover: Banneret skal være rent visuelt (ingen LIVE tekst ovenpå) */
body.is-live .mmLiveOverlay{
  display: none;
}

.musicPanel{
  /* Ingen stor container-box bag cards (kun selve track-kortene skal ses) */
  border: 0;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  overflow: hidden;
  margin: 0 0 14px;
}
.musicPanel__head{
  /* Skjul "MUSIC" header—kun de to kolonner vises som i reference */
  display:none;
}
.musicPanel__title{
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.musicPanel__sub{ font-size: 12px; color: rgba(255,255,255,0.60); }
.musicPanel__body{
  display:grid;
  grid-template-columns: 1fr 1fr;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}
.musicPanel__col{ padding: 6px 8px 8px; }
.musicPanel__col + .musicPanel__col{ border-left: 1px solid rgba(255,255,255,0.08); }
.musicPanel__colHead h3{
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.92);
}
/* NanoFM music lists (card rows) */
.musicList{ list-style: none; padding: 0; margin: 0; display:flex; flex-direction: column; gap: 6px; }
.musicRow{
  display:flex;
  align-items:center;
  padding: 8px 10px;
  height: 44px; /* ens højde på alle bokse */
  min-height: 44px; /* fallback */
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  /* Subtil dark fill (ikke en stor container box) */
  background: rgba(8,12,18,0.30) !important;
  background-color: rgba(8,12,18,0.30) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.musicRow:hover{
  transform: translateY(-1px);
  border-color: rgba(43,77,122,0.55);
  box-shadow: 0 0 0 3px rgba(43,77,122,0.10);
}
.musicRow__t{ min-width: 0; display:flex; flex-direction: column; gap: 2px; }
.musicRow__title{ font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.musicRow__meta{ font-size: 11px; color: rgba(255,255,255,0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Safety aliases (in case template uses older class names) */
.musicBox,
.queueBox,
.musicSection,
.musicWrapper,
.musicContainer{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.08);
}

/* =========================================
ON AIR / BANNER
========================================= */
.mmOnAirLabel{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 12px 0 8px;
  color: rgba(255,255,255,0.92);
}
.mmBanner{
  position: relative;
  /* Normal banner størrelse (ikke fullscreen/hero) */
  height: 220px;
  border: 1px solid rgba(0,0,0,0.55);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 2px, transparent 2px, transparent 10px),
    linear-gradient(180deg, #1b2328, #0f1316);
  overflow: hidden;
}
.mmBanner::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--banner-img, none);
  /* Fyld hele banner-området pænt (crop er OK, men ingen hård zoom) */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 700ms ease;
  /* Minimal "tightening" uden at crope for meget */
  transform: translateZ(0) scale(1.02);
}
.mmBanner.has-banner::before{ opacity: 1; }
.mmBanner::after{
  content:"";
  position:absolute;
  inset:0;
  /* mørk overlay så tekst altid kan læses */
  background: linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0.62));
  pointer-events:none;
}
.mmBanner__inner{ height: 100%; position: relative; z-index: 2; }
.mmBanner__overlay{
  position:absolute;
  inset: 0;
  padding: 18px;
  display:flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}
.mmBanner__word{
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: lowercase;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.mmBanner__sub{ font-size: 13px; color: rgba(255,255,255,0.88); }
.mmSep{ color: rgba(255,255,255,0.55); padding: 0 4px; }

/* Homepage banner: skjul kun tekst-overlay (behold banner image + dark overlay) */
.mmBanner .mmBanner__word,
.mmBanner .mmBanner__sub{
  display: none;
}

/* (mmBanner__btn removed in original design) */

/* =========================================
NEWS SECTION
========================================= */
.contentGrid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items:start;
}
.newsSection{
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  background: var(--panel2);
  overflow: hidden;
}
.newsSection__head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, var(--barTop), var(--barBottom));
}
.newsSection__title{
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.newsSection__sub{ font-size: 12px; color: rgba(255,255,255,0.62); }
.newsFeed{ padding: 14px; display:flex; flex-direction: column; gap: 12px; }
.newsCard{
  /* Force all cards to be identical size */
  height: 180px;
  min-height: 180px;
  display:flex;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}
.newsCard__thumb{
  background: linear-gradient(180deg, #20282d, #0f1316);
  border-right: 1px solid rgba(255,255,255,0.07);
  flex: 0 0 220px;
  width: 220px;
  height: 100%;
  overflow: hidden;
}
.newsCard__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.newsCard__body{
  padding: 12px 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.newsCard__title{
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  /* Clamp long titles so card height never changes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.newsCard__meta{ font-size: 11px; color: rgba(255,255,255,0.62); }
.newsCard__excerpt{
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.74);
  /* Clamp long excerpts so card height never changes */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.newsCard__actions{ margin-top: auto; }
.newsBtn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 800;
}
.newsBtn:hover{
  border-color: var(--accentBorder);
  color: var(--accentHi);
  box-shadow: 0 0 0 3px var(--accentGlow);
}

/* =========================================
SIDEBAR
========================================= */
.sidebar .mmCol--shows{
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  background: var(--panel2);
  padding: 12px 14px 14px;
}
.mmCol__title{
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.90);
}

.mmShowsCta__text{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
}
.mmShowsCta__btn{
  width: 100%;
  justify-content:center;
}

/* =========================================
MODAL
========================================= */
/* Modal (Stream URL) */
.modal{ position: fixed; inset: 0; display:none; z-index: 80; }
.modal.is-open{ display:block; }
.modal__backdrop{ position:absolute; inset: 0; background: rgba(0,0,0,0.65); }
.modal__panel{
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: 10vh auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, var(--panel3), var(--panel));
  box-shadow: var(--shadow);
  padding: 12px;
}

/* =========================================
MOBILE MENU
========================================= */
/* Mobile menu drawer */
.mobileMenu{ position: fixed; inset: 0; display:none; z-index: 1000; }
.mobileMenu.is-open{ display:block; }
.mobileMenu__backdrop{ position:absolute; inset: 0; background: rgba(0,0,0,0.62); }
.mobileMenu__panel{
  position:absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(340px, 88vw);
  background: linear-gradient(180deg, var(--barTop), var(--barBottom));
  border-left: 1px solid var(--barBorder);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  display:flex;
  flex-direction: column;
}
.mobileMenu__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobileMenu__title{ font-weight: 900; letter-spacing: 0.4px; }
.mobileMenu__close{
  cursor:pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radiusSharp);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  font-size: 22px;
}
.mobileMenu__nav{ padding: 10px 10px; display:flex; flex-direction: column; }
.mobileMenu__nav a{ padding: 12px 12px; border-radius: var(--radiusSharp); color: rgba(255,255,255,0.90); font-weight: 800; }
.mobileMenu__nav a:hover{ color: var(--accentHi); background: rgba(255,255,255,0.04); }
.mobileMenu__social{ margin-top: auto; padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); display:flex; gap: 12px; flex-wrap: wrap; }
.mobileMenu__social a{ color: rgba(255,255,255,0.72); text-decoration: none; }
/* Theme switcher removed */


/* =========================================
   TIGHTER CONTENT SPACING
========================================= */

section,
.block,
.widget,
.card{
  margin-bottom:18px !important;
}

.music,
.musicBox,
.nowPlaying{
  margin-bottom:14px !important;
}

.hero,
.onAir,
.onAirNow{
  margin-bottom:16px !important;
}

.latestNews,
.newsWrap,
.contentGrid{
  gap:16px !important;
}

.card,
.panel,
.widget{
  padding:12px !important;
}

/* =========================================
RESPONSIVE
========================================= */
@media (max-width: 1024px){
  .contentGrid{ grid-template-columns: 1fr; }
  .contentGrid{ grid-template-columns: 1fr; }
  .contentGrid{ grid-template-columns: 1fr; }
  .npBar__row{ flex-wrap: wrap; row-gap: 6px; }
  .npBar__time{ margin-left: auto; }
  .musicPanel__body{ grid-template-columns: 1fr; }
  .musicPanel__col + .musicPanel__col{ border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
}

@media (max-width: 980px){
  /* Smaller but still uniform cards */
  .newsCard{ height: 180px; min-height: 180px; }
  .newsCard__thumb{ flex: 0 0 160px; width: 160px; }
}

@media (max-width: 520px){
  .mmMain{ padding: 12px 0 18px; }
  /* Mobile banner: mindre højde + mindre crop (match mobil look) */
  .mmBanner{ height: 150px; }
  .mmBanner::before{
    /* Fyld banneret pænt på mobil (ingen "letterbox"), men hold logo synligt */
    background-size: cover;
    background-position: 18% center;
    transform: none;
  }
  .mmBanner::after{
    /* lidt lettere overlay på små skærme */
    background: linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.55));
  }
  .mmBanner__word{ font-size: 42px; }
  .newsCard{ height: 160px; min-height: 160px; }
  .newsCard__thumb{ flex: 0 0 120px; width: 120px; }
  .newsCard__title{ -webkit-line-clamp: 2; }
  .newsCard__excerpt{ -webkit-line-clamp: 2; }
}

/* =========================================
LOGOUT TOAST
========================================= */

.mmAlertBar{
  width: 100%;
  padding: 0 20px;
  margin: 10px 0 0;
}

.mmAlertBar__inner{
  width: min(var(--siteWidth), 100%);
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.2px;
  opacity: 0;
}

.mmAlertBar__inner--danger{
  color: rgba(255,255,255,0.92);
  background: rgba(255, 52, 92, 0.14);
  border: 1px solid rgba(255, 52, 92, 0.28);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.55),
    0 0 18px rgba(255, 52, 92, 0.16);
}

.mmAlertBar__inner--success{
  color: rgba(255,255,255,0.92);
  background: rgba(44, 208, 122, 0.14);
  border: 1px solid rgba(44, 208, 122, 0.28);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.55),
    0 0 18px rgba(44, 208, 122, 0.16);
}

.mmAlertBar__inner.is-show{
  animation: mmAlertIn 180ms ease forwards;
}
.mmAlertBar__inner.is-hide{
  animation: mmAlertOut 220ms ease forwards;
}

@keyframes mmAlertIn{
  from{ opacity: 0; transform: translateY(-6px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes mmAlertOut{
  from{ opacity: 1; transform: translateY(0); }
  to{ opacity: 0; transform: translateY(-6px); }
}
