.spac_calendar {
  width: 100%;
  margin: 0 auto;
  font-family: sans-serif;	
  position: relative;
}

.spac_calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.spac_calendar-header button,
.spac_calendar-day-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: #0018ff;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.spac_calendar-header button:disabled,
.spac_calendar-header button[aria-disabled="true"] {
  background: #0018ff;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.3;
}

.spac_calendar-header button:disabled:hover,
.spac_calendar-header button:disabled:focus,
.spac_calendar-header button[aria-disabled="true"]:hover,
.spac_calendar-header button[aria-disabled="true"]:focus {
  background: #0018ff;
  color: #fff;
  text-decoration: none;
}

.spac_calendar-month {
  font-weight: bold;
  font-size: 18px;
}

.spac_calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #ccc;
  border: 2px solid black;
}

.spac_calendar-dayname {
  background-color: #000000 !important;
  color: white;
  text-align: center;
  padding: 8px 0;
  font-weight: bold;
}

.spac_calendar-cell {
  background: #fff;
  min-height: 80px;
  padding: 4px;
  position: relative;
}

.spac_calendar-today {
  box-shadow: inset 0 0 15px #1188114d;
}

.spac_calendar-date {
  font-size: 12px;
  text-align: right;
  color: #888;
}

/* Optional: Hover-Effekt */
.spac_calendar-cell:hover {
  background: #f9f9f9;
  cursor: pointer;
}

.spac_calendar-cell--outside-month {
  background: #f3f3f3;
}

.spac_calendar-cell--outside-month .spac_calendar-date {
  color: #aaa;
}

.spac_calendar-cell--disabled,
.spac_calendar-cell--disabled:hover {
  background: #ececec;
  cursor: not-allowed;
  opacity: 0.55;
}

.spac_calendar-cell[role="button"]:focus-visible {
  outline: 2px solid #0018ff;
  outline-offset: -2px;
}

/* Optional: Focus-Effekt */
.spac_calendar-cell--active {
  box-shadow: inset 0 0 15px #0016ff4d;
}

.spac_calendar-holiday-closed {
  box-shadow: inset 0 0 15px #ff0f0f4d;
  background-color: #f5f5f5;
}

.spac_calendar-holiday-early {
  box-shadow: inset 0 0 15px #ffff0a4d;
}

.spac_calendar-cell--active.spac_calendar-today {
  box-shadow: inset 0 0 15px #1188114d; /* oder grünlich bei today */
}

.spac_calendar-holiday-closed.spac_calendar-today,
.spac_calendar-holiday-closed.spac_calendar-cell--active {
  box-shadow: inset 0 0 15px #ff0f0f4d; /* oder gelblich bei early */
}

.spac_calendar-holiday-early.spac_calendar-today,
.spac_calendar-holiday-early.spac_calendar-cell--active {
  box-shadow: inset 0 0 15px #ffff0a4d; /* Vorrang: Holiday-Stil bleibt */
}

.spac_calendar-event {
  position: relative; /* ← wichtig für die Positionierung des "W" */
  padding: 2px 3px;
  margin-top: 3px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  white-space: nowrap; /* ← verhindert Umbruch beim Ticker */
  text-overflow: ellipsis; /* falls zu lang */
}

/* Value bands: offering amount for IPOs, latest known Trust amount for later
 * SPAC lifecycle events. The overlay keeps the chip dimensions stable while
 * allowing stronger horizontal edges than vertical ones. */
.spac_calendar-event.spac_calendar-value-bronze,
.spac_calendar-event.spac_calendar-value-silver,
.spac_calendar-event.spac_calendar-value-gold {
  --spac-calendar-value-dark: transparent;
  --spac-calendar-value-base: transparent;
  --spac-calendar-value-light: transparent;
  --spac-calendar-value-horizontal-size: 2px;
}

.spac_calendar-event.spac_calendar-value-bronze::before,
.spac_calendar-event.spac_calendar-value-silver::before,
.spac_calendar-event.spac_calendar-value-gold::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      var(--spac-calendar-value-dark) 0%,
      var(--spac-calendar-value-light) 24%,
      var(--spac-calendar-value-base) 52%,
      var(--spac-calendar-value-light) 76%,
      var(--spac-calendar-value-dark) 100%) top / 100% var(--spac-calendar-value-horizontal-size) no-repeat,
    linear-gradient(90deg,
      var(--spac-calendar-value-dark) 0%,
      var(--spac-calendar-value-light) 24%,
      var(--spac-calendar-value-base) 52%,
      var(--spac-calendar-value-light) 76%,
      var(--spac-calendar-value-dark) 100%) bottom / 100% var(--spac-calendar-value-horizontal-size) no-repeat,
    linear-gradient(180deg,
      var(--spac-calendar-value-dark),
      var(--spac-calendar-value-light) 45%,
      var(--spac-calendar-value-dark)) left / 2px 100% no-repeat,
    linear-gradient(180deg,
      var(--spac-calendar-value-dark),
      var(--spac-calendar-value-light) 45%,
      var(--spac-calendar-value-dark)) right / 2px 100% no-repeat;
  pointer-events: none;
}

