/* Für die Klassen der V14-Elementor-Datei 0.3.0.
   Entweder als Ergänzungsplugin aktivieren ODER als zusätzliches CSS einfügen. */

/* Der Dialoginhalt muss zur Höhenberechnung des Fensters beitragen. */
.ae-v14-page dialog.ae-v14-modal > [data-ae-role="brief-dialog"],
.ae-v14-page dialog.ae-v14-modal > [data-ae-role="sample-dialog"] {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
}
.ae-v14-page dialog.ae-v14-modal {
  min-height: 0;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  overscroll-behavior: contain;
}
.ae-v14-page dialog.ae-v14-modal .ae-dialog-shell,
.ae-v14-page dialog.ae-v14-modal .ae-sample-dialog-shell {
  max-height: none !important;
}

/* Desktop: linke Überschrift folgt innerhalb des FAQ-Rasters. */
@media (min-width: 1025px) {
  .ae-v14-page:not(.elementor-editor-active) .ae-faq-grid {
    align-items: start;
    overflow: visible;
  }
  .ae-v14-page:not(.elementor-editor-active) .ae-faq-grid > .ae-section-heading {
    position: sticky;
    top: calc(110px + var(--wp-admin--admin-bar--height, 0px));
    align-self: start;
    height: fit-content;
  }
}
/* Das bestehende einspaltige Tablet-/Handylayout bleibt ohne Sticky. */
@media (max-width: 1024px) {
  .ae-v14-page .ae-faq-grid > .ae-section-heading {
    position: static;
  }
}

/* Optional: Contact Form 7 im vorhandenen Briefing-Dialog. */
.ae-v14-page .ae-brief-dialog .wpcf7 { width: 100%; }
.ae-v14-page .ae-brief-dialog .wpcf7 p { margin: 0 0 16px; }
.ae-v14-page .ae-brief-dialog .wpcf7 label { display: block; }
.ae-v14-page .ae-brief-dialog .wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.ae-v14-page .ae-brief-dialog .wpcf7 select,
.ae-v14-page .ae-brief-dialog .wpcf7 textarea {
  box-sizing: border-box;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #a58448;
  border-radius: 0;
  color: inherit;
  background: #fff;
  font: inherit;
}
.ae-v14-page .ae-brief-dialog .wpcf7 input[type="submit"] {
  padding: 14px 22px;
  border: 1px solid #242822;
  border-radius: 0;
  background: #242822;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

/* 1.2: tatsächliche Funktionsattribute statt unzuverlässiger Widgetklassen. */
.ae-v14-page [data-ae-action="close"] {
  position: absolute !important;
  top: 18px !important;
  right: 20px !important;
  left: auto !important;
  bottom: auto !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 3;
}
.ae-v14-page [data-ae-action="close"] :is(.elementor-widget-container, .elementor-button-wrapper) {
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ae-v14-page [data-ae-action="close"] .elementor-button {
  box-sizing: border-box !important;
  position: relative !important;
  display: block !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(165,132,72,.38) !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #000 !important;
  outline: none !important;
  box-shadow: none !important;
}
.ae-v14-page [data-ae-role="brief-dialog"] [data-ae-action="close"] .elementor-button {
  background: transparent !important;
}
/* Ein optisch zentriertes Kreuz, unabhängig von Schrift und Button-Innenabständen. */
.ae-v14-page [data-ae-action="close"] .elementor-button::before,
.ae-v14-page [data-ae-action="close"] .elementor-button::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 14px !important;
  height: 1.8px !important;
  background: currentColor !important;
  pointer-events: none;
}
.ae-v14-page [data-ae-action="close"] .elementor-button::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}
.ae-v14-page [data-ae-action="close"] .elementor-button::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}
.ae-v14-page [data-ae-action="close"] .elementor-button-content-wrapper {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.ae-v14-page [data-ae-action="close"] .elementor-button:focus-visible {
  outline: 2px solid #a58448 !important;
  outline-offset: 2px;
}

/* Einleitung begrenzen: natürlicher Umbruch wie in der Referenz. */
.ae-v14-page .ae-sample-dialog-heading > .elementor-widget-text-editor:not(.ae-eyebrow) {
  width: 100% !important;
  max-width: 660px !important;
}

/* Werkzeugleiste: Hinweis flexibel, Zoom und PDF-Link mit eigener Breite. */
.ae-v14-page .ae-sample-dialog-toolbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center !important;
  gap: 14px !important;
}
.ae-v14-page .ae-sample-dialog-toolbar > .elementor-widget-text-editor {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0;
}
.ae-v14-page .ae-sample-zoom-controls {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 118px;
  margin-left: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}
