/* newdesign2026: loaded only by an explicitly enabled local TYPO3 template.
   Original grids, photo dimensions and rubric flow boxes remain intact. */
body.newdesign2026 {
  --nd2026-dark: #33383C;
  --nd2026-border: #DDDFE1;
  --nd2026-white: #FFFFFF;
}
body.newdesign2026 .divider-title-wrapper[data-newdesign2026] {
  position: relative;
  isolation: isolate;
}
/* Keep the original label in flow to preserve each rubric's exact height. */
body.newdesign2026 .divider-title-wrapper[data-newdesign2026] > .divider-title-bg {
  visibility: hidden;
}
body.newdesign2026 .nd2026-rubricbar {
  position: absolute;
  inset: 4px 8px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--nd2026-border);
  border-radius: 6px;
  background: var(--nd2026-white);
  color: var(--nd2026-dark);
  text-align: left;
}
body.newdesign2026 .nd2026-rubriclabel {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 65%;
  box-sizing: border-box;
  padding: 0 30px 0 18px;
  background: var(--nd2026-dark);
  color: var(--nd2026-white);
  font: 700 17px/20px Arial, Helvetica, sans-serif;
  overflow-wrap: anywhere;
  clip-path: polygon(0 0,100% 0,calc(100% - 14px) 100%,0 100%);
}
body.newdesign2026 .nd2026-top::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  background: url("../img/top-faelle-star.svg") center/contain no-repeat;
}
body.newdesign2026 .nd2026-practice {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 48%;
  margin-left: auto;
  padding-right: 16px;
  box-sizing: border-box;
  color: var(--nd2026-dark);
  font: 700 13px/16px Arial, Helvetica, sans-serif;
  text-align: right;
  overflow-wrap: anywhere;
}
body.newdesign2026 .patient_menu img { border-color: var(--nd2026-border); }
body.newdesign2026 hr.menu-divider { visibility: hidden !important; }
body.newdesign2026 .internviewIcon {
  width: 30px !important;
  height: 30px !important;
  right: 8px !important;
  bottom: 11px !important;
  border: 0;
  border-radius: 50%;
  background: transparent url("../img/interview-play.svg") center/30px 30px no-repeat !important;
  filter: drop-shadow(0 1px 5px rgba(0,0,0,.25));
  font-size: 0;
  pointer-events: none;
}
body.newdesign2026 .internviewIcon.verlaufIcon {
  background-image: url("../img/verlauf-stack.svg") !important;
}
body.newdesign2026 ul.subMenu li,
body.newdesign2026 ul.menu li,
body.newdesign2026 .tabs a,
body.newdesign2026 .cloudIcon,
body.newdesign2026 .logoutLink input[type="submit"],
body.newdesign2026 .loginLink input[type="submit"] {
  background: var(--nd2026-white);
  border-color: var(--nd2026-border);
  border-radius: 6px;
  box-shadow: none;
  color: var(--nd2026-dark);
}
body.newdesign2026 ul.subMenu li a,
body.newdesign2026 ul.menu li a { color: inherit; }
body.newdesign2026 ul.subMenu li.active,
body.newdesign2026 ul.subMenu li:hover,
body.newdesign2026 ul.subMenu li:focus-within,
body.newdesign2026 ul.menu li:hover,
body.newdesign2026 ul.menu li:focus-within,
body.newdesign2026 .tabs a.current,
body.newdesign2026 .tabs a:hover,
body.newdesign2026 .tabs a:focus-visible,
body.newdesign2026 .logoutLink input[type="submit"]:hover,
body.newdesign2026 .loginLink input[type="submit"]:hover {
  background: var(--nd2026-dark);
  border-color: var(--nd2026-dark);
  box-shadow: none;
  color: var(--nd2026-white);
}
body.newdesign2026 .doNotLinkIt { background: none !important; border: 0 !important; }
body.newdesign2026 .cloudIcon img {
  width: 135px;
  height: 26px;
  max-width: calc(100% - 12px);
  object-fit: contain;
  border: 0;
}
body.newdesign2026 .nd2026-navbutton {
  display: inline-block;
  position: relative;
  width: 38px;
  height: 39px;
  box-sizing: border-box;
  border: 1px solid var(--nd2026-border);
  border-radius: 6px;
  background: var(--nd2026-white);
  color: var(--nd2026-dark);
  vertical-align: baseline;
}
body.newdesign2026 .nd2026-navbutton > img { opacity: 0; }
body.newdesign2026 .nd2026-navbutton::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: currentColor;
  mask: var(--nd2026-navicon) center/contain no-repeat;
  -webkit-mask: var(--nd2026-navicon) center/contain no-repeat;
  pointer-events: none;
}
body.newdesign2026 .nd2026-back {
  --nd2026-navicon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5 7 12l7 7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.newdesign2026 .nd2026-home {
  --nd2026-navicon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 11 9-8 9 8M6 10v11h5v-6h3v6h4V10' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.newdesign2026 .nd2026-navbutton:hover { background: var(--nd2026-dark); color: var(--nd2026-white); }
/* Keep utility controls in their own rows, with consistent breathing room. */
body.newdesign2026 #leftCol .navigation:has(> .nd2026-navbutton) {
  display: grid;
  grid-template-columns: 38px 38px 1fr;
  gap: 10px 8px;
  width: 202px;
  margin-bottom: 16px;
}
body.newdesign2026 #leftCol .navigation > .nd2026-navbutton { display: block; }
body.newdesign2026 #leftCol .navigation > .tabs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}
body.newdesign2026 #leftCol .tabs > a {
  float: none;
  width: auto;
  height: 32px;
  margin: 0;
  box-sizing: border-box;
}
body.newdesign2026 #leftCol .tabs > a.pN { grid-column: 1 / -1; }
body.newdesign2026 #leftCol .tabs > .clear { display: none; }
body.newdesign2026 #leftCol .navigation > .cloudIcon {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}
body.newdesign2026 #leftCol .cloudIcon > a { width: 100%; line-height: 0; }
body.newdesign2026 #leftCol .logoutLink input[type="submit"] {
  width: 202px;
  height: 32px;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 0 10px;
  border: 1px solid var(--nd2026-border);
  font: 400 12px/30px Arial, Helvetica, sans-serif;
  cursor: pointer;
}
body.newdesign2026 #leftCol a:focus-visible,
body.newdesign2026 #leftCol input[type="submit"]:focus-visible {
  outline: 2px solid var(--nd2026-dark);
  outline-offset: 3px;
}
/* A 46px bar and 14px clear space before the first photo in each group. */
body.newdesign2026 .divider-title-wrapper[data-newdesign2026] { height: 56px; }
body.newdesign2026 .nd2026-rubricbar { bottom: 6px; }
/* Four 202px framed photos with three 14px gaps span 850px.
   Keep their 880px flow container so the existing hover can grow 4px per side. */
