/* ==========================================================
   Queer Pfaffenhofen – Kalenderflächen 1.0.1
   Gilt ausschließlich auf Kalenderübersichten.
   ========================================================== */

body.qp-calendar-surface {
  --qp-cal-blue: #302e72;
  --qp-cal-pink: #fe9fc6;
  --qp-cal-rose: #ffb4d3;
  --qp-cal-page: #fff4f8;
  --qp-cal-white: #ffffff;
  --qp-cal-border: rgba(48, 46, 114, 0.12);
  --qp-cal-shadow: 0 14px 36px rgba(48, 46, 114, 0.11);
  --qp-cal-shadow-soft: 0 8px 24px rgba(48, 46, 114, 0.08);
  background: var(--qp-cal-page) !important;
}


/* Explizite Seitenfläche für YOOtheme und TECs virtuelle Views. */
body.qp-calendar-surface #tm-main,
body.qp-calendar-surface .tm-main,
body.qp-calendar-surface main[role="main"],
body.qp-calendar-surface .tribe-events-view,
body.qp-calendar-surface .tribe-events-view--shortcode,
body.qp-calendar-surface [data-js="tribe-events-view"] {
  background-color: var(--qp-cal-page) !important;
}

/* YOOtheme-Seitenfläche nicht wieder weiß überdecken lassen. */
body.qp-calendar-surface #tm-main,
body.qp-calendar-surface main,
body.qp-calendar-surface .tm-main,
body.qp-calendar-surface .uk-section-default,
body.qp-calendar-surface .uk-section-muted,
body.qp-calendar-surface .uk-background-default {
  background-color: transparent !important;
}

body.qp-calendar-surface .tribe-common,
body.qp-calendar-surface .tribe-events,
body.qp-calendar-surface .tribe-events * {
  font-family: "Safiro", Arial, sans-serif;
}

body.qp-calendar-surface .tribe-events-view {
  color: var(--qp-cal-blue) !important;
  padding-block: clamp(28px, 5vw, 72px) !important;
}

body.qp-calendar-surface #tribe-events-pg-template,
body.qp-calendar-surface .tribe-common--breakpoint-medium.tribe-events .tribe-events-l-container,
body.qp-calendar-surface .tribe-events .tribe-events-l-container {
  max-width: 1280px !important;
}

/* ----------------------------------------------------------
   Suchleiste und Ansichtsumschaltung
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-c-events-bar,
body.qp-calendar-surface .tribe-events .tribe-events-header__events-bar {
  overflow: visible !important;
  margin-bottom: 26px !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 24px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-search__input-control,
body.qp-calendar-surface .tribe-events .tribe-events-c-view-selector,
body.qp-calendar-surface .tribe-events .tribe-events-c-events-bar__search-container {
  background: transparent !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-search__input,
body.qp-calendar-surface .tribe-events .tribe-events-c-view-selector__button,
body.qp-calendar-surface .tribe-events .tribe-events-c-events-bar__search-button {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-search__input::placeholder {
  color: rgba(48, 46, 114, 0.58) !important;
  opacity: 1 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-search__button,
body.qp-calendar-surface .tribe-events button.tribe-events-c-search__button {
  min-height: 48px !important;
  border: 2px solid var(--qp-cal-blue) !important;
  border-radius: 999px !important;
  background: var(--qp-cal-blue) !important;
  color: var(--qp-cal-white) !important;
  -webkit-text-fill-color: var(--qp-cal-white) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-search__button:hover,
body.qp-calendar-surface .tribe-events .tribe-events-c-search__button:focus-visible {
  background: var(--qp-cal-pink) !important;
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
  transform: translateY(-1px);
}

body.qp-calendar-surface .tribe-events .tribe-events-c-view-selector__content,
body.qp-calendar-surface .tribe-events .tribe-events-c-events-bar__search-container {
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 18px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-view-selector__list-item--active,
body.qp-calendar-surface .tribe-events .tribe-events-c-view-selector__list-item:hover {
  background: rgba(254, 159, 198, 0.24) !important;
}

/* ----------------------------------------------------------
   Obere Datumsnavigation: bewusste dunkle CI-Fläche
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar,
body.qp-calendar-surface .tribe-events .tribe-events-header__top-bar {
  gap: 12px !important;
  margin-bottom: 34px !important;
  padding: 16px 18px !important;
  border-radius: 22px !important;
  background: var(--qp-cal-blue) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar button,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar a,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__datepicker-button,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__datepicker-time,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__nav-link,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar svg,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar svg path {
  color: var(--qp-cal-white) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: var(--qp-cal-white) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__today-button {
  border: 2px solid var(--qp-cal-rose) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--qp-cal-rose) !important;
  -webkit-text-fill-color: var(--qp-cal-rose) !important;
  font-weight: 600 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__today-button:hover,
body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar__today-button:focus-visible {
  background: var(--qp-cal-rose) !important;
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

/* ----------------------------------------------------------
   Listenansicht: weiße Lesekarten auf hellrosa Seitenfläche
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__month-separator {
  margin: 42px 0 20px !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__month-separator-text {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  background: var(--qp-cal-pink) !important;
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
  font-weight: 700 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__month-separator::after {
  background-color: rgba(48, 46, 114, 0.18) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-row {
  margin: 0 0 24px !important;
  padding: clamp(18px, 2.5vw, 28px) !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 24px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
  transition: transform 180ms ease, box-shadow 180ms ease !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--qp-cal-shadow) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-date-tag {
  min-width: 76px !important;
  padding: 12px 8px !important;
  border-radius: 18px !important;
  background: rgba(255, 180, 211, 0.55) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-date-tag-weekday,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-date-tag-daynum {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-date-tag-daynum {
  font-weight: 700 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-featured-image-wrapper img {
  border-radius: 18px !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-title,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-title a,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-datetime,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-venue,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-description {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-title a:hover,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-title a:focus-visible {
  color: #9e2760 !important;
  -webkit-text-fill-color: #9e2760 !important;
}

/* ----------------------------------------------------------
   Monatsansicht
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month {
  overflow: hidden !important;
  padding: 12px !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 24px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__header-column {
  padding: 14px 8px !important;
  background: rgba(254, 159, 198, 0.32) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__header-column-title,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__header-column-title-desktop {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
  font-weight: 700 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day {
  border-color: rgba(48, 46, 114, 0.12) !important;
  background: var(--qp-cal-white) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day--current {
  background: rgba(255, 180, 211, 0.20) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day-date-daynum,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day-date-link,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__calendar-event-title-link,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__calendar-event-datetime {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-daynum,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 999px !important;
  background: var(--qp-cal-pink) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-month-mobile-events__mobile-event,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-month-mobile-events__mobile-event-details {
  margin-bottom: 16px !important;
  padding: 18px !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 18px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

/* ----------------------------------------------------------
   Tagesansicht
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__time-separator-text {
  display: inline-flex !important;
  padding: 9px 16px !important;
  border-radius: 999px !important;
  background: var(--qp-cal-pink) !important;
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
  font-weight: 700 !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event {
  margin-bottom: 24px !important;
  padding: clamp(18px, 2.5vw, 28px) !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 24px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event-title,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event-title a,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event-datetime,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event-venue,
body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event-description {
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

/* ----------------------------------------------------------
   Untere Navigation und Abonnieren
   ---------------------------------------------------------- */
