/**
 * MD Teacher: countdown to 31/12 (src/Frontend/Countdown.php).
 *
 * A bar at the top of every page. Everything is scoped to #mdt-nt, so the theme and Elementor are not affected.
 * The colours are the same as on the new pages (forside.css).
 */

#mdt-nt {
  --bg: #0b2129;
  --bg-2: #122d36;
  --panel: #1a3944;
  --line: #2b5260;
  --white: #ffffff;
  --mist: #c9d6da;
  --dim: #8fa6ad;
  --red: #e41e2e;
  --red-deep: #b8151f;
  --sun: #6edad3;
  --f-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  position: relative;
  z-index: 50;
  margin: 0;
  background:
    radial-gradient(40rem 8rem at 12% 0%, rgba(110, 218, 211, 0.16), transparent 70%),
    linear-gradient(90deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  color: var(--white);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  border-bottom: 1px solid var(--line);
}
#mdt-nt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sun) 30%, var(--red) 70%, transparent);
  opacity: 0.85;
}
#mdt-nt * {
  box-sizing: border-box;
}
#mdt-nt .mdt-nt-in {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

#mdt-nt .mdt-nt-txt {
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
#mdt-nt .mdt-nt-txt strong {
  font-weight: 700;
  color: var(--white);
}
#mdt-nt .mdt-nt-sub {
  display: block;
  color: var(--mist);
  font-size: 0.88rem;
  margin-top: 0.1rem;
}

#mdt-nt .mdt-nt-puls {
  flex: 0 0 auto;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(228, 30, 46, 0.7);
  animation: mdt-nt-puls 1.8s ease-out infinite;
}
@keyframes mdt-nt-puls {
  0% {
    box-shadow: 0 0 0 0 rgba(228, 30, 46, 0.65);
  }
  70% {
    box-shadow: 0 0 0 0.65rem rgba(228, 30, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(228, 30, 46, 0);
  }
}

#mdt-nt .mdt-nt-ur {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
}
#mdt-nt .mdt-nt-e {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.05rem;
}
#mdt-nt .mdt-nt-e b {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  background: linear-gradient(180deg, #21434f 0%, var(--panel) 50%, #163340 50%, #183845 100%);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.42rem 0.3rem 0.38rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 6px 14px -8px rgba(0, 0, 0, 0.6);
}
#mdt-nt .mdt-nt-e i {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.28rem;
}
#mdt-nt .mdt-nt-k {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 2.1rem;
  color: var(--sun);
  opacity: 0.7;
}
#mdt-nt.mdt-nt-tik .mdt-nt-sek b {
  animation: mdt-nt-tik 0.45s ease-out;
}
@keyframes mdt-nt-tik {
  0% {
    color: var(--sun);
    transform: translateY(-2px);
  }
  100% {
    color: var(--white);
    transform: none;
  }
}

/* The last week: the numbers turn red */
#mdt-nt.mdt-nt-hast .mdt-nt-e b {
  background: linear-gradient(180deg, #f0313f 0%, var(--red) 50%, #cf1a28 50%, var(--red-deep) 100%);
  border-color: #f04a56;
}
#mdt-nt.mdt-nt-hast .mdt-nt-k {
  color: var(--red);
  opacity: 1;
}

#mdt-nt .mdt-nt-cta {
  flex: 0 0 auto;
  display: inline-block;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.62rem 1.2rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
#mdt-nt .mdt-nt-cta:hover {
  background: var(--red-deep);
  color: #fff;
  transform: translateY(-1px);
}
#mdt-nt .mdt-nt-cta:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

#mdt-nt .mdt-nt-kort {
  display: none;
}
#mdt-nt .mdt-nt-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* "Brug efteruddannelsesmidlerne nu" does not fit next to the text and the clock on smaller screens: the short
   "Se priser" instead. Only the button; the text above has its own switch at 760px. */
@media (max-width: 1080px) {
  #mdt-nt .mdt-nt-cta .mdt-nt-lang {
    display: none;
  }
  #mdt-nt .mdt-nt-cta .mdt-nt-kort {
    display: inline;
  }
}
@media (max-width: 980px) {
  #mdt-nt .mdt-nt-sub {
    display: none;
  }
}
@media (max-width: 760px) {
  #mdt-nt {
    font-size: 13px;
  }
  #mdt-nt .mdt-nt-in {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.7rem;
    padding: 0.5rem 0.75rem 0.6rem;
  }
  #mdt-nt .mdt-nt-txt {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
  }
  #mdt-nt .mdt-nt-lang {
    display: none;
  }
  #mdt-nt .mdt-nt-kort {
    display: inline;
  }
  #mdt-nt .mdt-nt-puls {
    width: 0.5rem;
    height: 0.5rem;
  }
  #mdt-nt .mdt-nt-ur {
    gap: 0.18rem;
  }
  #mdt-nt .mdt-nt-e {
    min-width: 2.15rem;
  }
  #mdt-nt .mdt-nt-e b {
    font-size: 1rem;
    padding: 0.28rem 0.15rem 0.24rem;
    border-radius: 0.35rem;
  }
  #mdt-nt .mdt-nt-e i {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    margin-top: 0.15rem;
  }
  #mdt-nt .mdt-nt-k {
    font-size: 0.9rem;
    line-height: 1.55rem;
  }
  #mdt-nt .mdt-nt-cta {
    font-size: 0.8rem;
    padding: 0.5rem 0.85rem;
    align-self: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  #mdt-nt .mdt-nt-puls,
  #mdt-nt.mdt-nt-tik .mdt-nt-sek b {
    animation: none;
  }
}
@media print {
  #mdt-nt {
    display: none;
  }
}
