/* EU-Gewährleistungshinweis – Modal */

html.lg-modal-open,
html.lg-modal-open body {
  overflow: hidden; /* Hintergrund nicht scrollen */
}

.lg-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6); /* teiltransparente Abdunklung */
  overflow-y: auto;
  animation: lg-modal-fade 0.15s ease-out;
}

.lg-modal[hidden] {
  display: none;
}

.lg-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: calc(664px + 2 * 1.5rem); /* Grafik 664px + Innenabstand */
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin: auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.lg-modal__dialog:focus {
  outline: none;
}

.lg-modal__title {
  margin: 0 2.5rem 1rem 0; /* Platz für das "x" */
  font-size: 1.25rem;
  line-height: 1.3;
}

.lg-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lg-modal__close:hover,
.lg-modal__close:focus-visible {
  color: #000;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
}

/* Grafik aus dem Widget: zentriert, 664px, max. 100% */
.lg-modal__body .ag-legal-guarantee-notice {
  text-align: center;
}

.lg-modal__body .ag-legal-guarantee-notice a {
  display: inline-block;
  max-width: 100%;
}

.lg-modal__body .ag-legal-guarantee-notice img {
  display: block;
  width: 664px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

@keyframes lg-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-modal { animation: none; }
}
