.ths-events-filter-form {
  margin: 0 0 1.5rem;
}

.ths-events-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ths-events-filter-row select,
.ths-events-filter-row > button {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: #3d3d3d !important;
}


.ths-events-filter-row .ths-date-range {
  position: relative;
}

.ths-date-range-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: #3d3d3d !important;
  cursor: pointer;
  white-space: nowrap;
}

.ths-date-range-label-prefix {
  font-weight: 700;
  color: #111827;
}

.ths-date-range-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  width: min(340px, 92vw);
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}


.ths-date-range-popover,
.ths-date-range-popover * {
  color: #111827 !important;
}

.ths-date-range-popover {
  background: #fff !important;
}

.ths-date-range-day,
.ths-date-range-nav,
.ths-date-range-clear,
.ths-date-range-trigger {
  color: #111827 !important;
}

.ths-date-range-day {
  background: transparent !important;
}

.ths-date-range-day:hover {
  background: #f3f4f6 !important;
}

.ths-date-range-day.is-in-range,
.ths-date-range-day.is-in-preview-range {
  background: #dbeafe !important;
}

.ths-date-range-day.is-range-start,
.ths-date-range-day.is-range-end,
.ths-date-range-day.is-preview-start,
.ths-date-range-day.is-preview-end,
.ths-date-range-day.is-selected {
  background: #2563eb !important;
  color: #fff !important;
}

.ths-date-range-header,
.ths-date-range-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ths-date-range-header {
  margin-bottom: 14px;
}

.ths-date-range-title {
  font-size: 1rem;
  color: #111827;
}

.ths-date-range-nav,
.ths-date-range-clear {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 10px;
  cursor: pointer;
}

.ths-date-range-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.ths-date-range-clear {
  padding: 8px 10px;
  font-size: .9rem;
}

.ths-date-range-weekdays,
.ths-date-range-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.ths-date-range-weekdays {
  margin-bottom: 8px;
}

.ths-date-range-weekdays span {
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: #6b7280;
  padding: 6px 0;
}

.ths-date-range-day {
  position: relative;
  height: 42px;
  border: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-size: .95rem;
}

.ths-date-range-day:hover {
  background: #f3f4f6;
}

.ths-date-range-day--empty {
  pointer-events: none;
}

.ths-date-range-day.is-today {
  font-weight: 700;
}

.ths-date-range-day.is-in-range,
.ths-date-range-day.is-in-preview-range {
  background: #dbeafe;
}

.ths-date-range-day.is-range-start,
.ths-date-range-day.is-range-end,
.ths-date-range-day.is-preview-start,
.ths-date-range-day.is-preview-end,
.ths-date-range-day.is-selected {
  background: #2563eb;
  color: #fff;
}

.ths-date-range-day.is-range-start,
.ths-date-range-day.is-preview-start {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.ths-date-range-day.is-range-end,
.ths-date-range-day.is-preview-end {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.ths-date-range-day.is-selected {
  border-radius: 18px;
}

.ths-date-range-help {
  font-size: .85rem;
  color: #6b7280;
}

.ths-events-overview {
  margin: 2.5rem 0;
}

.ths-events-month-group {
  margin-bottom: 3.5rem;
}

.ths-events-month-heading {
  margin: 0 0 1.25rem;
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
}

.ths-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.ths-event-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
}

.ths-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.12);
}

.ths-event-image {
  display: block;
  width: 300px;
  height: 300px;
  max-width: 100%;
  overflow: hidden;
  background: #f3f3f3;
  margin: 18px auto 0;
  border-radius: 16px;
  flex: 0 0 auto;
}

.ths-event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ths-event-content {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ths-event-categories {
  margin-bottom: 12px;
}

.ths-event-category {
  display: inline-block;
  font-size: .82rem;
  line-height: 1.2;
  padding: 6px 10px;
  margin: 0 8px 8px 0;
  background: linear-gradient(180deg, #f5f7fa 0%, #e9eef3 100%);
  border-radius: 999px;
  text-decoration: none;
  color: #334155;
  font-weight: 600;
}

.ths-event-title {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ths-event-title a {
  text-decoration: none;
  color: #1f2937;
}

.ths-event-title a:hover {
  color: #0073aa;
}

.ths-event-meta {
  margin-bottom: 14px;
  display: grid;
  gap: 8px;
}

.ths-event-meta-row {
  position: relative;
  padding-left: 30px;
  font-size: 1rem;
  line-height: 1.45;
  color: #4b5563;
}

.ths-event-meta-row::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  text-align: center;
  font-size: 1rem;
}

/*.ths-event-meta-date::before { 
	font: var('--fa-regular');
	content: "\f073"; }
.ths-event-meta-time::before { content: "🕒"; }
.ths-event-meta-location::before { content: "📍"; }*/

.ths-event-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 18px;
  flex: 1;
}

.ths-event-actions {
  margin-top: auto;
}

.ths-event-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  color: #0073aa;
}

