/* Event Calendar Design v2.1.7
   Scoped to [event_calendar_design] and Elementor widget only.
*/

.ecd-only-wrap,
.ecd-only-wrap * {
  box-sizing: border-box !important;
}

.ecd-only-wrap {
  --ecd-primary: #C93644;
  --ecd-navy: #12365E;
  --ecd-border: #F1C7CC;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 270px !important;
  gap: 22px !important;
  width: 100% !important;
  max-width: 100% !important;
  color: var(--ecd-navy) !important;
  font-family: inherit !important;
  clear: both !important;
}

.ecd-only-full {
  grid-template-columns: 1fr !important;
}

.ecd-only-calendar-card,
.ecd-only-side-card {
  background: #ffffff !important;
  border: 1px solid var(--ecd-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(18, 54, 94, 0.06) !important;
}

.ecd-only-calendar-card {
  padding: 24px !important;
  overflow: hidden !important;
}

.ecd-only-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 24px !important;
}

.ecd-only-title {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.ecd-only-title-icon {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  border-radius: 50% !important;
  background: var(--ecd-primary) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 23px !important;
  line-height: 1 !important;
  box-shadow: 0 8px 16px rgba(201, 54, 68, 0.22) !important;
}

.ecd-only-title h2 {
  margin: 0 0 5px 0 !important;
  padding: 0 !important;
  color: var(--ecd-navy) !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  border: 0 !important;
}

.ecd-only-title h2 span {
  color: var(--ecd-navy) !important;
  font-size: 25px !important;
  margin-left: 8px !important;
  font-weight: 800 !important;
}

.ecd-only-title p {
  margin: 0 !important;
  padding: 0 !important;
  color: #6B7280 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.ecd-only-toolbar {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 20px 0 !important;
}

.ecd-only-nav {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.ecd-only-nav a {
  min-width: 40px !important;
  height: 38px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  color: var(--ecd-navy) !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.ecd-only-month {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 10px 24px !important;
  background: linear-gradient(135deg, var(--ecd-primary) 0%, #E64A2E 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 16px rgba(201, 54, 68, 0.18) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.ecd-only-tabs {
  justify-self: end !important;
  display: flex !important;
  align-items: stretch !important;
}

.ecd-only-tabs span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 10px 14px !important;
  border: 1px solid #E5E7EB !important;
  border-left: 0 !important;
  background: #ffffff !important;
  color: var(--ecd-navy) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.ecd-only-tabs span:first-child {
  border-left: 1px solid var(--ecd-primary) !important;
  border-radius: 8px 0 0 8px !important;
  background: var(--ecd-primary) !important;
  border-color: var(--ecd-primary) !important;
  color: #ffffff !important;
}

.ecd-only-tabs span:last-child {
  border-radius: 0 8px 8px 0 !important;
}

.ecd-only-table {
  width: 100% !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.ecd-only-weekdays,
.ecd-only-days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.ecd-only-weekdays div {
  display: block !important;
  background: linear-gradient(180deg, var(--ecd-navy) 0%, #0D2B4D 100%) !important;
  color: #ffffff !important;
  text-align: center !important;
  padding: 13px 6px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  border-right: 1px solid rgba(255,255,255,0.14) !important;
}

.ecd-only-weekdays div:last-child {
  border-right: 0 !important;
}

.ecd-only-day {
  position: relative !important;
  display: block !important;
  min-height: 105px !important;
  padding: 9px !important;
  background: #ffffff !important;
  border-right: 1px solid #E5E7EB !important;
  border-bottom: 1px solid #E5E7EB !important;
  overflow: hidden !important;
}

.ecd-only-day:nth-child(7n) {
  border-right: 0 !important;
}

.ecd-only-empty {
  background: #FAFAFA !important;
}

.ecd-only-daynum {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  color: var(--ecd-navy) !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.ecd-only-today {
  background: linear-gradient(180deg, #FFF5F5 0%, #FFFFFF 100%) !important;
}

.ecd-only-today .ecd-only-daynum {
  display: inline-flex !important;
  width: 26px !important;
  height: 26px !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--ecd-primary) !important;
  color: #ffffff !important;
  border-radius: 50% !important;
}

.ecd-only-event {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 0 0 !important;
  padding: 7px 8px !important;
  border-radius: 7px !important;
  text-decoration: none !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  border: 1px solid currentColor !important;
  overflow: hidden !important;
}

.ecd-only-event b,
.ecd-only-event small {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

.ecd-only-event small {
  margin-top: 2px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

.ecd-event-red { color: #C93644 !important; background: #FFF1F2 !important; }
.ecd-event-blue { color: #1F5FA8 !important; background: #EFF6FF !important; }
.ecd-event-green { color: #43A047 !important; background: #F0FDF4 !important; }
.ecd-event-purple { color: #654FBE !important; background: #F6F4FF !important; }

.ecd-only-more {
  display: block !important;
  margin-top: 4px !important;
  color: #6B7280 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.ecd-only-sidebar {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

.ecd-only-side-card {
  padding: 20px !important;
  background: #FFFAFA !important;
}

.ecd-only-side-title {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  margin: 0 0 15px 0 !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 2px solid var(--ecd-border) !important;
}

.ecd-only-side-title span {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  color: var(--ecd-primary) !important;
  background: #FFF0F1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

.ecd-only-side-title h3 {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ecd-primary) !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.ecd-only-side-title p {
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  color: var(--ecd-primary) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}

.ecd-only-upcoming {
  display: grid !important;
  grid-template-columns: 54px 1fr !important;
  gap: 12px !important;
  padding: 13px 0 !important;
  border-bottom: 1px solid #EFDEDF !important;
  text-decoration: none !important;
  color: var(--ecd-navy) !important;
}

.ecd-only-upcoming:last-of-type {
  border-bottom: 0 !important;
}

.ecd-only-upcoming span {
  width: 54px !important;
  height: 54px !important;
  display: block !important;
  border: 1px solid var(--ecd-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  text-align: center !important;
  padding: 6px 4px !important;
  color: var(--ecd-primary) !important;
}

.ecd-only-upcoming span b {
  display: block !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: var(--ecd-primary) !important;
}

.ecd-only-upcoming span em {
  display: block !important;
  margin-top: 3px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--ecd-primary) !important;
}

.ecd-only-upcoming strong {
  display: block !important;
  color: var(--ecd-navy) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

.ecd-only-upcoming small {
  display: block !important;
  color: #6B7280 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  margin-top: 5px !important;
  font-weight: 500 !important;
}

.ecd-only-viewall {
  display: block !important;
  margin-top: 14px !important;
  padding: 11px 14px !important;
  border-radius: 999px !important;
  text-align: center !important;
  background: var(--ecd-primary) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.ecd-only-legend {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ecd-only-legend li {
  display: flex !important;
  gap: 9px !important;
  align-items: flex-start !important;
  color: var(--ecd-navy) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}

.ecd-only-legend span {
  display: inline-block !important;
}

.ecd-only-legend em {
  color: #6B7280 !important;
  font-style: normal !important;
  margin-left: 4px !important;
}

.ecd-only-legend i {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  border-radius: 50% !important;
  margin-top: 3px !important;
  display: inline-block !important;
}

.ecd-dot-red { background: #C93644 !important; }
.ecd-dot-blue { background: #1F5FA8 !important; }
.ecd-dot-green { background: #43A047 !important; }
.ecd-dot-purple { background: #654FBE !important; }

.ecd-only-noevent {
  color: #6B7280 !important;
  margin: 0 !important;
  font-size: 13px !important;
}

@media (max-width: 1024px) {
  .ecd-only-wrap {
    grid-template-columns: 1fr !important;
  }

  .ecd-only-sidebar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  .ecd-only-calendar-card {
    padding: 18px !important;
  }

  .ecd-only-title {
    align-items: flex-start !important;
  }

  .ecd-only-title-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
  }

  .ecd-only-title h2 {
    font-size: 23px !important;
  }

  .ecd-only-title h2 span {
    display: block !important;
    margin-left: 0 !important;
    font-size: 18px !important;
  }

  .ecd-only-toolbar {
    grid-template-columns: 1fr !important;
  }

  .ecd-only-tabs {
    justify-self: start !important;
  }

  .ecd-only-table {
    overflow-x: auto !important;
  }

  .ecd-only-weekdays,
  .ecd-only-days {
    min-width: 720px !important;
  }

  .ecd-only-day {
    min-height: 95px !important;
  }

  .ecd-only-sidebar {
    grid-template-columns: 1fr !important;
  }
}


/* v1.1.1 - Scrollable Event Categories when there are many categories */
.ecd-only-side-card .ecd-only-legend {
  max-height: 260px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 6px !important;
}

/* Custom scrollbar for category legend */
.ecd-only-side-card .ecd-only-legend::-webkit-scrollbar {
  width: 6px !important;
}

.ecd-only-side-card .ecd-only-legend::-webkit-scrollbar-track {
  background: #FFF0F1 !important;
  border-radius: 999px !important;
}

.ecd-only-side-card .ecd-only-legend::-webkit-scrollbar-thumb {
  background: var(--ecd-primary) !important;
  border-radius: 999px !important;
}

.ecd-only-side-card .ecd-only-legend::-webkit-scrollbar-thumb:hover {
  background: #B72D39 !important;
}

/* Firefox scrollbar */
.ecd-only-side-card .ecd-only-legend {
  scrollbar-width: thin !important;
  scrollbar-color: var(--ecd-primary) #FFF0F1 !important;
}


/* v1.1.4 - Event hover tooltip with limited text and featured image */
.ecd-only-calendar-card,
.ecd-only-table,
.ecd-only-days,
.ecd-only-day {
  overflow: visible !important;
}

.ecd-only-event {
  position: relative !important;
  z-index: 5 !important;
}

.ecd-only-event:hover,
.ecd-only-event:focus {
  z-index: 999 !important;
}

.ecd-only-tooltip {
  display: none !important;
  position: absolute !important;
  left: 50% !important;
  bottom: calc(100% + 12px) !important;
  transform: translateX(-50%) !important;
  width: 285px !important;
  max-width: 285px !important;
  background: #ffffff !important;
  border: 1px solid #D8DEE8 !important;
  border-radius: 2px !important;
  padding: 16px !important;
  color: #12365E !important;
  box-shadow: 0 12px 28px rgba(18, 54, 94, 0.18) !important;
  text-align: left !important;
  white-space: normal !important;
  pointer-events: none !important;
}

.ecd-only-tooltip::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: -9px !important;
  transform: translateX(-50%) rotate(45deg) !important;
  width: 16px !important;
  height: 16px !important;
  background: #ffffff !important;
  border-right: 1px solid #D8DEE8 !important;
  border-bottom: 1px solid #D8DEE8 !important;
}

.ecd-only-event:hover .ecd-only-tooltip,
.ecd-only-event:focus .ecd-only-tooltip {
  display: block !important;
}

.ecd-only-tooltip-title {
  display: block !important;
  margin: 0 0 12px 0 !important;
  color: #C93644 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

.ecd-only-tooltip-date {
  display: block !important;
  margin: 0 0 12px 0 !important;
  color: #4B5563 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

.ecd-only-tooltip-image {
  display: block !important;
  width: 100% !important;
  height: 108px !important;
  margin: 0 0 12px 0 !important;
  border-radius: 2px !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.ecd-only-tooltip-text {
  display: block !important;
  color: #4B5563 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}

/* Prevent tooltip from becoming too large on small screens */
@media (max-width: 768px) {
  .ecd-only-tooltip {
    width: 240px !important;
    max-width: 240px !important;
    padding: 13px !important;
  }

  .ecd-only-tooltip-image {
    height: 90px !important;
  }

  .ecd-only-tooltip-title {
    font-size: 14px !important;
  }
}


/* v1.1.5 - Tooltip visibility fix
   Previous event badge had overflow hidden, so tooltip was clipped inside the event box.
*/
.ecd-only-event {
  overflow: visible !important;
}

.ecd-only-day,
.ecd-only-days,
.ecd-only-table,
.ecd-only-calendar-card,
.ecd-only-wrap {
  overflow: visible !important;
}

.ecd-only-day {
  z-index: 1 !important;
}

.ecd-only-day:hover {
  z-index: 9999 !important;
}

.ecd-only-event:hover,
.ecd-only-event:focus,
.ecd-only-event:focus-within {
  overflow: visible !important;
  z-index: 10000 !important;
}

.ecd-only-event:hover .ecd-only-tooltip,
.ecd-only-event:focus .ecd-only-tooltip,
.ecd-only-event:focus-within .ecd-only-tooltip {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* v1.1.6 - Position controls for Calendar / Upcoming Events / Event Categories */
.ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-right {
  grid-template-columns: minmax(0, var(--ecd-calendar-width, 74fr)) minmax(220px, var(--ecd-sidebar-width, 26fr)) !important;
}

.ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-left {
  grid-template-columns: minmax(220px, var(--ecd-sidebar-width, 26fr)) minmax(0, var(--ecd-calendar-width, 74fr)) !important;
}

.ecd-only-wrap.ecd-layout-left .ecd-only-calendar-card {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.ecd-only-wrap.ecd-layout-left .ecd-only-sidebar {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.ecd-only-wrap.ecd-layout-bottom {
  grid-template-columns: 1fr !important;
}

.ecd-only-wrap.ecd-layout-bottom .ecd-only-calendar-card,
.ecd-only-wrap.ecd-layout-bottom .ecd-only-sidebar {
  grid-column: 1 !important;
}

.ecd-only-wrap.ecd-layout-bottom .ecd-only-sidebar {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: start !important;
}

.ecd-only-wrap.ecd-order-categories_first .ecd-only-categories-card {
  order: 1 !important;
}

.ecd-only-wrap.ecd-order-categories_first .ecd-only-upcoming-card {
  order: 2 !important;
}

.ecd-only-wrap.ecd-order-upcoming_first .ecd-only-upcoming-card {
  order: 1 !important;
}

.ecd-only-wrap.ecd-order-upcoming_first .ecd-only-categories-card {
  order: 2 !important;
}

@media (max-width: 1024px) {
  .ecd-only-wrap.ecd-layout-left .ecd-only-calendar-card,
  .ecd-only-wrap.ecd-layout-left .ecd-only-sidebar {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media (max-width: 768px) {
  .ecd-only-wrap.ecd-layout-bottom .ecd-only-sidebar {
    grid-template-columns: 1fr !important;
  }
}


/* v1.1.8 - Reorderable/addable sidebar boxes */
.ecd-only-custom-content {
  color: var(--ecd-navy) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.ecd-only-custom-content p {
  margin: 0 0 10px 0 !important;
}

.ecd-only-custom-content a {
  color: var(--ecd-primary) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.ecd-only-sidebar .ecd-only-side-card {
  width: 100% !important;
}


/* v1.2.8 - Optional Month / Week / List buttons */
.ecd-only-tabs-spacer {
  display: block !important;
}


/* v1.3.3 - Safe frontend category selector for Upcoming Box */
.ecd-upcoming-selector {
  display: block !important;
  margin: 0 0 14px 0 !important;
  padding: 0 0 14px 0 !important;
  border-bottom: 1px solid #EFDEDF !important;
}

.ecd-upcoming-selector label {
  display: block !important;
  margin: 0 0 7px 0 !important;
  color: var(--ecd-navy) !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
}

.ecd-upcoming-selector select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 38px !important;
  padding: 7px 10px !important;
  border: 1px solid var(--ecd-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--ecd-navy) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  outline: none !important;
}


/* v1.3.5 - Backend configurable dropdown categories */
.ecd-dropdown-category select,
.ecd-dropdown-category input[type="text"] {
  width: 100% !important;
}


/* v1.3.6 admin token category picker */
.ecd-token-picker {
  position: relative;
}

.ecd-token-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.ecd-token-values {
  flex: 1 1 auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

.ecd-token-placeholder {
  color: #666;
  font-size: 13px;
}

.ecd-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2c3338;
  color: #fff;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.6;
}

.ecd-token-remove {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.ecd-token-add.button {
  min-width: 34px;
  padding: 0 10px;
  height: 40px;
  line-height: 38px;
  font-size: 18px;
}

.ecd-token-menu {
  position: absolute;
  z-index: 9999;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  max-height: 220px;
  overflow: auto;
  padding: 6px;
}

.ecd-token-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: #1d2327;
}

.ecd-token-option:hover,
.ecd-token-option.is-active {
  background: #f0f6fc;
  color: #135e96;
}


/* v1.3.8 - Event Box category uses backend token/chip picker */
.ecd-box .ecd-token-picker {
  max-width: 100% !important;
}

.ecd-box .ecd-token-values {
  min-height: 40px !important;
}

/* v1.4.0 - Safe multi category token selection */
.ecd-token-option.is-selected {
  background: #e7f5ee !important;
  color: #047857 !important;
  font-weight: 700 !important;
}
.ecd-token-option.is-selected::after {
  content: " ✓";
  float: right;
}
.ecd-token-chip[data-value] {
  margin: 2px !important;
}

/* =========================================================
   v1.9.0 CLEAN RESPONSIVE REBUILD
   Important: the old JavaScript height equalizer was removed in PHP.
   These rules now control the layout without JS changing card heights.
========================================================= */

/* Admin selector chips - kept from newer versions */
.ecd-box .ecd-token-picker {
  max-width: 100% !important;
}
.ecd-box .ecd-token-values {
  min-height: 40px !important;
}
.ecd-box .ecd-token-chip[data-value] {
  margin: 2px !important;
}

/* Global layout safety */
html body .ecd-only-wrap,
html body .ecd-only-wrap * {
  box-sizing: border-box !important;
}

html body .ecd-only-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

html body .ecd-only-calendar-card,
html body .ecd-only-sidebar,
html body .ecd-only-sidebar > .ecd-only-side-card {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Calendar shrinks, no horizontal scrollbar */
html body .ecd-only-calendar-card {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

html body .ecd-only-table {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

html body .ecd-only-weekdays,
html body .ecd-only-days {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

/* Sidebar cards structure */
html body .ecd-only-upcoming-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body .ecd-only-upcoming-card .ecd-only-side-title,
html body .ecd-only-upcoming-card .ecd-upcoming-selector,
html body .ecd-only-upcoming-card .ecd-only-viewall {
  flex: 0 0 auto !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-bottom: 12px !important;
  padding-right: 8px !important;
}

html body .ecd-only-upcoming-card .ecd-only-viewall {
  position: static !important;
  display: block !important;
  width: 100% !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Compact Event Categories */
html body .ecd-only-categories-card {
  overflow: hidden !important;
}

html body .ecd-only-categories-card .ecd-only-legend {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px !important;
}

html body .ecd-only-categories-card .ecd-only-legend li {
  margin-bottom: 8px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

/* 1101px+ = desktop style: calendar left, sidebar right */
@media screen and (min-width: 1101px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 36px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 300px !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 365px !important;
    min-height: 365px !important;
    max-height: 365px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 150px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    padding: 14px !important;
  }

  html body .ecd-only-categories-card .ecd-only-legend {
    max-height: 78px !important;
  }
}

/* 768px-1100px = danger zone: sidebar below calendar, Event+News 2 columns */
@media screen and (min-width: 768px) and (max-width: 1100px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 32px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: start !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 340px !important;
    min-height: 340px !important;
    max-height: 340px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 128px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    grid-column: 1 / -1 !important;
    height: 188px !important;
    min-height: 188px !important;
    max-height: 188px !important;
    padding: 14px !important;
  }

  html body .ecd-only-categories-card .ecd-only-legend {
    max-height: 78px !important;
  }
}

/* Mobile: one column */
@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 28px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  html body .ecd-only-calendar-card {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  html body .ecd-only-weekdays div {
    padding: 8px 2px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  html body .ecd-only-day {
    min-height: 64px !important;
    padding: 5px 4px !important;
  }

  html body .ecd-only-daynum {
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }

  html body .ecd-only-event {
    padding: 4px 4px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }

  html body .ecd-only-event small {
    display: none !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 345px !important;
    min-height: 345px !important;
    max-height: 345px !important;
    padding-bottom: 16px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 128px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 185px !important;
    min-height: 185px !important;
    max-height: 185px !important;
  }

  html body .ecd-only-categories-card .ecd-only-legend {
    max-height: 78px !important;
  }
}


/* =========================================================
   v1.9.1 - Sidebar polish after removing JS equalizer
   Fix: side cards looked too short/tight after JS was removed.
========================================================= */

/* Desktop/right-sidebar sizes */
@media screen and (min-width: 1101px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 20px !important;
    align-items: start !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    width: 300px !important;
    max-width: 300px !important;
    gap: 16px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 382px !important;
    min-height: 382px !important;
    max-height: 382px !important;
    padding: 16px !important;
    padding-bottom: 18px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-side-title {
    margin-bottom: 12px !important;
    padding-bottom: 11px !important;
  }

  html body .ecd-only-upcoming-card .ecd-upcoming-selector {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 164px !important;
    margin-bottom: 14px !important;
    padding-right: 10px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-viewall {
    min-height: 34px !important;
    padding: 10px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 205px !important;
    min-height: 205px !important;
    max-height: 205px !important;
    padding: 16px !important;
  }

  html body .ecd-only-categories-card .ecd-only-legend {
    max-height: 92px !important;
  }
}

/* 768-1100: below calendar, 2 columns, not cramped */
@media screen and (min-width: 768px) and (max-width: 1100px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 144px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
  }

  html body .ecd-only-categories-card .ecd-only-legend {
    max-height: 88px !important;
  }
}

/* Mobile: keep button visible but not cut */
@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 352px !important;
    min-height: 352px !important;
    max-height: 352px !important;
  }

  html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 134px !important;
  }
}


/* =========================================================
   v1.9.3 - Remove sidebar internal scroll
   Revert the v1.9.2 idea. Sidebar must not have its own scrollbar.
========================================================= */

@media screen and (min-width: 1101px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar::-webkit-scrollbar {
    display: none !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar {
    margin-bottom: 42px !important;
  }
}

/* Keep the safe responsive rule: around 1025px, do not force the right column. */
@media screen and (min-width: 768px) and (max-width: 1100px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    margin-bottom: 32px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    max-height: none !important;
    padding-right: 0 !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    grid-column: 1 / -1 !important;
  }
}


/* =========================================================
   v1.9.4 - Tablet/Mobile always below calendar
   Requested behavior:
   - Desktop: sidebar on right
   - Tablet: sidebar below calendar, 2 columns
   - Mobile: sidebar below calendar, 1 column
========================================================= */

/* Desktop only */
@media screen and (min-width: 1025px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 20px !important;
    align-items: start !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 300px !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: visible !important;
  }
}

/* Tablet: below calendar, 2 columns */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar:not(.ecd-layout-bottom),
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-right,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-left,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 28px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-side-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 330px !important;
    min-height: 330px !important;
    max-height: 330px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 118px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-viewall {
    position: static !important;
    width: 100% !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    transform: none !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    grid-column: 1 / -1 !important;
    height: 185px !important;
    min-height: 185px !important;
    max-height: 185px !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-categories-card .ecd-only-legend {
    max-height: 74px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Mobile: below calendar, 1 column */
@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar:not(.ecd-layout-bottom),
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-right,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-left,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    align-items: start !important;
    margin-bottom: 24px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 338px !important;
    min-height: 338px !important;
    max-height: 338px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 124px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 182px !important;
    min-height: 182px !important;
    max-height: 182px !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-categories-card .ecd-only-legend {
    max-height: 72px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}


/* v1.9.5 - Weekday header English only / compact */
.ecd-only-weekdays div {
  white-space: nowrap !important;
}


/* =========================================================
   v1.9.6 - Beautiful red custom scrollbar
   Apply to Event/News lists and Event Categories list.
========================================================= */

/* Firefox */
html body .ecd-only-upcoming-card .ecd-only-upcoming-list,
html body .ecd-only-categories-card .ecd-only-legend {
  scrollbar-width: thin !important;
  scrollbar-color: #d63a49 #fdecef !important;
}

/* WebKit */
html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar {
  width: 12px !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-track,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-track {
  background: #fdecef !important;
  border-radius: 999px !important;
  border: 1px solid #f6cfd5 !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-thumb,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f04f61 0%, #d63a49 100%) !important;
  border-radius: 999px !important;
  border: 2px solid #fdecef !important;
  min-height: 34px !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-thumb:hover,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ef4659 0%, #c92d3f 100%) !important;
}

/* top / bottom buttons */
html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-button:single-button,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-button:single-button {
  display: block !important;
  height: 12px !important;
  background-color: #fdecef !important;
  border-left: 1px solid #f6cfd5 !important;
  border-right: 1px solid #f6cfd5 !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-button:single-button:vertical:decrement,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-button:single-button:vertical:decrement {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  background:
    linear-gradient(135deg, transparent 48%, #d63a49 49%, #d63a49 58%, transparent 59%) center 6px / 6px 6px no-repeat,
    linear-gradient(225deg, transparent 48%, #d63a49 49%, #d63a49 58%, transparent 59%) center 6px / 6px 6px no-repeat,
    #fdecef !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list::-webkit-scrollbar-button:single-button:vertical:increment,
html body .ecd-only-categories-card .ecd-only-legend::-webkit-scrollbar-button:single-button:vertical:increment {
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  background:
    linear-gradient(315deg, transparent 48%, #d63a49 49%, #d63a49 58%, transparent 59%) center 4px / 6px 6px no-repeat,
    linear-gradient(45deg, transparent 48%, #d63a49 49%, #d63a49 58%, transparent 59%) center 4px / 6px 6px no-repeat,
    #fdecef !important;
}

/* small spacing so scrollbar does not stick to content */
html body .ecd-only-upcoming-card .ecd-only-upcoming-list,
html body .ecd-only-categories-card .ecd-only-legend {
  padding-right: 10px !important;
}


/* =========================================================
   v2.0.3 - Stable responsive fix after Recovery Safe
   No icon system. Fix only layout:
   - 1281px+ = Calendar left / Sidebar right
   - 768px-1280px = Sidebar below Calendar, 2 columns
   - <768px = Sidebar below Calendar, 1 column
========================================================= */

/* Calendar table must shrink instead of causing horizontal layout break */
html body .ecd-only-calendar-card {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

html body .ecd-only-table {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

html body .ecd-only-weekdays,
html body .ecd-only-days {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

/* Shared card structure */
html body .ecd-only-upcoming-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body .ecd-only-upcoming-card .ecd-only-side-title,
html body .ecd-only-upcoming-card .ecd-upcoming-selector,
html body .ecd-only-upcoming-card .ecd-only-viewall {
  flex: 0 0 auto !important;
}

html body .ecd-only-upcoming-card .ecd-only-upcoming-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-bottom: 12px !important;
  padding-right: 10px !important;
}

html body .ecd-only-upcoming-card .ecd-only-viewall {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* True desktop only */
@media screen and (min-width: 1281px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 20px !important;
    align-items: start !important;
    margin-bottom: 42px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 300px !important;
    max-width: 300px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 145px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 185px !important;
    min-height: 185px !important;
    max-height: 185px !important;
    overflow: hidden !important;
    padding: 14px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-categories-card .ecd-only-legend {
    max-height: 74px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 8px !important;
  }
}

/* Tablet / small laptop / responsive preview: below calendar, 2 columns */
@media screen and (min-width: 768px) and (max-width: 1280px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar:not(.ecd-layout-bottom),
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-right,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-left,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 32px !important;
    overflow: visible !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-layout-bottom > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    overflow: visible !important;
    align-items: start !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-side-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 330px !important;
    min-height: 330px !important;
    max-height: 330px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 118px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    grid-column: 1 / -1 !important;
    height: 185px !important;
    min-height: 185px !important;
    max-height: 185px !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-categories-card .ecd-only-legend {
    max-height: 74px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 8px !important;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 28px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-calendar-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  html body .ecd-only-calendar-card {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  html body .ecd-only-weekdays div {
    padding: 8px 2px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  html body .ecd-only-day {
    min-height: 64px !important;
    padding: 5px 4px !important;
  }

  html body .ecd-only-daynum {
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }

  html body .ecd-only-event {
    padding: 4px 4px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }

  html body .ecd-only-event small {
    display: none !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 338px !important;
    min-height: 338px !important;
    max-height: 338px !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
    max-height: 124px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-categories-card {
    height: 182px !important;
    min-height: 182px !important;
    max-height: 182px !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-categories-card .ecd-only-legend {
    max-height: 72px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}


/* =========================================================
   v2.0.4 - Container-width responsive fix
   Uses actual widget width, not only browser viewport.
========================================================= */

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below:not(.ecd-layout-bottom),
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-layout-right,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-layout-left,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-layout-bottom {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: start !important;
  margin-bottom: 32px !important;
  overflow: visible !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-calendar-card {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-layout-bottom > .ecd-only-sidebar {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-side-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-upcoming-card {
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
  padding: 14px !important;
  padding-bottom: 16px !important;
  overflow: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below .ecd-only-upcoming-card .ecd-only-upcoming-list {
  max-height: 118px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-bottom: 12px !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below .ecd-only-upcoming-card .ecd-only-viewall {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  transform: none !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-categories-card {
  grid-column: 1 / -1 !important;
  height: 185px !important;
  min-height: 185px !important;
  max-height: 185px !important;
  padding: 14px !important;
  overflow: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below .ecd-only-categories-card .ecd-only-legend {
  max-height: 74px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px !important;
}

@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-upcoming-card {
    height: 338px !important;
    min-height: 338px !important;
    max-height: 338px !important;
  }
}


/* v2.0.5 - Keep auto category subtitle short */
.ecd-only-side-title p {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}


/* v2.0.8 - AJAX month navigation */
.ecd-only-wrap.ecd-is-loading {
  opacity: 0.55 !important;
  pointer-events: none !important;
  position: relative !important;
}

.ecd-only-wrap.ecd-is-loading::after {
  content: "Loading..." !important;
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 20 !important;
  background: var(--ecd-primary) !important;
  color: #fff !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 18px rgba(201,54,68,.22) !important;
}


/* v2.0.9 - Remove AJAX Loading text badge */
.ecd-only-wrap.ecd-is-loading::after {
  content: none !important;
  display: none !important;
}


/* v2.1.2 - Safe category color settings */
.ecd-category-color-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 12px !important;
}

.ecd-category-color-item {
  background: #fff !important;
  border: 1px solid #dcdcde !important;
  border-radius: 10px !important;
  padding: 12px !important;
}

.ecd-category-color-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.ecd-category-color-preview {
  width: 46px !important;
  height: 30px !important;
  border: 1px solid !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.ecd-category-color-inputs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.ecd-category-color-inputs label {
  font-size: 12px !important;
  font-weight: 700 !important;
}

.ecd-category-color-inputs input[type="color"] {
  width: 100% !important;
  height: 34px !important;
  padding: 2px !important;
  cursor: pointer !important;
}

@media (max-width: 782px) {
  .ecd-category-color-grid {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   v2.1.3 - Mobile compact calendar
   On small screens, 7 columns cannot show full event names cleanly.
   Convert calendar event badges into compact colored dots/pills.
========================================================= */

@media screen and (max-width: 520px) {
  html body .ecd-only-calendar-card {
    padding: 10px !important;
  }

  html body .ecd-only-table {
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  html body .ecd-only-weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  html body .ecd-only-weekdays div {
    padding: 8px 1px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  html body .ecd-only-days {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  html body .ecd-only-day {
    min-height: 58px !important;
    padding: 4px 3px !important;
    position: relative !important;
  }

  html body .ecd-only-daynum {
    font-size: 11px !important;
    line-height: 1 !important;
    margin-bottom: 5px !important;
    font-weight: 800 !important;
  }

  html body .ecd-only-today .ecd-only-daynum {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }

  /* Calendar events become compact colored markers on mobile */
  html body .ecd-only-day .ecd-only-event {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    min-height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
    padding: 0 !important;
    margin: 2px 2px 0 0 !important;
    display: inline-flex !important;
    vertical-align: top !important;
    border-radius: 999px !important;
    border-width: 2px !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-shadow: none !important;
  }

  html body .ecd-only-day .ecd-only-event b,
  html body .ecd-only-day .ecd-only-event small {
    display: none !important;
  }

  /* Keep tooltips from breaking mobile layout */
  html body .ecd-only-day .ecd-only-tooltip {
    display: none !important;
  }

  /* If many events in one day, keep the dots on a clean line */
  html body .ecd-only-day .ecd-only-more {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 13px !important;
    margin-top: 2px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    border-radius: 999px !important;
  }

  /* Slightly reduce title area so calendar has more room */
  html body .ecd-only-title-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    font-size: 17px !important;
  }

  html body .ecd-only-title h2 {
    font-size: 22px !important;
    line-height: 1.1 !important;
  }

  html body .ecd-only-title h2 span {
    font-size: 18px !important;
  }

  html body .ecd-only-title p {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  html body .ecd-only-nav a {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  html body .ecd-only-month {
    min-height: 38px !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }
}

/* Extra small phones */
@media screen and (max-width: 380px) {
  html body .ecd-only-calendar-card {
    padding: 8px !important;
  }

  html body .ecd-only-weekdays div {
    font-size: 8px !important;
  }

  html body .ecd-only-day {
    min-height: 52px !important;
    padding: 4px 2px !important;
  }

  html body .ecd-only-daynum {
    font-size: 10px !important;
  }

  html body .ecd-only-day .ecd-only-event {
    width: 11px !important;
    height: 11px !important;
    min-width: 11px !important;
    min-height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
    border-width: 2px !important;
  }
}


/* v2.1.4 - Make Event Box Limit visible instead of clipped by compact mobile height
   Limit controls the number of event items. Older compact CSS fixed the Event Box height,
   so a limit of 5 could look like only 3 because the rest was inside a small scroll area. */
html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card,
html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-latest-card,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-upcoming-card,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-latest-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-upcoming-list,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-upcoming-list {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-viewall,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-viewall {
  position: static !important;
  width: 100% !important;
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  transform: none !important;
}

/* =========================================================
   v2.1.5 - Force Selected Events / News below Calendar only
   Scoped only to the Event Calendar Design wrapper.
   This does not touch Elementor sections or other page CSS.
========================================================= */
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-layout-right,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-layout-left,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-layout-bottom,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-sidebar-below {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-calendar-card {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar > .ecd-only-side-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   v2.1.6 - Container-width mobile stack
   Fix: when the Elementor/page column is narrow but the browser viewport is still desktop,
   Selected Events + News must become 1 column.
========================================================= */
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom {
  container-type: inline-size !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-mobile-stack > .ecd-only-sidebar,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-mobile-stack > .ecd-only-sidebar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom.ecd-mobile-stack > .ecd-only-sidebar > .ecd-only-side-card,
html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below.ecd-mobile-stack > .ecd-only-sidebar > .ecd-only-side-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

@container (max-width: 759px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar > .ecd-only-side-card,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-side-card {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media screen and (max-width: 767px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom > .ecd-only-sidebar > .ecd-only-side-card,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below > .ecd-only-sidebar > .ecd-only-side-card {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* =========================================================
   v2.1.7 - Taller Selected Events / News cards
   Make the two event boxes feel balanced and use more vertical space
   while still allowing them to grow naturally when more events are shown.
========================================================= */
@media screen and (min-width: 768px) {
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom:not(.ecd-mobile-stack) > .ecd-only-sidebar,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below:not(.ecd-mobile-stack) > .ecd-only-sidebar {
    align-items: stretch !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom:not(.ecd-mobile-stack) > .ecd-only-sidebar > .ecd-only-upcoming-card,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below:not(.ecd-mobile-stack) > .ecd-only-sidebar > .ecd-only-upcoming-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 330px !important;
    height: auto !important;
    max-height: none !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom:not(.ecd-mobile-stack) .ecd-only-upcoming-card .ecd-only-upcoming-list,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below:not(.ecd-mobile-stack) .ecd-only-upcoming-card .ecd-only-upcoming-list {
    flex: 1 1 auto !important;
  }

  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-force-sidebar-bottom:not(.ecd-mobile-stack) .ecd-only-upcoming-card .ecd-only-viewall,
  html body .ecd-only-wrap.ecd-only-has-sidebar.ecd-sidebar-below:not(.ecd-mobile-stack) .ecd-only-upcoming-card .ecd-only-viewall {
    margin-top: auto !important;
  }
}

/* =========================================================
   v2.1.8 - Adjustable Selected Events / News height
   Controlled by EditCalendar > Layout & Style > Selected Events / News Height.
========================================================= */
html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-upcoming-card,
html body .ecd-only-wrap.ecd-only-has-sidebar > .ecd-only-sidebar > .ecd-only-latest-card,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-upcoming-card,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-latest-card {
  display: flex !important;
  flex-direction: column !important;
  height: var(--ecd-event-box-height, 330px) !important;
  min-height: var(--ecd-event-box-height, 330px) !important;
  max-height: var(--ecd-event-box-height, 330px) !important;
  overflow: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-side-title,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-side-title,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-upcoming-selector,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-upcoming-selector,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-viewall,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-viewall {
  flex: 0 0 auto !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-upcoming-list,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-sidebar .ecd-only-upcoming-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-viewall,
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-latest-card .ecd-only-viewall {
  position: static !important;
  width: 100% !important;
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  transform: none !important;
}

/* =========================================================
   v2.1.10 - Stretch the inner event list with the card height
   The list viewport now consumes all remaining vertical space.
========================================================= */
html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-upcoming-list {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html body .ecd-only-wrap.ecd-only-has-sidebar .ecd-only-upcoming-card .ecd-only-viewall {
  position: static !important;
  flex: 0 0 auto !important;
  margin-top: 14px !important;
}

/* v2.1.12 - Category + year filters inside Selected Events / News */
.ecd-upcoming-selector .ecd-selector-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 118px !important;
  gap: 10px !important;
  width: 100% !important;
  align-items: center !important;
}

.ecd-upcoming-selector .ecd-selector-fields select {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

@media (max-width: 520px) {
  .ecd-upcoming-selector .ecd-selector-fields {
    grid-template-columns: 1fr !important;
  }
}