body.qp-calendar-surface .tribe-events .tribe-events-c-nav,
body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__container {
  margin-top: 30px !important;
  padding: 14px 16px !important;
  border-radius: 20px !important;
  background: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-nav a,
body.qp-calendar-surface .tribe-events .tribe-events-c-nav button,
body.qp-calendar-surface .tribe-events .tribe-events-c-nav span,
body.qp-calendar-surface .tribe-events .tribe-events-c-nav svg,
body.qp-calendar-surface .tribe-events .tribe-events-c-nav svg path {
  color: var(--qp-cal-white) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: var(--qp-cal-white) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__button,
body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__button-text {
  border-color: var(--qp-cal-rose) !important;
  color: var(--qp-cal-rose) !important;
  -webkit-text-fill-color: var(--qp-cal-rose) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__button:hover,
body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__button:focus-visible {
  background: var(--qp-cal-rose) !important;
  color: var(--qp-cal-blue) !important;
  -webkit-text-fill-color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-subscribe-dropdown__list {
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 16px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow) !important;
}

/* ----------------------------------------------------------
   Datepicker und leere Zustände
   ---------------------------------------------------------- */
body.qp-calendar-surface .datepicker,
body.qp-calendar-surface .tribe-events .datepicker {
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 18px !important;
  background: var(--qp-cal-white) !important;
  box-shadow: var(--qp-cal-shadow) !important;
}

body.qp-calendar-surface .datepicker table tr td.active,
body.qp-calendar-surface .datepicker table tr td.active:hover,
body.qp-calendar-surface .datepicker table tr td span.active,
body.qp-calendar-surface .datepicker table tr td span.active:hover {
  background: var(--qp-cal-pink) !important;
  color: var(--qp-cal-blue) !important;
}

body.qp-calendar-surface .tribe-events .tribe-events-c-messages__message {
  padding: 18px 20px !important;
  border: 1px solid var(--qp-cal-border) !important;
  border-radius: 18px !important;
  background: var(--qp-cal-white) !important;
  color: var(--qp-cal-blue) !important;
  box-shadow: var(--qp-cal-shadow-soft) !important;
}

/* Tastaturfokus */
body.qp-calendar-surface .tribe-events a:focus-visible,
body.qp-calendar-surface .tribe-events button:focus-visible,
body.qp-calendar-surface .tribe-events input:focus-visible {
  outline: 3px solid rgba(254, 159, 198, 0.65) !important;
  outline-offset: 3px !important;
}

/* ----------------------------------------------------------
   Mobil
   ---------------------------------------------------------- */
@media (max-width: 767px) {
  body.qp-calendar-surface .tribe-events-view {
    padding-block: 22px 42px !important;
  }

  body.qp-calendar-surface .tribe-events .tribe-events-c-events-bar,
  body.qp-calendar-surface .tribe-events .tribe-events-header__events-bar {
    border-radius: 18px !important;
  }

  body.qp-calendar-surface .tribe-events .tribe-events-c-top-bar,
  body.qp-calendar-surface .tribe-events .tribe-events-header__top-bar {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-row,
  body.qp-calendar-surface .tribe-events .tribe-events-calendar-day__event {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  body.qp-calendar-surface .tribe-events .tribe-events-calendar-list__event-date-tag {
    min-width: 58px !important;
    padding: 9px 6px !important;
    border-radius: 15px !important;
  }

  body.qp-calendar-surface .tribe-events .tribe-events-calendar-month {
    padding: 6px !important;
    border-radius: 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.qp-calendar-surface .tribe-events *,
  body.qp-calendar-surface .tribe-events *::before,
  body.qp-calendar-surface .tribe-events *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