.ths-event-link:hover {
  color: #005f8d;
}

.ths-event-single-meta {
  margin-top: 2rem;
}

.ths-event-single-media {
  margin-bottom: 2rem;
}

.ths-event-single-preview {
  width: 300px;
  height: 300px;
  max-width: 100%;
  overflow: hidden;
  margin: 0 0 1.5rem;
  border-radius: 18px;
  background: #f3f3f3;
}

.ths-event-single-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ths-event-single-gallery {
  display: grid;
  gap: 20px;
}

.ths-event-single-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.ths-event-single-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.ths-event-single-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.ths-event-single-box h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.single-ths_events_cpt .entry-meta {
	display:none !important;
}

.ths-events-filter-row > button{
	color:#999 !important;
}

@media (max-width: 640px) {
  .ths-events-grid {
    grid-template-columns: 1fr;
  }

  .ths-event-title {
    font-size: 1.3rem;
  }

  .ths-events-filter-row {
    flex-direction: column;
  }

  .ths-date-range-popover {
    width: min(100%, 340px);
  }

  .ths-event-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .ths-event-single-preview {
    width: 100%;
    max-width: 300px;
  }
	
}


.ths-events-filter-row input[type="date"] {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: #3d3d3d !important;
}

.ths-events-reset {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  color: #475569;
  padding: 10px 4px;
}

.ths-events-pagination {
  margin-top: 2rem;
}

.ths-events-pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.ths-events-pagination a,
.ths-events-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
}

.ths-events-pagination .current {
  border-color: #0073aa;
  color: #0073aa;
}


/* Responsive Single-Ansicht: nur Preview-Bild begrenzen, Galerie ohne Crop */
.ths-event-single-preview {
  width: 100%;
  max-width: 300px;
  height: 300px;
  overflow: hidden;
  margin: 0 0 1rem;
  border-radius: 18px;
  background: #f3f3f3;
}

.ths-event-single-gallery-item {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
  margin: 0 0 1rem;
  border-radius: 0;
  background: transparent;
}

.ths-event-single-gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

@media (max-width: 640px) {
  .ths-event-single-preview {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}


/* Single-Ansicht (News Portal): Featured/Preview-Bild über dem Titel wie Kachel begrenzen */
.single-ths_events_cpt .np-article-thumb {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin: 0 0 1.5rem;
  border-radius: 18px;
  background: #f3f3f3;
}

.single-ths_events_cpt .np-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .single-ths_events_cpt .np-article-thumb {
    max-width: 300px;
  }
}

.ths-event-submit-wrap {
  margin: 2rem 0;
}

.ths-event-submit-notice {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}

.ths-event-submit-notice--success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.ths-event-submit-notice--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.ths-event-submit-form {
  display: grid;
  gap: 1rem;
}

.ths-event-submit-form h3 {
  margin: 1rem 0 0;
}

.ths-event-submit-grid {
  display: grid;
  gap: 16px;
}

.ths-event-submit-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ths-event-submit-grid--single {
  grid-template-columns: 1fr;
}

.ths-event-submit-form input[type="text"],
.ths-event-submit-form input[type="url"],
.ths-event-submit-form input[type="datetime-local"],
.ths-event-submit-form input[type="file"],
.ths-event-submit-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  box-sizing: border-box;
  background: #fff;
}

.ths-event-submit-form textarea {
  min-height: 120px;
}

.ths-event-submit-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.ths-event-submit-actions button,
.ths-event-submit-form button[type="submit"] {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
}

.ths-event-submit-status.is-error {
  color: #b91c1c;
}

.ths-event-submit-status.is-success {
  color: #15803d;
}

