/* Amoled – Ergänzungen für die statische Version (Menü, Formular, Karte, Video, Hinweise) */

/* Desktop- und Handy-Kopfzeile */
@media (max-width: 992px) { .x-only-desktop { display: none !important; } }
@media (min-width: 993px) { .x-only-mobile { display: none !important; } }

/* Cookie-Hinweis nach Zustimmung ausblenden */
html.x-cookies-ok .con-kit-component-cookie-banner,
html.x-cookies-ok [class*="cookie-banner__wrapper"] { display: none !important; }

/* Handy-Menü */
.x-burger[hidden] { display: none !important; }
body.con-kit-component-modal--open { overflow: hidden; }
.con-kit-component-burger-menu__back button { display: inline-flex; align-items: center; justify-content: center; }
.x-back-icon { display: inline-flex; color: inherit; }
.con-kit-component-burger-menu.x-level-2 .con-kit-component-burger-menu__root { pointer-events: none; }
.con-kit-component-burger-menu:not(.x-level-2) .con-kit-component-burger-menu__megamenu { pointer-events: none; }
.con-kit-component-burger-menu__megamenu .con-kit-megamenu { position: static !important; width: 100% !important; visibility: visible !important; opacity: 1 !important; transform: none !important; }

/* Untermenü (Desktop) */
.con-kit-megamenu-prerender .con-kit-megamenu--fixed.con-kit-megamenu--active { position: fixed !important; z-index: 999; visibility: visible; opacity: 1; pointer-events: auto; }

/* Auswahlfeld */
.con-kit-component-dropdown { position: relative; }
.x-dd-menu {
  position: absolute; top: 100%; left: 0; width: 100%; margin: 8px 0;
  background: #fff; border-radius: 4px; box-sizing: border-box; overflow: hidden;
}
.x-dd-menu .con-kit-component-dropdown__menu-list { max-height: 300px; overflow-y: auto; box-sizing: border-box; }
.x-dd-menu .con-kit-component-dropdown__option:last-child { margin-bottom: 0; }
.x-single-value {
  color: inherit; margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  grid-area: 1 / 1 / 2 / 3; line-height: var(--molecule-form__input__line-height, 24px);
}
.con-kit-component-dropdown__value-container { display: grid; align-items: center; }
.con-kit-component-dropdown__value-container > * { grid-area: 1 / 1 / 2 / 3; }
.con-kit-component-dropdown input[readonly] { caret-color: transparent; cursor: pointer; }
.con-kit-component-dropdown__control--menu-is-open .con-kit-component-dropdown__indicator { transform: rotate(180deg); }
label.x-dd-open { position: relative; z-index: 20; }

/* Telefon-Länderwahl */
.react-tel-input .selected-flag:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.react-tel-input .country-list { z-index: 30; text-align: left; }
.react-tel-input .country-list .country:focus { outline: none; background-color: #f1f1f1; }

/* Formular: Status beim Senden */
.x-form-status:empty { display: none; }
.x-form-status { margin-top: 16px; color: #d32f2f; font-size: 14px; line-height: 20px; }
form[data-x-form] button[type=submit][aria-busy="true"] { opacity: .6; cursor: progress; }

/* Erfolgsmeldung */
.x-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: flex-end; }
.x-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s ease; }
.x-modal__dialog { position: relative; transform: translateY(24px); opacity: 0; transition: transform .25s ease, opacity .25s ease; max-height: 100vh; overflow: auto; }
.x-modal--in .x-modal__backdrop { opacity: 1; }
.x-modal--in .x-modal__dialog { transform: none; opacity: 1; }
.x-modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #000;
}
.x-modal__close svg line { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.x-modal__close:hover { background: rgba(0, 0, 0, .06); }
.x-modal__check {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--color-kit-primary, #e30613); color: #fff;
}
.x-modal__check svg { fill: currentColor; }
.x-modal .con-kit-form-modal__header { font-size: 24px; line-height: 1.3; }
.x-modal .con-kit-form-modal__description { font-size: 16px; line-height: 1.5; }
@media (max-width: 992px) {
  .x-modal .con-kit-form-modal { padding: 64px 24px 48px; box-sizing: border-box; }
}

/* Karte */
.x-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.x-map .maplibregl-ctrl-attrib { font-size: 11px; }
.x-map--error::after {
  content: "Karte konnte nicht geladen werden"; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: #666; font-size: 14px; background: #f6f4ef;
}

/* Video */
.con-kit-component-video-preview.x-playing { position: relative; }
.x-video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 5; }
.con-kit-component-video-preview.x-playing > :not(.x-video-frame) { visibility: hidden; }