.ae-v14-page .ae-sample-zoom-controls > [data-ae-action] {
  flex: 0 0 34px !important;
  width: 34px !important;
}
.ae-v14-page .ae-sample-zoom-controls > [data-ae-role="zoom-value"] {
  flex: 0 0 50px !important;
  width: 50px !important;
  text-align: center;
  white-space: nowrap;
}
.ae-v14-page .ae-sample-zoom-controls .elementor-button {
  width: 34px !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 0 !important;
  text-align: center;
}
.ae-v14-page .ae-sample-full-link {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content;
}
.ae-v14-page .ae-sample-full-link .elementor-button {
  white-space: nowrap !important;
  width: auto !important;
}

/* Produktauswahl: Hervorhebung und Maus-/Tastaturzustände. */
.ae-v14-page .ae-need-option .option-possibility {
  color: #8c691e !important;
  font-weight: 700 !important;
}
.ae-v14-page .ae-need-option:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
.ae-v14-page .ae-need-option:focus-visible {
  outline: 2px solid #a58448 !important;
  outline-offset: -2px;
}
.ae-v14-page .ae-need-option .ae-option-title {
  display: inline-block;
  transition: transform .2s ease;
}
.ae-v14-page .ae-need-option .ae-option-arrow {
  transition: transform .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .ae-v14-page .ae-need-option:hover .ae-option-title,
  .ae-v14-page .ae-need-option:hover .ae-option-arrow {
    transform: translateX(4px);
  }
}

/* Vorschauen: feste Basisbreite wird von korrekturen.js gesetzt.
   Dadurch verkleinert die Prozentbreite beim Zoomen nicht das Seitenlayout. */
.ae-v14-page .ae-sample-panel-scroll {
  display: block !important;
  max-height: 68vh !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}
.ae-v14-page [data-ae-role="zoom"] {
  box-sizing: border-box !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  transform: none !important;
}
.ae-v14-page [data-ae-role="zoom"].ae-sample-panel-four {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.ae-v14-page [data-ae-role="zoom"]:is(.ae-sample-panel-single-page, .ae-sample-panel-two-pages) {
  display: grid !important;
  grid-template-columns: max-content !important;
  justify-content: center !important;
  align-items: start !important;
  gap: 18px !important;
}
.ae-v14-page [data-ae-role="zoom"].ae-sample-panel-two-pages {
  grid-template-columns: repeat(2, max-content) !important;
}
.ae-v14-page [data-ae-role="zoom"]:is(.ae-sample-panel-single-page, .ae-sample-panel-two-pages) > .elementor-widget-image {
  width: auto !important;
  max-width: none !important;
}
.ae-v14-page [data-ae-role="zoom"]:is(.ae-sample-panel-single-page, .ae-sample-panel-two-pages) img {
  display: block;
  width: auto !important;
  height: min(48vh, 420px) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
}

/* Briefing: Abstand unter der Headline und nicht abgeschnittene Auswahl. */
.ae-v14-page .ae-dialog-intro > .elementor-widget-heading {
  margin-bottom: 14px !important;
}
.ae-v14-page .ae-brief-dialog .ae-field-input {
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5 !important;
  border-color: rgba(165,132,72,.38);
  box-shadow: none;
}
.ae-v14-page .ae-brief-dialog :is(input, select).ae-field-input {
  height: 52px !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
}
.ae-v14-page .ae-brief-dialog select.ae-field-input {
  padding-right: 34px !important;
}
@media (max-width: 767px) {
  .ae-v14-page .ae-sample-dialog-toolbar { flex-wrap: wrap !important; }
  .ae-v14-page .ae-sample-dialog-toolbar > .elementor-widget-text-editor {
    flex: 1 1 100% !important;
  }
  .ae-v14-page .ae-sample-zoom-controls { margin-left: 0 !important; }
  .ae-v14-page [data-ae-role="zoom"].ae-sample-panel-four,
  .ae-v14-page [data-ae-role="zoom"].ae-sample-panel-two-pages {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ae-v14-page .ae-option-title,
  .ae-v14-page .ae-option-arrow { transition: none !important; }
}

/* 1.2: Feldbeschriftungen wie im Prototyp, statt des importierten Gewichts 750. */
.ae-v14-page [data-ae-role="brief-dialog"] .ae-field-label {
  font-weight: 700 !important;
}
.ae-v14-page [data-ae-role="zoom"]:is(.ae-sample-panel-single-page, .ae-sample-panel-two-pages) {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 1.2.1: Im Editor gibt es keine durch JavaScript erzeugten Dialog-Wrapper. */
.aniko-v14-editor-preview :is([data-ae-role="brief-dialog"], [data-ae-role="sample-dialog"]) {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  max-height: none !important;
}
.aniko-v14-editor-preview :is(.ae-dialog-shell, .ae-sample-dialog-shell) {
  position: relative !important;
}

/* 1.2.3: Schriftgewicht der Tabellenköpfe wird direkt am Widget angebunden. */