.spac_calendar-event.spac_calendar-value-bronze {
  --spac-calendar-value-dark: #681f17;
  --spac-calendar-value-base: #b7432f;
  --spac-calendar-value-light: #e77b61;
}

.spac_calendar-event.spac_calendar-value-silver {
  --spac-calendar-value-dark: #596673;
  --spac-calendar-value-base: #9ca9b6;
  --spac-calendar-value-light: #eef3f7;
  --spac-calendar-value-horizontal-size: 3px;
}

.spac_calendar-event.spac_calendar-value-gold {
  --spac-calendar-value-dark: #9b7900;
  --spac-calendar-value-base: #ffd000;
  --spac-calendar-value-light: #fff36a;
}

.spac_calendar-grid .spac_calendar-event-dimmed::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.68);
  pointer-events: none;
}

.spac_calendar-watchmark-overlay {
  position: absolute;
  z-index: 3;
  top: 1px;
  bottom: 1px;
  right: 0px;	
  font-size: 12px;
  padding: 0 3px;
  background: #0016ff;
  color: #fff;
  border: 1px solid #0016ff;
  border-radius: 3px;
  pointer-events: none;
}

/*
.spac_calendar-watchmark {
    float: right;
    font-weight: bold;
    color: #0016ff;
    background-color: #fff;
    border: 1px solid #0016ff;
    padding: 0 4px;
    border-radius: 3px;
    margin-left: 5px;
}

.spac_calendar-ticker {
    flex-grow: 1;
}
*/

/* Hintergrundfarben nach Eventtyp */

.spac_calendar-event-ipo_spac_date {
  background-color: #666;
  color: white;
}

.spac_calendar-event-unit_split_date {
  background-color: #ddd;
  color: black;
}

.spac_calendar-event-loi_date {
  background-color: orange;
  color: black;
}

.spac_calendar-event-definitive_agreement_date {
  background-color: yellow;
  color: black;
}

.spac_calendar-event-merger_vote_date {
  background-color: green;
  color: white;
}

.spac_calendar-event-merger_date {
  background-color: blue;
  color: white;
}

.spac_calendar-event-redemption_date,
.spac_calendar-event-expiration_date {
  background-color: white;
  color: blue;
  border: 1px solid blue;
  border-radius: 3px;
}

.spac_calendar-event-spac_reverse_date,
.spac_calendar-event-delisting_date {
  background-color: red;
  color: white;
}

.spac_calendar-event-merger_canceled_date {
  background-color: white;
  color: red;
  border: 1px solid red;
  border-radius: 3px;
}

.spac_calendar-event-ipo_date {
  background-color: black;
  color: white;
}

.spac_calendar-watchmark-legend {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background-color: #0016ff;
    border: 1px solid #0016ff;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1.3;
    margin-right: 4px;
}

/* Absetzen: Samstag & Sonntag anderer hintergrund */
.spac_calendar-dayname:nth-child(6),
.spac_calendar-dayname:nth-child(7),
.spac_calendar-cell:nth-child(7n),
.spac_calendar-cell:nth-child(7n-1) {
  background-color: #f9f9f9;
}

/* Responsive: Samstag & Sonntag schmaler unter 800px */
@media (max-width: 780px) {
  .spac_calendar-grid {
    grid-template-columns: repeat(5, 1.2fr) repeat(2, 0.5fr);
  }
}

/* SPAC Calendar Legend */
.spac_calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: center; /* ← zentriert die Items */
  align-items: center;      /* ← vertikal mittig (optional) */
  margin-top: 20px;
  font-size: 13px;
  text-align: center;
  padding: 20px 0px;
}

.spac_calendar-legend div {
  display: flex;
  align-items: center;
}

.spac_calendar-legend .spac_calendar-filter-item label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.spac_calendar-legend .spac_calendar-filter-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0018ff;
  cursor: pointer;
}

