.digimax-open-day-bar {
  --dod-bg-color: #10364d;
  --dod-text-color: #ffffff;
  --dod-heading-color: #ffffff;
  --dod-button-bg-color: #f4b042;
  --dod-button-text-color: #10364d;
  --dod-accent-color: #f4b042;
  --dod-countdown-color: #ffffff;
  --dod-button-radius: 999px;
  --dod-button-text-size: 16px;
  --dod-button-font-weight: 800;
  --dod-button-letter-spacing: 2px;
  --dod-banner-headline-size: 44px;
  --dod-banner-headline-weight: 800;
  --dod-banner-message-size: 16px;
  --dod-banner-message-weight: 400;
  --dod-section-radius: 8px;
  --dod-bar-height: 40px;
  --dod-rotational-text-size: 14px;
  --dod-rotational-font-weight: 400;
  --dod-rotational-text-align: center;
  --dod-rotational-justify: center;
  --dod-rotational-padding: 10px;
  --dod-animation-speed: 500ms;
  --dod-popup-padding: 24px;
  --dod-popup-title-size: 32px;
  --dod-popup-title-weight: 700;
  --dod-popup-shadow: 0 24px 60px rgba(16, 54, 77, 0.2);
  color: var(--dod-text-color);
  font-family: inherit;
  position: relative;
  width: 100%;
  z-index: 20;
}

.digimax-open-day-bar,
.digimax-open-day-bar * {
  box-sizing: border-box;
}

.digimax-open-day-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.digimax-open-day-width-contained .digimax-open-day-inner {
  max-width: 1200px;
}

.digimax-open-day-width-full .digimax-open-day-inner {
  max-width: none;
}

.digimax-open-day-content {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 16px;
  min-width: 0;
}

.digimax-open-day-copy {
  min-width: 0;
}

.digimax-open-day-headline {
  margin: 0;
  color: var(--dod-heading-color);
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.digimax-open-day-message {
  margin: 8px 0 0;
  color: inherit;
  font-size: 0.98rem;
  line-height: 1.55;
  opacity: 0.94;
  overflow-wrap: anywhere;
}

.digimax-open-day-message > :first-child {
  margin-top: 0;
}

.digimax-open-day-message > :last-child {
  margin-bottom: 0;
}

.digimax-open-day-message a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.digimax-open-day-message ul,
.digimax-open-day-message ol {
  margin: 0.65em 0 0;
  padding-left: 1.25em;
}

.digimax-open-day-message li + li {
  margin-top: 0.25em;
}

.digimax-open-day-event-details {
  align-items: center;
  color: var(--dod-accent-color);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 8px 14px;
  margin-top: 10px;
}

.digimax-open-day-event-date + .digimax-open-day-event-time::before {
  content: "/";
  margin-right: 14px;
  opacity: 0.65;
}

.digimax-open-day-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  max-width: 100%;
}

.digimax-open-day-button {
  align-items: center;
  background: var(--dod-button-bg-color);
  border-radius: var(--dod-button-radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  color: var(--dod-button-text-color);
  display: inline-flex;
  font-size: var(--dod-button-text-size);
  font-weight: var(--dod-button-font-weight);
  justify-content: center;
  letter-spacing: var(--dod-button-letter-spacing);
  line-height: 1;
  max-width: 100%;
  min-height: 46px;
  padding: 0 24px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: normal;
  word-break: break-word;
}

.digimax-open-day-button:hover,
.digimax-open-day-button:focus {
  color: var(--dod-button-text-color);
  opacity: 0.96;
  transform: translateY(-1px);
}

.digimax-open-day-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.88;
  padding: 4px;
}

.digimax-open-day-close:hover,
.digimax-open-day-close:focus {
  opacity: 1;
}

.digimax-open-day-align-left .digimax-open-day-inner {
  justify-content: flex-start;
}

.digimax-open-day-align-centre .digimax-open-day-inner {
  justify-content: center;
  text-align: center;
}

.digimax-open-day-align-centre .digimax-open-day-content,
.digimax-open-day-align-centre .digimax-open-day-actions {
  justify-content: center;
}

.digimax-open-day-align-split .digimax-open-day-inner {
  justify-content: space-between;
}

.digimax-open-day-template-1 {
  background: var(--dod-bg-color);
  border-radius: var(--dod-section-radius);
  box-shadow: 0 18px 40px rgba(16, 54, 77, 0.15);
  overflow: hidden;
}

.digimax-open-day-template-1 .digimax-open-day-inner {
  padding: 48px 64px;
}

.digimax-open-day-template-1 .digimax-open-day-headline {
  font-size: var(--dod-banner-headline-size);
  font-weight: var(--dod-banner-headline-weight);
}

