:root{
  --pp-font: 'Neo Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Base */
html, body{ font-family: var(--pp-font) !important; }
/* Let the editor grow past the fixed rows height */
.cke, .cke_inner { max-height: none !important; height: auto !important; }
.cke_contents { height: auto !important; min-height: 320px !important; }

/* Sometimes the PCF wrapper sets a fixed height – uncap it */
div[class*="pcf"], div[class*="control"], div[class*="RichText"], div[class*="richtext"] {
  height: auto !important;
  max-height: none !important;
}

/* Common components that otherwise override the font */
h1,h2,h3,h4,h5,h6,
p, a, li, label, small, strong, em, cite,
table, th, td,
.btn, .badge, .alert, .card, .modal,
.form-control, input, textarea, select, button,
.nav, .navbar, .dropdown-menu, .breadcrumb, .pagination,
.entitylist, .entity-grid, .entity-form, .tab-content {
  font-family: var(--pp-font) !important;
}

/* Icon fonts — safe + surgical */
.fa, .fas, .far { font-family: 'Font Awesome 5 Free' !important; }
.material-icons { font-family: 'Material Icons' !important; }
i.ms-Icon,
span.ms-Icon,
i.ms-Button-icon,
span.ms-Button-icon,
i[data-icon-name],
span[data-icon-name],
i.ms-Icon::before,
span.ms-Icon::before,
i.ms-Button-icon::before,
span.ms-Button-icon::before {
  font-family: 'FabricMDL2Icons-14','FabricMDL2Icons','Segoe MDL2 Assets' !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* Top-level nav font size */
.static-top.navbar .menu-bar > .navbar-nav > li > a  { font-size: 16px!important; }

/* Forms */
.crmEntityFormView label { font-weight: normal !important; font-size: 14px !important; }
.crmEntityFormView div.description { font-weight: lighter !important; font-size: 14px !important; }

/* ===== Power Pages Progress Steps - Global (no GUIDs) ===== */
[id^="WebFormControl_"][id$="_ProgressIndicator"] {
  --pp-primary: #4f46e5;   /* current step */
  --pp-done:    #16a34a;   /* completed steps */
  --pp-muted:   #9ca3af;   /* upcoming steps */
  --pp-bg:      #ffffff;
  --pp-line:    #e5e7eb;
  --pp-radius:  9999px;
  --pp-disc:    2.25rem;
  overflow: visible;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 1rem 0 2rem;
  background: transparent;
  counter-reset: step;
  list-style: none;
  border: 0;
  overflow: visible;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item {
  position: relative;
  isolation: isolate;
  flex: 1 1 0;
  text-align: center;
  font-weight: 600;
  color: var(--pp-muted);
  background: none;
  border: 0;
  padding: calc(var(--pp-disc) + .5rem) .5rem .75rem;
  line-height: 1.2;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item::after {
  content: "";
  position: absolute;
  top: calc(var(--pp-disc) / 2 - 1px);
  left: calc(-50% + var(--pp-disc) / 2);
  width: calc(100% - var(--pp-disc) / 2);
  height: 2px;
  background: var(--pp-line);
  z-index: 1;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item:first-child::after { content: none; }
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--pp-disc);
  height: var(--pp-disc);
  border-radius: var(--pp-radius);
  display: grid;
  place-items: center;
  border: 2px solid var(--pp-muted);
  background: var(--pp-bg);
  color: var(--pp-muted);
  font-size: .95rem;
  z-index: 2;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.completed { color: var(--pp-done); }
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.completed::before {
  background: var(--pp-done);
  border-color: var(--pp-done);
  color: #fff;
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.completed + .list-group-item::after,
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.active + .list-group-item::after {
  background: var(--pp-done);
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.active { color: var(--pp-primary); }
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.active::before {
  background: var(--pp-primary);
  border-color: var(--pp-primary);
  color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--pp-primary) 15%, transparent);
}
[id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.incomplete { color: var(--pp-muted); }

@media (prefers-reduced-motion: no-preference) {
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item.active::before {
    animation: pp-pulse 1.6s ease-out infinite;
  }
  @keyframes pp-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pp-primary) 25%, transparent); }
    70% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--pp-primary) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pp-primary) 0%, transparent); }
  }
}

/* mobile: stack vertically with a left rail */
@media (max-width: 576px) {
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top { flex-direction: column; gap: .75rem; }
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item {
    text-align: left;
    padding-left: calc(var(--pp-disc) + 1rem);
    padding-top: .25rem;
  }
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item::before { left: 0; transform: none; }
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item::after {
    left: calc(var(--pp-disc) / 2 - 1px);
    top: calc(var(--pp-disc));
    width: 2px;
    height: calc(100% + .75rem);
  }
  [id^="WebFormControl_"][id$="_ProgressIndicator"] .progress.list-group.top .list-group-item:last-child::after { content: none; }
}

/* ---------- Sticky footer with zero layout side-effects ---------- */
html, body { height: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#mainContent, .wrapper-body { flex: 1 0 auto; }
footer, .site-footer, .page-footer, .footer { position: static !important; margin-top: auto; }
.wrapper-body { padding-top: .01px; }         /* prevents margin-collapsing */
.wrapper-body > *:first-child { margin-top: 0; }

/* Make the header row actually behave like a row */
.custom-container { display: flex; align-items: center; gap: .5rem; }

/* --- images in page content must never overflow --- */
.wrapper-body img,
.page-copy img { max-width: 100%; height: auto; }

/* ---------- HEADER (brand + nav) ---------- */

/* Container alignment for the navbar */
.navbar .container,
.navbar .custom-container {
  display: flex;
  align-items: center;
}

/* Brand wrapper inside the navbar (Power Pages renders your snippet inside this) */
.navbar .navbar-brand,
.navbar .navbar-brand > a,
.site-brand {                      /* <- supports the class added in your snippet */
  display: flex !important;
  align-items: center !important;  /* vertical centering */
  gap: 10px;
  flex-wrap:nowrap;  
  margin-left: 0 !important;
  min-width: 0;
  text-decoration: none !important;
}
.navbar .navbar-header{          /* NEW: ensure the wrapper is flex too */
  display:flex;
  align-items:center;
}

/* Logo image sizing + baseline fix */
.navbar .navbar-brand img,
.site-brand .site-logo {
  display: block;     /* kill inline-image baseline gap */
  height: 40px;       /* desktop default */
  width: auto;
}

/* Mobile logo size */
@media (max-width: 576px) {
  .navbar .navbar-brand img,
  .site-brand .site-logo { height: 32px; }
}

/* Site title (DTU red, wraps nicely) */
.navbar .navbar-brand .site-title,
.site-brand .site-title {
  color: #990000 !important;
  font-weight: 700;
  line-height: 1.15;
  font-size: 1.25rem;
  white-space: normal;   /* allow wrapping next to the logo */
}
@media (max-width: 992px) {
  .navbar .navbar-brand .site-title,
  .site-brand .site-title { font-size: 1.05rem; }
}

/* Keep the main nav on one line on wide screens */
#navbar { width: auto !important; }
.menu-bar { flex: 1 1 auto; }
.menu-bar .weblinks { display: flex; flex-wrap: nowrap; align-items: center; gap: .75rem; margin-left:auto;  justify-content:flex-end;   }
.menu-bar .weblinks > li { white-space: nowrap; }

/* Safety: page images never blow up (duplicate unified) */
.wrapper-body img, .page-copy img { max-width: 100%; height: auto; }