.spac_calendar-legend .spac_calendar-filter-actions {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.spac_calendar-legend .spac_calendar-filter-actions [data-spac-calendar-filter-reset] {
  border: 1px solid #0016ff !important;
  border-radius: 0 !important;
  padding: 2px 7px;
  background: #0016ff !important;
  color: #ffffff !important;
  font-size: 12px;
  cursor: pointer;
}

.spac_calendar-legend .spac_calendar-filter-actions [data-spac-calendar-filter-reset]:hover,
.spac_calendar-legend .spac_calendar-filter-actions [data-spac-calendar-filter-reset]:focus-visible {
  border-color: #000bb8 !important;
  background: #000bb8 !important;
  color: #ffffff !important;
}

.spac-calendar-filter-info {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
}

.spac-calendar-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 13px;
  height: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0016ff !important;
  color: #fff !important;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 13px;
  cursor: pointer;
  user-select: none;
}

.spac-calendar-filter-trigger:hover,
.spac-calendar-filter-trigger:focus-visible {
  background: #000bb8 !important;
  outline: 1px solid #98a3ff;
  outline-offset: 1px;
}

.spac-calendar-filter-popover {
  position: fixed;
  inset: auto;
  z-index: 2147483647;
  box-sizing: border-box;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  color: #111;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
}

.spac-calendar-filter-popover::backdrop {
  background: transparent;
}

@media (max-width: 480px) {
  .spac-calendar-filter-popover {
    max-width: min(280px, calc(100vw - 24px));
  }
}