.ths-event-submit-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.ths-event-submit-category-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ths-event-submit-captcha {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.ths-event-submit-hint {
  color: #4b5563;
}

.ths-event-submit-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* === THS Events 4.2.5: Light/Dark Mode Support ===
   Die vorhandene helle Optik bleibt Standard. Diese Regeln greifen automatisch
   bei dunkler Systemeinstellung oder bei typischen Dark-Mode-Klassen/Attributen
   des Themes. */
.ths-events-overview,
.ths-event-submit-wrap,
.single-ths_events_cpt {
  --ths-events-bg: #ffffff;
  --ths-events-surface: #ffffff;
  --ths-events-surface-soft: #f8fafc;
  --ths-events-border: #e5e7eb;
  --ths-events-border-strong: #d1d5db;
  --ths-events-text: #111827;
  --ths-events-text-soft: #374151;
  --ths-events-text-muted: #4b5563;
  --ths-events-link: #0073aa;
  --ths-events-link-hover: #005f8d;
  --ths-events-chip-bg: linear-gradient(180deg, #f5f7fa 0%, #e9eef3 100%);
  --ths-events-chip-text: #334155;
  --ths-events-shadow: 0 10px 30px rgba(0,0,0,0.08);
  --ths-events-shadow-hover: 0 16px 38px rgba(0,0,0,0.12);
  color: var(--ths-events-text);
}

.ths-events-filter-row select,
.ths-events-filter-row input[type="date"],
.ths-events-filter-row > button,
.ths-date-range-trigger,
.ths-date-range-popover,
.ths-date-range-nav,
.ths-date-range-clear,
.ths-events-pagination a,
.ths-events-pagination span,
.ths-event-submit-form input[type="text"],
.ths-event-submit-form input[type="url"],
.ths-event-submit-form input[type="datetime-local"],
.ths-event-submit-form input[type="file"],
.ths-event-submit-form textarea {
  background: var(--ths-events-surface) !important;
  border-color: var(--ths-events-border-strong) !important;
  color: var(--ths-events-text) !important;
}

.ths-events-month-heading,
.ths-date-range-label-prefix,
.ths-date-range-title,
.ths-event-title a,
.ths-date-range-popover,
.ths-date-range-popover * {
  color: var(--ths-events-text) !important;
}

.ths-event-card,
.ths-event-single-box,
.ths-event-submit-captcha {
  background: var(--ths-events-surface) !important;
  border-color: var(--ths-events-border) !important;
  color: var(--ths-events-text) !important;
  box-shadow: var(--ths-events-shadow);
}

.ths-event-card:hover {
  box-shadow: var(--ths-events-shadow-hover);
}

.ths-event-meta-row,
.ths-event-excerpt,
.ths-event-submit-hint,
.ths-events-reset {
  color: var(--ths-events-text-muted) !important;
}

.ths-event-link,
.ths-event-title a:hover,
.ths-events-pagination .current {
  color: var(--ths-events-link) !important;
}

.ths-event-category {
  background: var(--ths-events-chip-bg) !important;
  color: var(--ths-events-chip-text) !important;
}

.ths-event-image,
.ths-event-single-preview,
.single-ths_events_cpt .np-article-thumb {
  background: var(--ths-events-surface-soft) !important;
}

.ths-date-range-day {
  color: var(--ths-events-text) !important;
}

.ths-date-range-day:hover {
  background: var(--ths-events-surface-soft) !important;
}

.ths-event-submit-notice--success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.ths-event-submit-notice--error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

@media (prefers-color-scheme: dark) {
  .ths-events-overview,
  .ths-event-submit-wrap,
  .single-ths_events_cpt {
    --ths-events-bg: #0f172a;
    --ths-events-surface: #111827;
    --ths-events-surface-soft: #1f2937;
    --ths-events-border: #334155;
    --ths-events-border-strong: #475569;
    --ths-events-text: #f8fafc;
    --ths-events-text-soft: #e5e7eb;
    --ths-events-text-muted: #cbd5e1;
    --ths-events-link: #60a5fa;
    --ths-events-link-hover: #93c5fd;
    --ths-events-chip-bg: linear-gradient(180deg, #263449 0%, #1e293b 100%);
    --ths-events-chip-text: #e2e8f0;
    --ths-events-shadow: 0 10px 30px rgba(0,0,0,0.35);
    --ths-events-shadow-hover: 0 16px 38px rgba(0,0,0,0.45);
  }

  .ths-date-range-day.is-in-range,
  .ths-date-range-day.is-in-preview-range {
    background: #1e3a8a !important;
    color: #eff6ff !important;
  }

  .ths-date-range-day.is-range-start,
  .ths-date-range-day.is-range-end,
  .ths-date-range-day.is-preview-start,
  .ths-date-range-day.is-preview-end,
  .ths-date-range-day.is-selected {
    background: #3b82f6 !important;
    color: #ffffff !important;
  }

  .ths-event-submit-notice--success {
    background: #052e1a;
    border-color: #15803d;
    color: #bbf7d0;
  }

  .ths-event-submit-notice--error {
    background: #450a0a;
    border-color: #b91c1c;
    color: #fecaca;
  }
}

/* Theme-/Plugin-spezifische Dark-Mode-Schalter zusätzlich abfangen */
html.dark .ths-events-overview,
html.dark .ths-event-submit-wrap,
html.dark .single-ths_events_cpt,
body.dark .ths-events-overview,
body.dark .ths-event-submit-wrap,
body.dark.single-ths_events_cpt,
body.dark-mode .ths-events-overview,
body.dark-mode .ths-event-submit-wrap,
body.dark-mode.single-ths_events_cpt,
[data-theme="dark"] .ths-events-overview,
[data-theme="dark"] .ths-event-submit-wrap,
[data-theme="dark"] .single-ths_events_cpt,
[data-color-scheme="dark"] .ths-events-overview,
[data-color-scheme="dark"] .ths-event-submit-wrap,
[data-color-scheme="dark"] .single-ths_events_cpt {
  --ths-events-bg: #0f172a;
  --ths-events-surface: #111827;
  --ths-events-surface-soft: #1f2937;
  --ths-events-border: #334155;
  --ths-events-border-strong: #475569;
  --ths-events-text: #f8fafc;
  --ths-events-text-soft: #e5e7eb;
  --ths-events-text-muted: #cbd5e1;
  --ths-events-link: #60a5fa;
  --ths-events-link-hover: #93c5fd;
  --ths-events-chip-bg: linear-gradient(180deg, #263449 0%, #1e293b 100%);
  --ths-events-chip-text: #e2e8f0;
  --ths-events-shadow: 0 10px 30px rgba(0,0,0,0.35);
  --ths-events-shadow-hover: 0 16px 38px rgba(0,0,0,0.45);
}

html.dark .ths-date-range-day.is-in-range,
html.dark .ths-date-range-day.is-in-preview-range,
body.dark .ths-date-range-day.is-in-range,
body.dark .ths-date-range-day.is-in-preview-range,
body.dark-mode .ths-date-range-day.is-in-range,
body.dark-mode .ths-date-range-day.is-in-preview-range,
[data-theme="dark"] .ths-date-range-day.is-in-range,
[data-theme="dark"] .ths-date-range-day.is-in-preview-range,
[data-color-scheme="dark"] .ths-date-range-day.is-in-range,
[data-color-scheme="dark"] .ths-date-range-day.is-in-preview-range {
  background: #1e3a8a !important;
  color: #eff6ff !important;
}

html.dark .ths-date-range-day.is-range-start,
html.dark .ths-date-range-day.is-range-end,
html.dark .ths-date-range-day.is-preview-start,
html.dark .ths-date-range-day.is-preview-end,
html.dark .ths-date-range-day.is-selected,
body.dark .ths-date-range-day.is-range-start,
body.dark .ths-date-range-day.is-range-end,
body.dark .ths-date-range-day.is-preview-start,
body.dark .ths-date-range-day.is-preview-end,
body.dark .ths-date-range-day.is-selected,
body.dark-mode .ths-date-range-day.is-range-start,
body.dark-mode .ths-date-range-day.is-range-end,
body.dark-mode .ths-date-range-day.is-preview-start,
body.dark-mode .ths-date-range-day.is-preview-end,
body.dark-mode .ths-date-range-day.is-selected,
[data-theme="dark"] .ths-date-range-day.is-range-start,
[data-theme="dark"] .ths-date-range-day.is-range-end,
[data-theme="dark"] .ths-date-range-day.is-preview-start,
[data-theme="dark"] .ths-date-range-day.is-preview-end,
[data-theme="dark"] .ths-date-range-day.is-selected,
[data-color-scheme="dark"] .ths-date-range-day.is-range-start,
[data-color-scheme="dark"] .ths-date-range-day.is-range-end,
[data-color-scheme="dark"] .ths-date-range-day.is-preview-start,
[data-color-scheme="dark"] .ths-date-range-day.is-preview-end,
[data-color-scheme="dark"] .ths-date-range-day.is-selected {
  background: #3b82f6 !important;
  color: #ffffff !important;
}


/* === THS Events 4.2.6: Vollständiger Dark Mode für [ths_event_submit] === */
.ths-event-submit-wrap {
  color: var(--ths-events-text) !important;
}

.ths-event-submit-form,
.ths-event-submit-form p,
.ths-event-submit-form label,
.ths-event-submit-form strong,
.ths-event-submit-form h3,
.ths-event-submit-repeat,
.ths-event-submit-repeat-group,
.ths-event-submit-category-list,
.ths-event-submit-category-list label {
  color: var(--ths-events-text) !important;
}

.ths-event-submit-form input[type="text"],
.ths-event-submit-form input[type="url"],
.ths-event-submit-form input[type="datetime-local"],
.ths-event-submit-form input[type="date"],
.ths-event-submit-form input[type="number"],
.ths-event-submit-form input[type="file"],
.ths-event-submit-form select,
.ths-event-submit-form textarea {
  background: var(--ths-events-surface) !important;
  border-color: var(--ths-events-border-strong) !important;
  color: var(--ths-events-text) !important;
  caret-color: var(--ths-events-text) !important;
}

.ths-event-submit-form input[readonly],
.ths-event-submit-form input:disabled,
.ths-event-submit-form select:disabled,
.ths-event-submit-form textarea:disabled {
  background: var(--ths-events-surface-soft) !important;
  color: var(--ths-events-text-muted) !important;
  opacity: 1 !important;
}

.ths-event-submit-form input::placeholder,
.ths-event-submit-form textarea::placeholder {
  color: var(--ths-events-text-muted) !important;
  opacity: 0.9;
}

.ths-event-submit-form select option {
  background: var(--ths-events-surface) !important;
  color: var(--ths-events-text) !important;
}

.ths-event-submit-repeat,
.ths-event-submit-repeat-group {
  background: var(--ths-events-surface-soft) !important;
  border: 1px solid var(--ths-events-border) !important;
  border-radius: 14px;
  padding: 1rem;
}

.ths-event-submit-repeat {
  display: grid;
  gap: 1rem;
}

.ths-event-submit-repeat-group {
  margin-top: 0.25rem;
}

.ths-event-submit-form .description,
.ths-event-submit-form span.description,
.ths-event-submit-form p.description,
.ths-event-submit-hint {
  color: var(--ths-events-text-muted) !important;
}

.ths-event-submit-category-list label {
  background: color-mix(in srgb, var(--ths-events-surface) 78%, transparent);
  border: 1px solid var(--ths-events-border);
  border-radius: 999px;
  padding: 6px 10px;
}

.ths-event-submit-form input[type="checkbox"] {
  accent-color: var(--ths-events-link);
}

.ths-event-submit-actions .button,
.ths-event-submit-actions button,
.ths-event-submit-form button[type="submit"] {
  background: var(--ths-events-link) !important;
  color: #ffffff !important;
  border: 1px solid var(--ths-events-link) !important;
}

.ths-event-submit-actions .button:hover,
.ths-event-submit-actions button:hover,
.ths-event-submit-form button[type="submit"]:hover {
  background: var(--ths-events-link-hover) !important;
  border-color: var(--ths-events-link-hover) !important;
  color: #ffffff !important;
}

.ths-event-submit-captcha {
  background: var(--ths-events-surface-soft) !important;
  border-color: var(--ths-events-border) !important;
  color: var(--ths-events-text) !important;
}

.ths-event-submit-status.is-error {
  color: #ef4444 !important;
}

.ths-event-submit-status.is-success {
  color: #22c55e !important;
}

/* Fallback für Browser ohne color-mix */
@supports not (background: color-mix(in srgb, #fff 50%, transparent)) {
  .ths-event-submit-category-list label {
    background: var(--ths-events-surface) !important;
  }
}


/* === THS Events 4.2.7: HybridMag Pro Darkmode (.hm-dark) ===
   Das Theme HybridMag Pro setzt den Darkmode über html.hm-dark.
   Diese Regeln erzwingen den dunklen Hintergrund auch im Eingabebereich
   des Shortcodes [ths_event_submit]. */
html.hm-dark .ths-events-overview,
html.hm-dark .ths-event-submit-wrap,
html.hm-dark .single-ths_events_cpt {
  --ths-events-bg: #0f172a;
  --ths-events-surface: #111827;
  --ths-events-surface-soft: #1f2937;
  --ths-events-border: #334155;
  --ths-events-border-strong: #475569;
  --ths-events-text: #f8fafc;
  --ths-events-text-soft: #e5e7eb;
  --ths-events-text-muted: #cbd5e1;
  --ths-events-link: #60a5fa;
  --ths-events-link-hover: #93c5fd;
  --ths-events-chip-bg: linear-gradient(180deg, #263449 0%, #1e293b 100%);
  --ths-events-chip-text: #e2e8f0;
  --ths-events-shadow: 0 10px 30px rgba(0,0,0,0.35);
  --ths-events-shadow-hover: 0 16px 38px rgba(0,0,0,0.45);
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-wrap,
html.hm-dark .ths-event-submit-form {
  background: transparent !important;
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-form > div,
html.hm-dark .ths-event-submit-grid,
html.hm-dark .ths-event-submit-grid p {
  background: transparent !important;
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-form h3,
html.hm-dark .ths-event-submit-form p,
html.hm-dark .ths-event-submit-form label,
html.hm-dark .ths-event-submit-form strong,
html.hm-dark .ths-event-submit-form .description,
html.hm-dark .ths-event-submit-form span.description,
html.hm-dark .ths-event-submit-hint,
html.hm-dark .ths-event-submit-status {
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-form .description,
html.hm-dark .ths-event-submit-form span.description,
html.hm-dark .ths-event-submit-hint {
  color: var(--ths-events-text-muted) !important;
}

html.hm-dark .ths-event-submit-form input[type="text"],
html.hm-dark .ths-event-submit-form input[type="url"],
html.hm-dark .ths-event-submit-form input[type="datetime-local"],
html.hm-dark .ths-event-submit-form input[type="date"],
html.hm-dark .ths-event-submit-form input[type="number"],
html.hm-dark .ths-event-submit-form input[type="file"],
html.hm-dark .ths-event-submit-form select,
html.hm-dark .ths-event-submit-form textarea {
  background: var(--ths-events-surface) !important;
  border-color: var(--ths-events-border-strong) !important;
  color: var(--ths-events-text) !important;
  box-shadow: none !important;
}

html.hm-dark .ths-event-submit-form input[readonly],
html.hm-dark .ths-event-submit-form input:disabled,
html.hm-dark .ths-event-submit-form select:disabled,
html.hm-dark .ths-event-submit-form textarea:disabled {
  background: var(--ths-events-surface-soft) !important;
  color: var(--ths-events-text-muted) !important;
  opacity: 1 !important;
}

html.hm-dark .ths-event-submit-form input::placeholder,
html.hm-dark .ths-event-submit-form textarea::placeholder {
  color: var(--ths-events-text-muted) !important;
}

html.hm-dark .ths-event-submit-form select option {
  background: var(--ths-events-surface) !important;
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-repeat,
html.hm-dark .ths-event-submit-repeat-group,
html.hm-dark .ths-event-submit-captcha {
  background: var(--ths-events-surface-soft) !important;
  border: 1px solid var(--ths-events-border) !important;
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-category-list label {
  background: var(--ths-events-surface) !important;
  border: 1px solid var(--ths-events-border) !important;
  color: var(--ths-events-text) !important;
}

html.hm-dark .ths-event-submit-form input[type="checkbox"] {
  accent-color: var(--ths-events-link);
}

html.hm-dark .ths-event-submit-actions .button,
html.hm-dark .ths-event-submit-actions button,
html.hm-dark .ths-event-submit-form button[type="submit"] {
  background: var(--ths-events-link) !important;
  border-color: var(--ths-events-link) !important;
  color: #ffffff !important;
}

html.hm-dark .ths-event-submit-actions .button:hover,
html.hm-dark .ths-event-submit-actions button:hover,
html.hm-dark .ths-event-submit-form button[type="submit"]:hover {
  background: var(--ths-events-link-hover) !important;
  border-color: var(--ths-events-link-hover) !important;
  color: #ffffff !important;
}

html.hm-dark .ths-event-submit-notice--success {
  background: #052e1a !important;
  border-color: #15803d !important;
  color: #bbf7d0 !important;
}

html.hm-dark .ths-event-submit-notice--error {
  background: #450a0a !important;
  border-color: #b91c1c !important;
  color: #fecaca !important;
}


/* === THS Events 4.2.8: Fix für Section-Hintergrund im Darkmode === */
html.hm-dark #veranstaltungen,
body.hm-dark #veranstaltungen {
    background: #0f172a !important;
}


/* === THS Events 4.3.0: Kompakte Pagination mit Seitensprung === */
.ths-events-pagination--compact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.ths-events-pagination--compact .ths-events-page-link,
.ths-events-pagination--compact .ths-events-page-jump {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--ths-events-border-strong, #d1d5db);
  border-radius: 999px;
  background: var(--ths-events-surface, #fff);
  color: var(--ths-events-text, #111827);
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}

.ths-events-pagination--compact .ths-events-page-link:hover {
  background: var(--ths-events-surface-soft, #f8fafc);
  color: var(--ths-events-link, #0073aa);
  border-color: var(--ths-events-link, #0073aa);
}

.ths-events-pagination--compact .ths-events-page-link.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.ths-events-pagination--compact .ths-events-page-jump {
  width: auto;
  min-width: 140px;
  padding: 0 38px 0 16px;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
}

html.hm-dark .ths-events-pagination--compact .ths-events-page-link,
html.hm-dark .ths-events-pagination--compact .ths-events-page-jump {
  background: var(--ths-events-surface, #111827) !important;
  color: var(--ths-events-text, #f8fafc) !important;
  border-color: var(--ths-events-border-strong, #475569) !important;
}

html.hm-dark .ths-events-pagination--compact .ths-events-page-link:hover {
  background: var(--ths-events-surface-soft, #1f2937) !important;
  color: var(--ths-events-link-hover, #93c5fd) !important;
  border-color: var(--ths-events-link, #60a5fa) !important;
}

html.hm-dark .ths-events-pagination--compact .ths-events-page-jump option {
  background: var(--ths-events-surface, #111827);
  color: var(--ths-events-text, #f8fafc);
}


/* === THS Events 4.3.1: Pagination im Kachel-Look === */
.ths-events-pagination--compact {
  gap: 10px;
}

.ths-events-pagination--compact .ths-events-page-link,
.ths-events-pagination--compact .ths-events-page-jump {
  border-radius: 14px !important;
  background: var(--ths-events-surface, #ffffff) !important;
  border: 1px solid var(--ths-events-border, #e5e7eb) !important;
  color: var(--ths-events-text, #111827) !important;
  box-shadow: var(--ths-events-shadow, 0 10px 30px rgba(0,0,0,0.08));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ths-events-pagination--compact .ths-events-page-link {
  min-width: 46px;
  min-height: 46px;
  font-size: 1.05rem;
}

.ths-events-pagination--compact .ths-events-page-jump {
  min-height: 46px;
  min-width: 164px;
  padding: 0 42px 0 18px;
  font-size: 0.95rem;
}

.ths-events-pagination--compact .ths-events-page-link:hover,
.ths-events-pagination--compact .ths-events-page-jump:hover {
  transform: translateY(-2px);
  box-shadow: var(--ths-events-shadow-hover, 0 16px 38px rgba(0,0,0,0.12));
  border-color: var(--ths-events-link, #0073aa) !important;
  background: var(--ths-events-surface-soft, #f8fafc) !important;
  color: var(--ths-events-link, #0073aa) !important;
}

.ths-events-pagination--compact .ths-events-page-link.is-disabled {
  transform: none;
  box-shadow: none;
  opacity: 0.35;
}

html.hm-dark .ths-events-pagination--compact .ths-events-page-link,
html.hm-dark .ths-events-pagination--compact .ths-events-page-jump {
  background: var(--ths-events-surface, #111827) !important;
  border-color: var(--ths-events-border, #334155) !important;
  color: var(--ths-events-text, #f8fafc) !important;
  box-shadow: var(--ths-events-shadow, 0 10px 30px rgba(0,0,0,0.35));
}

html.hm-dark .ths-events-pagination--compact .ths-events-page-link:hover,
html.hm-dark .ths-events-pagination--compact .ths-events-page-jump:hover {
  background: var(--ths-events-surface-soft, #1f2937) !important;
  border-color: var(--ths-events-link, #60a5fa) !important;
  color: var(--ths-events-link-hover, #93c5fd) !important;
  box-shadow: var(--ths-events-shadow-hover, 0 16px 38px rgba(0,0,0,0.45));
}

@media (max-width: 520px) {
  .ths-events-pagination--compact {
    gap: 8px;
  }

  .ths-events-pagination--compact .ths-events-page-link {
    min-width: 42px;
    min-height: 42px;
  }

  .ths-events-pagination--compact .ths-events-page-jump {
    min-width: 138px;
    min-height: 42px;
    font-size: 0.88rem;
  }
}


/* === THS Events 4.3.2: Datepicker Hintergrund + Author Bio Fix === */

/* Datepicker Hintergrund */
.ths-date-range-popover {
  background: var(--ths-events-surface, #ffffff) !important;
  border: 1px solid var(--ths-events-border, #e5e7eb) !important;
  box-shadow: var(--ths-events-shadow, 0 10px 30px rgba(0,0,0,0.08));
}

html.hm-dark .ths-date-range-popover {
  background: var(--ths-events-surface, #111827) !important;
  border-color: var(--ths-events-border, #334155) !important;
  box-shadow: var(--ths-events-shadow, 0 10px 30px rgba(0,0,0,0.35));
}

/* Author Bio ausblenden */
.hm-author-bio {
  display: none !important;
}


/* === THS Events 4.3.7: Terminserie im Frontend einklappbar === */
.ths-event-submit-repeat-toggle {
  margin: 0;
}

.ths-event-submit-repeat-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.ths-event-submit-repeat-toggle .description {
  display: block;
  margin-top: 6px;
}

.ths-event-submit-repeat-details[hidden] {
  display: none !important;
}

.ths-event-submit-repeat-details {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}


/* === THS Events 4.3.10: Fallback-Vorschaubild === */
.ths-event-image--fallback img,
.ths-event-fallback-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ths-event-single-preview--fallback img {
  width: 100%;
  height: auto;
  display: block;
}


/* === THS Events 4.3.11: Datepicker Hover-/Preview-Markierung === */

/* Einzelner Hover-Tag */
.ths-date-range-day:hover,
.ths-date-range-day:focus {
  background: #e0f2fe !important;
  color: #0f172a !important;
  outline: 2px solid #38bdf8 !important;
  outline-offset: -2px;
}

/* Vorschau-Bereich, während ein Startdatum gewählt ist und die Maus über ein Enddatum fährt */
.ths-date-range-day.is-in-preview-range,
.ths-date-range-day.is-preview-start,
.ths-date-range-day.is-preview-end {
  background: #dbeafe !important;
  color: #0f172a !important;
}

/* Start-/Endpunkte der Vorschau stärker hervorheben */
.ths-date-range-day.is-preview-start,
.ths-date-range-day.is-preview-end {
  background: #60a5fa !important;
  color: #ffffff !important;
}

/* Gewählter Bereich bleibt dominant */
.ths-date-range-day.is-in-range {
  background: #bfdbfe !important;
  color: #0f172a !important;
}

.ths-date-range-day.is-range-start,
.ths-date-range-day.is-range-end,
.ths-date-range-day.is-selected {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* HybridMag Darkmode */
html.hm-dark .ths-date-range-day:hover,
html.hm-dark .ths-date-range-day:focus {
  background: #334155 !important;
  color: #f8fafc !important;
  outline: 2px solid #60a5fa !important;
  outline-offset: -2px;
}

html.hm-dark .ths-date-range-day.is-in-preview-range,
html.hm-dark .ths-date-range-day.is-preview-start,
html.hm-dark .ths-date-range-day.is-preview-end {
  background: #1e3a8a !important;
  color: #eff6ff !important;
}

html.hm-dark .ths-date-range-day.is-preview-start,
html.hm-dark .ths-date-range-day.is-preview-end {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

html.hm-dark .ths-date-range-day.is-in-range {
  background: #1d4ed8 !important;
  color: #eff6ff !important;
}

html.hm-dark .ths-date-range-day.is-range-start,
html.hm-dark .ths-date-range-day.is-range-end,
html.hm-dark .ths-date-range-day.is-selected {
  background: #60a5fa !important;
  color: #0f172a !important;
}


/* === THS Events 4.3.12: Datepicker-Rundungen an Kachel-Design angepasst === */
.ths-date-range-day {
  border-radius: 12px !important;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ths-date-range-day:hover,
.ths-date-range-day:focus {
  border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.ths-date-range-day.is-in-preview-range,
.ths-date-range-day.is-in-range {
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

/* Start/Ende stärker wie kleine Kacheln abrunden */
.ths-date-range-day.is-preview-start,
.ths-date-range-day.is-preview-end,
.ths-date-range-day.is-range-start,
.ths-date-range-day.is-range-end,
.ths-date-range-day.is-selected {
  border-radius: 14px !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22);
}

/* Wenn Start und Ende derselbe Tag sind */
.ths-date-range-day.is-range-start.is-range-end,
.ths-date-range-day.is-preview-start.is-preview-end {
  border-radius: 14px !important;
}

/* Darkmode Schatten dezenter */
html.hm-dark .ths-date-range-day:hover,
html.hm-dark .ths-date-range-day:focus {
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

html.hm-dark .ths-date-range-day.is-in-preview-range,
html.hm-dark .ths-date-range-day.is-in-range {
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

html.hm-dark .ths-date-range-day.is-preview-start,
html.hm-dark .ths-date-range-day.is-preview-end,
html.hm-dark .ths-date-range-day.is-range-start,
html.hm-dark .ths-date-range-day.is-range-end,
html.hm-dark .ths-date-range-day.is-selected {
  box-shadow: 0 8px 22px rgba(0,0,0,0.42);
}


/* === THS Events 4.3.13: Durchgehender Range + runde Enden === */

.ths-date-range-day {
  border-radius: 0 !important;
}

.ths-date-range-day:hover {
  border-radius: 12px !important;
}

.ths-date-range-day.is-in-range,
.ths-date-range-day.is-in-preview-range {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ths-date-range-day.is-range-start,
.ths-date-range-day.is-preview-start {
  border-radius: 12px 0 0 12px !important;
}

.ths-date-range-day.is-range-end,
.ths-date-range-day.is-preview-end {
  border-radius: 0 12px 12px 0 !important;
}

.ths-date-range-day.is-range-start.is-range-end,
.ths-date-range-day.is-preview-start.is-preview-end {
  border-radius: 12px !important;
}