@media (min-width: 751px) {
  /* Existing image-frame margins collapse; normalize both frame levels. */
  body.newdesign2026 #rightCol .frame:has(img.image-embed-item[width="880"]):not(:has(.patient_menu_row)) {
    margin-bottom: 26px;
  }
  body.newdesign2026 .patient_menu_row.g880 .nd2026-rubricbar { right: 22px; }
  body.newdesign2026 #rightCol:has(.patient_menu_row.g880) img.image-embed-item[width="880"] {
    width: 850px;
    height: auto;
    margin-left: 8px;
  }
  /* The older practice-owner header uses an inline 40px bottom margin. */
  body.newdesign2026 #rightCol:has(.patient_menu_row.g880) .practice-owner:has(> img[width="880"]) {
    margin-bottom: 26px !important;
  }
  body.newdesign2026 #rightCol:has(.patient_menu_row.g880) .practice-owner > img[width="880"] {
    width: 850px;
    height: auto;
    margin-left: 8px;
  }
}
@media (max-width: 750px) {
  body.newdesign2026 .nd2026-rubricbar { gap: 3px; }
  body.newdesign2026 .nd2026-rubriclabel { padding-left: 10px; padding-right: 23px; font-size: 14px; line-height: 17px; }
  body.newdesign2026 .nd2026-practice { padding-right: 9px; font-size: 11px; line-height: 13px; }
}
