/* ==========================================================================
   Pflichttext Panel – Slide-up from bottom
   ========================================================================== */

/* ---------- Footer menu link ---------- */
.ap-pflichttext-menu-item a {
  cursor: pointer;
}

/* ---------- Panel wrapper (overlay backdrop + positioning) ---------- */
.ap-pflichttext {
  position: fixed;
  z-index: 9999;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  visibility: hidden;
}

.ap-pflichttext[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}

/* ---------- Panel itself ---------- */
.ap-pflichttext__panel {
  position: relative;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.ap-pflichttext[aria-hidden="false"] .ap-pflichttext__panel {
  transform: translateY(0);
}

/* ---------- Header row ---------- */
.ap-pflichttext__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid #e9ab4b;
  flex-shrink: 0;
}

.ap-pflichttext__title {
  display: none;
}

/* ---------- Close button ---------- */
.ap-pflichttext__close {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-family: "Sarabun", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #0b254f;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ap-pflichttext__close:hover,
.ap-pflichttext__close:focus-visible {
  color: #e9ab4b;
  outline: none;
}

.ap-pflichttext__close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: #0b254f;
  color: #fff;
  transition: background-color 0.2s ease;
}

.ap-pflichttext__close:hover .ap-pflichttext__close-icon,
.ap-pflichttext__close:focus-visible .ap-pflichttext__close-icon {
  background-color: #e9ab4b;
}

/* ---------- Content area ---------- */
.ap-pflichttext__content {
  padding: 1rem 1.25rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: "Sarabun", Arial, sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #0b254f;
}

.ap-pflichttext__content p {
  margin: 0 0 0.5rem;
  padding: 0;
}

.ap-pflichttext__content p:last-child {
  margin-bottom: 0;
}

.ap-pflichttext__content strong {
  font-weight: 700;
}

/* ---------- Tablet + Desktop refinements ---------- */
@media (min-width: 768px) {
  .ap-pflichttext__header {
    padding: 0.75rem 2rem;
  }

  .ap-pflichttext__content {
    padding: 1rem 2rem 1.5rem;
    font-size: 0.9375rem;
  }

  .ap-pflichttext__title {
    display: block;
    margin-right: auto;
    font-family: "Sarabun", Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0b254f;
  }
}

@media (min-width: 981px) {
  .ap-pflichttext__panel {
    max-height: 50vh;
  }

  .ap-pflichttext__content {
    max-width: 55rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.25rem 2rem 1.75rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .ap-pflichttext {
    display: none !important;
  }
}