.spac_calendar-legend .spac_calendar-event {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.spac_calendar-legend .spac_calendar-value-legend {
  background: #fff;
  color: #000;
  padding-inline: 8px;
}

/* SPAC Calendar Loader */
.spac_calendar {
  position: relative;
}

.spac_calendar-loader {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spac_spinner_svg {
  width: 48px;
  height: 48px;
  animation: spac_rotate 1s linear infinite;
}

.spac_spinner_svg_inner {
  width: 100%;
  height: 100%;
  transform-origin: center;
}

@keyframes spac_rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Kalender Day Details */
:root :where(.is-layout-flow)>* {
    margin-block-start: 0px;
}

.spac_calendar-details-inner {
  padding: 5px;
  background: #fdfdfd;
  position: relative;
  z-index: 1;
}

.spac_calendar-details-date {
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  margin: 0;
}

.spac_calendar-details-date-nav {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.spac_calendar-day-nav:disabled,
.spac_calendar-day-nav[aria-disabled="true"] {
  background: #0018ff;
  color: #fff;
  opacity: 0.3;
  cursor: not-allowed;
}

.spac_calendar-details-view-switcher {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 8px 4px;
}

.spac_calendar-details-view-switcher .spacstar_list_details_view_switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.spac_calendar-details-view-switcher .spacstar_list_details_view_switcher_label {
  grid-column: 1;
  justify-self: start;
  width: 100%;
  margin: 0 0 0.35rem;
  white-space: nowrap;
}

.spac_calendar-details-view-switcher .spacstar_list_details_view_switcher_buttons {
  display: flex;
  grid-column: 1;
  width: 100%;
}

.spac_calendar-details-view-switcher .spacstar_list_details_view_switcher_button {
  flex: 1 1 0;
}

.spac_calendar-detail-entry {
  height: 100%;
  padding: 10px 0px;
	border-bottom: 0;
	
}
.spac_calendar-detail-entry:first-of-type {
  border-top: none;	
  padding-top: 0px !important;
}

.spac_calendar-details .spac_calendar-detail-entry > .info_divider_div {
  display: block !important;
  clear: both;
  width: 100%;
  height: 10px;
}

.spac_calendar-details .spac_calendar-detail-entry > .info_divider_div > .info_divider_2_div {
  display: block;
  width: 100%;
  height: 1px;
  background-color: #ccc;
}

.spac_calendar-details {
  position: relative;
  min-height: 120px;
}

/* Use the bordered, independently scrolling desktop panel only while the
 * calendar and Daily Events are displayed next to each other. */
@media (min-width: 1041px) {
  .spac_calendar-details {
  	  border: 2px solid #000;
	  height: 780px;
	  overflow-y: scroll;
	}
}

.spac_calendar-details-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.spac_calendar-details::after,
.spac_calendar-details-inner::after,
.search_center_table_div::after {
  content: "";
  display: table;
  clear: both;
}

.spac_calendar-details .search_center_table_div {
	width: 100% !important;
}

/* The unlocked day entries reuse the Events renderer. Keep its two-column
 * structure inside the narrower, scrollable calendar details panel. */
.spac_calendar-details .center_table_div.spacstar_list_details_view_events {
  width: 100% !important;
  box-sizing: border-box;
}

.spac_calendar-details .spacstar_list_details_view_events .image_div {
  box-sizing: border-box;
}

.spac_calendar-details .spacstar_list_details_view_summary_meta {
  display: flow-root;
}

/* Presentation label/date and News label/date are intentional float pairs in
 * the shared Events renderer. Clear only the start of each pair inside the
 * narrow calendar panel, without changing WPCode 2766's desktop layout. */
.spac_calendar-details .spacstar_list_details_view_summary_meta > div:nth-child(odd) {
  clear: both;
}

.spac_calendar-details .spacstar_list_details_view_summary_meta > div:nth-child(even) {
  white-space: nowrap;
}

.spac_calendar-details .spacstar-calendar-market-data {
  display: flow-root;
  clear: both;
  width: 100%;
  margin-top: .35rem;
  font-size: 12px;
}
.spac_calendar-details .spacstar-calendar-market-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: .75rem;
  align-items: start;
}
.spac_calendar-details .spacstar-calendar-market-row > :first-child { text-align: left; }
.spac_calendar-details .spacstar-calendar-market-row > :last-child { text-align: right; }
.spac_calendar-details .spacstar-calendar-market-value small {
  display: block;
  margin-top: .1rem;
  font-size: .9em;
  font-weight: 400;
}
.spac_calendar-details .spacstar-calendar-unit-row { margin-top: .2rem; }
body[data-spacstar-list-details-view="minimal"] .spac_calendar-details .spacstar-calendar-market-data {
  display: none !important;
}

/* Keep consent actions readable in the narrow day-events panel. */
.spac_calendar-details .spacstar-borlabs-dynamic-details,
.spac_calendar-details .spacstar-inline-consent__details {
  min-width: 128px;
  box-sizing: border-box;
  padding-inline: 24px !important;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* The direct SEC source link is rendered separately. Never show the legacy
 * presentation-image overlay as a second link in calendar day details. */
.spac_calendar-details
.spacstar_list_details_view_presentation_media .image_overlay_div {
  display: none !important;
}

/* Presentation preview/consent is a Full-view detail. Compact and Minimal
 * retain presentation metadata and source links, but not the SEC service ask. */
body[data-spacstar-list-details-view="compact"]
.spac_calendar-details .spacstar-event-presentation-consent,
body[data-spacstar-list-details-view="minimal"]
.spac_calendar-details .spacstar-event-presentation-consent {
  display: none !important;
}

body[data-spacstar-list-details-view="compact"]
.spac_calendar-details .spacstar_list_details_view_presentation_media > a,
body[data-spacstar-list-details-view="minimal"]
.spac_calendar-details .spacstar_list_details_view_presentation_media > a {
  display: none !important;
}

@media (min-width: 1041px) {
  .spac_calendar-details .spacstar_list_details_view_events > .info_div,
  .spac_calendar-details .spacstar_list_details_view_events > .image_div {
    width: 100% !important;
    float: none !important;
  }
}

/* In the stacked tablet layout, retain the centred event presentation without
 * bringing back the desktop border, fixed height or inner scroll area. */
@media (min-width: 780px) and (max-width: 1040px) {
  .spac_calendar-details .spacstar_list_details_view_events > .info_div,
  .spac_calendar-details .spacstar_list_details_view_events > .image_div {
    width: 100% !important;
    float: none !important;
  }
}

/* Tradingview Chart Overwrite */
@media only screen and (min-width: 1650px) {
	.my-tv-widget-mini-chart-50 {
		width: 50% !important;
	}
}

@media only screen and (min-width: 780px) and (max-width: 1649px) {
	.my-tv-widget-mini-chart-50 {
		width: 100% !important;
	}
}

@media only screen and (min-width: 630px) and (max-width: 779px) {
	.my-tv-widget-mini-chart-50 {
		width: 50% !important;
	}
}

.spac_calendar-holiday-note {
  background: #f9f9f9;
  border: 1px solid #ffdddd;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  text-align: center;
  font-size: 14px;
}

/* The page uses a 2/3 + 1/3 Gutenberg Columns block. On laptop and tablet
 * widths the Daily Events third becomes too narrow for its controls and event
 * metadata, so switch this one calendar-specific Columns block to the same
 * stacked layout used on mobile. */
@media (max-width: 1040px) {
  .wp-block-columns:has(#spac_calendar_details_wrapper) {
    flex-wrap: wrap !important;
  }

  .wp-block-columns:has(#spac_calendar_details_wrapper) > .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
    min-width: 0;
  }

}
