/* Seite bei offenem Modal scroll-locken */
.tf-modal-open,
.tf-modal-open body {
  overflow: hidden;
}

/* Vollflächiger Backdrop */
.tf-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Sichtbar, wenn geöffnet */
.tf-modal-backdrop[aria-hidden="false"] {
  display: flex;
}

/* Dunkle Überlagerung */
.tf-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Dialog nimmt 100% Breite/Höhe ein */
.tf-modal-dialog {
  position: relative;
  width: 90vw;
  max-width: 1200px;
  max-height: none;
  margin: 0;
  background: #fff;
  outline: 0;
  /* Innenabstand für Content */
  padding: 0;
  display: flex;
  flex-direction: column;

  max-height: 90vh; /* Maximal 90% der Viewport-Höhe */
}

/* Schließen-Button oben rechts "on top" */
.tf-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: #fff;
  border: 1px solid #e5e7eb !important;
  font-size: var(--fs-l);
  cursor: pointer !important;
}

/* Inhaltshülle für Scrollbereich */
.tf-veranstaltung-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;

  overflow: hidden; /* Header fix, Body scrollt */

  margin-top: 3.5rem; /* Platz für Close-Button */
}

/* Kopfbereich */
#tf-veranstaltung-head {
  padding: 2rem 6rem 4rem 6rem;
  border-bottom: 1px solid #e5e7eb;

  display: flex;
  gap: 1rem;
}
#tf-veranstaltung-head .tf-veranstaltung-head-infos {
  flex: 2;
}
#tf-veranstaltung-head .tf-veranstaltung-head-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 250px;
}

/* .tf-veranstaltung-provider {
  font-family: var(--e-global-typography-a236911-font-family), Sans-serif;
  font-weight: var(--e-global-typography-a236911-font-weight);
  font-style: var(--e-global-typography-a236911-font-style);
  font-size: var(--e-global-typography-a236911-font-size);
  line-height: var(--e-global-typography-a236911-line-height);
  color: #6b7280;
  margin: 0 0 0.25rem 0;
} */

.tf-veranstaltung-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.tf-veranstaltung-provider {
  font-family: "Zain", Sans-serif;
  font-size: var(--fs-l);
  font-weight: 700;
  line-height: 1em;
  color: #374151;

  background-color: var(--e-global-color-secondary);
  padding: 5px 10px 2px 10px;
  border-radius: 0px 0px 13px 0px;

  width: fit-content;

  margin: 0 0 0.25rem 0;
}

.tf-veranstaltung-provider:empty {
  display: none;
}

/* Body (scrollbar) */
#tf-veranstaltung-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 4rem 6rem;

  background-color: var(--e-global-color-74a8827);
}

/* 2-Spalten-Layout */
.tf-veranstaltung-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .tf-veranstaltung-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  #tf-veranstaltung-head .tf-veranstaltung-head-image {
    display: none;
  }
}

/* Linke Spalte: statische Infos/Listen */
.tf-veranstaltung-left {
  background-color: var(--e-global-color-text);
  padding: 2rem;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
}
.tf-veranstaltung-left .tf-list-block {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.tf-veranstaltung-left .tf-list-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  width: 28px;
  min-width: 28px;
}
.tf-veranstaltung-left .tf-list-values {
  color: #374151;
  font-family: var(--e-global-typography-a6ecc12-font-family), Sans-serif;
  font-size: var(--e-global-typography-a6ecc12-font-size);
  line-height: var(--e-global-typography-a6ecc12-line-height);
  font-weight: var(--e-global-typography-a6ecc12-font-weight);
}

/* Rechte Spalte: Beschreibung + Links */
.tf-veranstaltung-right .tf-desc {
  white-space: pre-wrap;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.tf-veranstaltung-right .tf-links .rwp-veranstaltungsdetails-links {
  gap: 1rem;
}
.tf-veranstaltung-right .tf-links a {
  word-break: break-word;
  text-decoration: underline;
}

/* Screenreader Utility */
.tf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media screen and (max-width: 900px) {
  #tf-veranstaltung-head {
    padding: 1.5rem 2rem 2rem 2rem;
  }
  #tf-veranstaltung-body {
    padding: 2rem;
  }
}