.digimax-open-day-template-1 .digimax-open-day-message {
  font-size: var(--dod-banner-message-size);
  font-weight: var(--dod-banner-message-weight);
}

.digimax-open-day-icon {
  align-items: center;
  border: 3px solid currentColor;
  border-radius: 999px 999px 999px 0;
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  transform: rotate(-45deg);
  width: 44px;
}

.digimax-open-day-icon span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 16px;
  width: 16px;
}

.digimax-open-day-icon img {
  display: block;
  height: 100%;
  object-fit: contain;
  transform: rotate(45deg);
  width: 100%;
}

.digimax-open-day-icon-right {
  order: 2;
}

.digimax-open-day-highlights {
  display: grid;
  flex: 0 1 260px;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.digimax-open-day-highlights li {
  align-items: center;
  display: flex;
  gap: 10px;
  line-height: 1.35;
}

.digimax-open-day-highlights li::before {
  align-items: center;
  background: currentColor;
  border-radius: 999px;
  color: var(--dod-bg-color);
  content: "\2713";
  display: inline-flex;
  flex: 0 0 16px;
  font-size: 11px;
  font-weight: 800;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.digimax-open-day-countdown {
  align-items: center;
  color: var(--dod-countdown-color);
  display: inline-flex;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  gap: 4px;
}

.digimax-open-day-countdown-labels {
  gap: 8px;
}

.digimax-open-day-countdown-unit {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 46px;
}

.digimax-open-day-countdown-number {
  font-size: 1.05rem;
  line-height: 1;
}

.digimax-open-day-countdown-label {
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0.78;
  text-transform: uppercase;
}

.digimax-open-day-template-2 {
  background: var(--dod-bg-color);
  border-radius: var(--dod-section-radius);
  box-shadow: 0 12px 28px rgba(16, 54, 77, 0.14);
  min-height: var(--dod-bar-height);
  overflow: hidden;
}

.digimax-open-day-template-2 .digimax-open-day-inner {
  min-height: var(--dod-bar-height);
  padding: var(--dod-rotational-padding) 56px;
}

.digimax-open-day-rotator {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  font-size: var(--dod-rotational-text-size);
  font-weight: var(--dod-rotational-font-weight);
  gap: 26px;
  justify-content: var(--dod-rotational-justify);
  min-width: 0;
  overflow: hidden;
  text-align: var(--dod-rotational-text-align);
}

.digimax-open-day-rotator .digimax-open-day-headline {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.digimax-open-day-rotator-separator {
  opacity: 0.85;
}

.digimax-open-day-rotator-separator-icon {
  display: inline-block;
  line-height: 1;
  vertical-align: -0.08em;
}

span.digimax-open-day-rotator-separator-icon.dashicons {
  font-size: 1em;
  height: 1em;
  width: 1em;
}

i.digimax-open-day-rotator-separator-icon {
  font-size: 1em;
}

img.digimax-open-day-rotator-separator-icon {
  height: 1em;
  object-fit: contain;
  vertical-align: -0.15em;
  width: auto;
}

.digimax-open-day-rotator-fade,
.digimax-open-day-rotator-slide {
  flex-wrap: nowrap;
}

.digimax-open-day-rotator-fade .digimax-open-day-rotator-item,
.digimax-open-day-rotator-fade .digimax-open-day-rotator-separator {
  flex: 0 0 auto;
  opacity: 1;
  transition: opacity var(--dod-animation-speed) ease;
  white-space: nowrap;
}

.digimax-open-day-rotator-fade.is-fading-out .digimax-open-day-rotator-item,
.digimax-open-day-rotator-fade.is-fading-in .digimax-open-day-rotator-item,
.digimax-open-day-rotator-fade.is-fading-out .digimax-open-day-rotator-separator,
.digimax-open-day-rotator-fade.is-fading-in .digimax-open-day-rotator-separator {
  opacity: 0;
}

.digimax-open-day-rotator-slide {
  gap: 0;
  justify-content: flex-start;
}

.digimax-open-day-rotator-panel {
  align-items: center;
  display: inline-flex;
  flex: 0 0 100%;
  gap: 26px;
  justify-content: var(--dod-rotational-justify);
  min-width: 100%;
  opacity: 1;
  transition: transform var(--dod-animation-speed) ease, opacity var(--dod-animation-speed) ease;
  white-space: nowrap;
  width: 100%;
}

.digimax-open-day-rotator-panel .digimax-open-day-rotator-item,
.digimax-open-day-rotator-panel .digimax-open-day-rotator-separator {
  flex: 0 0 auto;
  white-space: nowrap;
}

.digimax-open-day-rotator-slide.is-carousel-out .digimax-open-day-rotator-panel {
  transform: translateX(-100%);
}

.digimax-open-day-rotator-slide.is-carousel-in .digimax-open-day-rotator-panel {
  opacity: 0;
}

.digimax-open-day-rotator-marquee {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow: hidden;
  white-space: nowrap;
}

.digimax-open-day-rotator-track {
  align-items: center;
  animation: digimax-open-day-marquee var(--dod-marquee-duration, 18s) linear infinite;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 26px;
  min-width: max-content;
  will-change: transform;
}

.digimax-open-day-rotator-marquee .digimax-open-day-rotator-item,
.digimax-open-day-rotator-marquee .digimax-open-day-rotator-separator {
  flex: 0 0 auto;
}

@keyframes digimax-open-day-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.digimax-open-day-template-2 .digimax-open-day-button {
  min-height: 42px;
}

.digimax-open-day-template-3,
.digimax-open-day-template-4 {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.25s ease;
  /* Max value browsers treat z-index as (32-bit signed int ceiling), so third-party
     floating widgets (chat bubbles, cookie banners, WhatsApp buttons, etc.) — which
     rarely go this high — can never stack above the popup. */
  z-index: 2147483647;
}

.digimax-open-day-template-3.digimax-open-day-popup-visible,
.digimax-open-day-template-4.digimax-open-day-popup-visible {
  opacity: 1;
  pointer-events: auto;
}

.digimax-open-day-popup-backdrop {
  background: rgba(12, 16, 22, 0.48);
  inset: 0;
  position: fixed;
}

.digimax-open-day-popup {
  background: var(--dod-bg-color);
  border-radius: var(--dod-section-radius);
  box-shadow: var(--dod-popup-shadow);
  color: var(--dod-text-color);
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(280px, 1.4fr);
  left: 50%;
  max-height: min(720px, calc(100vh - 48px));
  max-width: min(920px, calc(100vw - 32px));
  overflow: hidden;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.digimax-open-day-popup-small {
  max-width: min(680px, calc(100vw - 32px));
}

.digimax-open-day-popup-large {
  max-width: min(1080px, calc(100vw - 32px));
}

.digimax-open-day-popup-media {
  background: #f3f3f3;
  min-height: 300px;
}

.digimax-open-day-popup-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.digimax-open-day-popup-image-right .digimax-open-day-popup-media {
  order: 2;
}

.digimax-open-day-popup-image-none {
  grid-template-columns: 1fr;
}

.digimax-open-day-popup-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
  min-width: 0;
  padding: var(--dod-popup-padding);
  position: relative;
}

.digimax-open-day-popup-content-left .digimax-open-day-popup-content {
  text-align: left;
}

.digimax-open-day-popup-content-center .digimax-open-day-popup-content {
  align-items: center;
  text-align: center;
}

.digimax-open-day-popup-content-right .digimax-open-day-popup-content {
  align-items: flex-end;
  text-align: right;
}

.digimax-open-day-popup-content .digimax-open-day-close {
  font-size: 2rem;
  position: absolute;
  right: 24px;
  top: 22px;
}

.digimax-open-day-popup-content .digimax-open-day-headline {
  font-size: var(--dod-popup-title-size);
  font-weight: var(--dod-popup-title-weight);
  padding-right: 44px;
}

.digimax-open-day-popup-content .digimax-open-day-event-details {
  margin-top: 0;
}

.digimax-open-day-popup-content-center .digimax-open-day-headline,
.digimax-open-day-popup-content-right .digimax-open-day-headline {
  padding-right: 0;
}

.digimax-open-day-popup-message-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.digimax-open-day-popup-message-list li {
  line-height: 1.4;
}

.digimax-open-day-popup-simple {
  background: transparent;
  box-shadow: none;
  display: block;
  max-height: calc(100vh - 48px);
  max-width: min(var(--dod-simple-popup-width-desktop, 45%), calc(100vw - 32px));
  overflow: visible;
  padding: 0;
  /* Matches the base .digimax-open-day-popup sizing approach: width:100% combined
     with position:fixed; left:50%; transform:translate(-50%,-50%) fills up to
     max-width and centers reliably. width:auto/fit-content on this same positioning
     setup resolves against only half the viewport in this stack, so avoid it. */
  width: 100%;
}

/* Matches the desktop/tablet/mobile breakpoints used for the Show on Desktop/Tablet/
   Mobile visibility controls (see isAllowedForDevice() in frontend.js). */
@media (max-width: 1024px) {
  .digimax-open-day-popup-simple {
    max-width: min(var(--dod-simple-popup-width-tablet, 70%), calc(100vw - 32px));
  }
}

@media (max-width: 767px) {
  .digimax-open-day-popup-simple {
    max-width: min(var(--dod-simple-popup-width-mobile, 92%), calc(100vw - 32px));
  }
}

.digimax-open-day-popup-simple-inner {
  /* Shrink-wraps to the image's actual rendered size (up to the width cap above) and
     is the positioning context for the close button, so the button always sits at the
     image's real top-right corner instead of the outer container's — which can be
     wider than the image whenever the image's own aspect ratio doesn't need the full
     configured width. display:table shrink-wraps reliably here (this element is not
     itself position:fixed, so it doesn't hit the shrink-to-fit quirk noted above). */
  display: table;
  margin: 0 auto;
  max-width: 100%;
  position: relative;
}

.digimax-open-day-popup-simple-image {
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(16, 54, 77, 0.28);
  display: block;
  height: auto;
  max-height: calc(100vh - 48px);
  max-width: 100%;
  transition: opacity 0.2s ease;
  width: auto;
}

.digimax-open-day-popup-simple-link {
  display: block;
}

.digimax-open-day-popup-simple-link:hover .digimax-open-day-popup-simple-image,
.digimax-open-day-popup-simple-link:focus .digimax-open-day-popup-simple-image {
  opacity: 0.92;
}

.digimax-open-day-popup-simple .digimax-open-day-close {
  align-items: center;
  background: rgba(17, 24, 39, 0.72);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.4rem;
  height: 36px;
  justify-content: center;
  opacity: 1;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
}

.digimax-open-day-popup-simple .digimax-open-day-close:hover,
.digimax-open-day-popup-simple .digimax-open-day-close:focus {
  background: rgba(17, 24, 39, 0.9);
  opacity: 1;
}

.digimax-open-day-template-3 .digimax-open-day-button {
  min-height: 52px;
  padding-left: 34px;
  padding-right: 34px;
}

.digimax-open-day-popup-cta-left .digimax-open-day-actions {
  justify-content: flex-start;
}

.digimax-open-day-popup-cta-center .digimax-open-day-actions {
  justify-content: center;
}

.digimax-open-day-popup-cta-right .digimax-open-day-actions {
  justify-content: flex-end;
}

.digimax-open-day-is-preview.digimax-open-day-template-3,
.digimax-open-day-is-preview.digimax-open-day-template-4 {
  inset: auto;
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.digimax-open-day-is-preview .digimax-open-day-popup-backdrop {
  display: none;
}

.digimax-open-day-is-preview .digimax-open-day-popup {
  left: auto;
  max-width: 100%;
  position: relative;
  top: auto;
  transform: none;
}

@media (max-width: 960px) {
  .digimax-open-day-template-1 .digimax-open-day-inner,
  .digimax-open-day-template-2 .digimax-open-day-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .digimax-open-day-template-1 .digimax-open-day-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .digimax-open-day-highlights {
    flex-basis: auto;
  }

  .digimax-open-day-popup {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .digimax-open-day-popup-media {
    min-height: 220px;
  }
}

@media (min-width: 783px) and (max-width: 960px) {
  /* In this range the Banner has already stacked into a column (see the 960px rule
     above) but the button isn't yet forced to width:100% (that only happens at
     782px and below), so .digimax-open-day-actions would otherwise sit flush with
     the icon's left edge instead of lining up with the headline/message text next
     to it. 44px icon width + 16px .digimax-open-day-content gap = 60px. */
  .digimax-open-day-template-1 .digimax-open-day-actions {
    margin-left: 60px;
    max-width: calc(100% - 60px);
  }
}

@media (max-width: 782px) {
  .digimax-open-day-inner {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .digimax-open-day-content {
    align-items: flex-start;
    width: 100%;
  }

  .digimax-open-day-actions {
    /* Centers the countdown (an auto-width flex item) under the button on mobile.
       The button itself is unaffected since it's forced to width:100% below, filling
       the row edge to edge regardless of justify-content. */
    justify-content: center;
    width: 100%;
  }

  .digimax-open-day-button {
    width: 100%;
  }

  /* Overrides the rule above for Banner and Rotational Text Bar only (Pop Up keeps
     the always-full-width button). More specific (two classes) than the plain
     .digimax-open-day-button rule, so it wins regardless of source order. */
  .digimax-open-day-template-1 .digimax-open-day-button,
  .digimax-open-day-template-2 .digimax-open-day-button {
    width: var(--dod-button-mobile-width, 100%);
  }

  .digimax-open-day-rotator {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .digimax-open-day-template-1 .digimax-open-day-inner,
  .digimax-open-day-template-2 .digimax-open-day-inner {
    padding: 18px;
  }

  .digimax-open-day-template-1 .digimax-open-day-headline {
    font-size: min(var(--dod-banner-headline-size), 1.55rem);
  }

  .digimax-open-day-popup-media {
    min-height: 180px;
  }

  .digimax-open-day-popup-content {
    padding: 24px;
  }

  .digimax-open-day-popup-content .digimax-open-day-headline {
    font-size: min(var(--dod-popup-title-size), 2rem);
  }
}
