.events--description {
  margin-bottom: 1.25rem;
}

.events--wrapper .btn,
.events--wrapper .btn--primary {
  display: inline-block;
  width: auto;
  padding: 12px 20px;
  position: relative;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  border: 2px solid #850140;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  background-color: #850140;
  transition: all 0.25s ease;
  text-decoration: none;
}

.event-cal__container {
  display: table-row;
}

.event-cal__container ul {
  margin: 0 !important;
}

.event-cal__lable {
  display: table-cell;
  padding: 10px 20px;
  border: 13px solid white;
  background: #eee;
}

.event-cal__data {
  display: table-cell;
  padding: 10px 20px;
  border: 13px solid white;
  background: #eee;
}

.event-cal__data button {
  border: 0 !important;
  width: 100% !important;
  margin-top: 15px;
}

.event-cal__date {
  line-height: 0;
  opacity: 0;
  transition: all 0.2s ease;
}

.event-cal__date--show {
  line-height: 1.4;
  opacity: 1;
  margin: 0.8rem 0;
}

@media (max-width: 768px) {
  .event-cal__container {
    display: block;
  }

  .event-cal__lable {
    display: block;
  }

  .event-cal__data {
    display: block;
  }
}

.page-events-and-programs .view-filters {
  background-color: #f5f6f8;
  padding: 20px;
  border: 1px solid #e6e9ee;
  margin: 0 0 45px;
}

.page-events-and-programs .view-filters form {
  /* margin-bottom: 1.875rem; */
  position: relative;
  z-index: 1;
  clear: both;
  line-height: 38px;
}

@media (min-width: 980px) {
  .page-events-and-programs .view-filters .form-checkboxes .form-item {
    margin: 0 0 2px;
    width: 33%;
  }
}

@media (min-width: 768px) {
  .view-filters .form-checkboxes .form-item {
    float: left;
    width: 50%;
  }
}

.page-events-and-programs .view-filters form fieldset {
  width: auto;
  border: none;
}

.page-events-and-programs .view-filters .form-submit {
  margin-top: 25px;
  margin-bottom: 0px;
}

.page-events-and-programs *,
.page-events-and-programs ::before,
.page-events-and-programs ::after {
  box-sizing: inherit;
}

.page-events-and-programs * {
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
}

.page-events-and-programs .view-events .no-events {
  padding: 5px 10px;
  margin: 0 0 15px;
  font-size: 18px;
  line-height: 32px;
}

.page-events-and-programs .view-events .no-events strong {
  font-weight: bolder;
}

.page-events-and-programs .view-events ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
  word-wrap: break-word;
}

.page-events-and-programs .view-events .views-row {
  overflow: hidden;
  margin: 0 0 15px;
  padding: 5px 0;
}

.page-events-and-programs .view-events .views-row .views-field {
  box-sizing: inherit;
}

.page-events-and-programs .view-events .date-display-single {
  font-weight: 600;
  color: #000;
}

.page-events-and-programs .view-events .terms {
  font-size: 12px;
  text-transform: uppercase;
  color: #6e6d6d;
}

.page-events-and-programs .view-events .facility_link {
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.page-events-and-programs .view-events .facility_link:hover {
  text-decoration: underline;
}

/* .page-events-and-programs .view-events .facility_link span{
    color: #5a5959; 
    font-weight: 600;
} */

.page-events-and-programs .view-events .right h2 {
  font-size: 22px !important;
  font-weight: 600;
  text-decoration: none;
  line-height: 0 !important;
  margin: 0;
}

.page-events-and-programs .view-events .right h2 a {
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
}

.page-events-and-programs .view-events .right p {
  margin: 0 0 20px;
  font-family: "Nunito Sans", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 32px;
}

.page-events-and-programs .view-events .right h2 a:hover {
  text-decoration: underline;
}

.page-events-and-programs .view-events .right .views-more-link {
  display: block;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}

.page-events-and-programs .view-events .right .views-more-link:hover {
  text-decoration: underline;
}

.page-events-and-programs .pager a {
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
}

.page-events-and-programs .pager .current {
  font-size: 13px;
}

.page-events-and-programs .pager a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .page-events-and-programs
    .view-events
    .views-row
    .views-field
    .field-content {
    display: flex;
  }
  .page-events-and-programs .view-events .left {
    width: 30%;
    padding: 0 10px;
  }
  .page-events-and-programs .view-events .right {
    width: 70%;
    padding: 0 10px;
  }
}

.page-events-and-programs .pager {
  padding: 15px 0 0;
  text-align: left;
  border-top: 1px solid #e7e7e7;
  clear: both;
}

/* Story 10.1: Dropdown filter layout */
.page-events-and-programs .filter-dropdown {
  flex: 1;
  min-width: 200px;
}

.page-events-and-programs .filter-dropdown label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.page-events-and-programs .filter-dropdown select.form-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  font-size: 14px;
  min-height: 120px;
}

.page-events-and-programs .filter-dropdown select.form-select:focus {
  outline: none;
  border-color: var(--theme-color, #850140);
  box-shadow: 0 0 3px var(--theme-color-alpha-10, rgba(133, 1, 64, 0.1));
}

/* Mobile responsive for dropdown layout — moved to @container event-filters below. */

/* Story 10.1: Custom Multi-select Dropdown Styling */
/* container-type enables @container queries on this element's descendants,
   so the mobile dropdown behaviour responds to the actual filter area width
   rather than the viewport — handles sidebar/no-sidebar layouts automatically. */
.filter-dropdowns-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  container-type: inline-size;
  container-name: event-filters;
}

/* Every .custom-multiselect gets a low z-index so it creates a stacking context
   that CONTAINS its children's z-indices. Without this, the trigger's z-index
   leaks into the parent context and paints over sibling dropdown lists. */
.custom-multiselect {
  position: relative;
  min-width: 250px;
  z-index: 1;
}

/* When open, the entire dropdown (including its list) floats above closed
   siblings. Because sibling dropdowns also have stacking contexts (z-index: 1),
   their trigger z-indices can't escape to compete. */
.custom-multiselect.is-open {
  z-index: 100;
}

.custom-multiselect label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.custom-multiselect-container {
  position: relative;
  font-family: inherit;
}

.custom-multiselect-trigger {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 42px;
  padding: 0 40px 0 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  box-sizing: border-box;
  font-size: 14px;
  color: #333;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2 !important;
  pointer-events: auto !important;
}

.custom-multiselect-trigger:hover {
  border-color: #999;
}

.custom-multiselect.is-open .custom-multiselect-trigger {
  border-color: var(--theme-color, #850140);
  box-shadow: 0 0 0 2px var(--theme-color-alpha-10, rgba(133, 1, 64, 0.1));
}

.custom-multiselect.is-open .custom-multiselect-list {
  left: 0;
  right: 0;
}

.custom-multiselect-trigger .selected-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: #666;
}

.custom-multiselect-trigger.has-value .selected-text {
  color: #333;
}

.custom-multiselect-trigger .arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #666;
  transition: transform 0.2s;
}

.custom-multiselect.is-open .arrow {
  transform: translateY(-50%) rotate(180deg);
}

.custom-multiselect-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 3 !important;
  margin-top: 4px;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px 0;
}

.custom-multiselect.is-open .custom-multiselect-list {
  display: block !important;
}

.custom-multiselect-item {
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.custom-multiselect-item:last-child {
  border-bottom: none;
}

.custom-multiselect-item label {
  display: flex !important;
  align-items: center !important;
  padding: 10px 12px !important;
  cursor: pointer !important;
  margin: 0 !important;
  font-weight: normal !important;
  font-size: 14px !important;
  color: #333 !important;
  height: auto !important;
  transition: background 0.2s;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  position: relative !important;
  padding-left: 36px !important;
}

.custom-multiselect-item label:hover {
  background-color: var(--theme-color-alpha-08, rgba(133, 1, 64, 0.08));
}

.custom-multiselect-item input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  cursor: pointer !important;
  height: 0 !important;
  width: 0 !important;
  display: none !important;
}

.custom-multiselect-item .checkmark {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #ccc;
  border-radius: 3px;
  position: absolute !important;
  left: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-sizing: border-box;
  margin-right: 0 !important;
}

.custom-multiselect-item input[type="checkbox"]:checked ~ .checkmark {
  background-color: var(--theme-color, #850140);
  border-color: var(--theme-color, #850140);
}

.custom-multiselect-item .checkmark:after,
.custom-checkbox-item .checkmark:after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  /* Offset visual center shift caused by 45deg rotation of the L-shaped border tick */
  margin-top: -2px;
}

.custom-multiselect-item input[type="checkbox"]:checked ~ .checkmark:after {
  display: block;
}

.custom-multiselect-item .item-text {
  font-size: 14px !important;
  color: #333 !important;
  line-height: 1.4;
  display: inline !important;
  visibility: visible !important;
}

/* Story 10.1: Default Checkbox Layer Improvements */
.filter-checkboxes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 30px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.custom-checkbox-filter label {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--theme-color, #850140) !important;
  margin-bottom: 15px !important;
  border-bottom: 2px solid var(--theme-color, #850140) !important;
  padding-bottom: 5px !important;
  width: 100% !important;
}

.checkbox-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* Story 10.1: Make facility/location checkbox options stack vertically */
#edit-field-location-tid-wrapper .checkbox-options-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.custom-checkbox-item label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  margin: 0 !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #333 !important;
  position: relative !important;
  padding-left: 0 !important;
  border: none !important;
  background: transparent !important;
  transition: background-color 0.2s;
}

.custom-checkbox-item label:hover {
  background-color: var(--theme-color-alpha-08, rgba(133, 1, 64, 0.08));
  border-radius: 4px;
}

.custom-checkbox-item input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  cursor: pointer !important;
  height: 0 !important;
  width: 0 !important;
}

.custom-checkbox-item .checkmark {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 3px !important;
  border: 2px solid var(--theme-color, #850140) !important;
  background: #fff;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.custom-checkbox-item input:checked ~ .checkmark {
  background-color: var(--theme-color, #850140);
}

.custom-checkbox-item input:checked ~ .checkmark:after {
  display: block;
}

/* Viewport query only for the wrapper's own layout — a container cannot style
   itself from within a @container rule. */
@media (max-width: 767px) {
  .filter-dropdowns-wrapper {
    flex-direction: column;
    gap: 15px;
  }
}

/* Container query: stack dropdowns vertically and go full-width when the
   filter area is narrow (sidebar present, or small viewport).
   The dropdown list always uses position: absolute — no fixed bottom-sheet,
   which avoids stacking-context escape issues and z-index wars with theme
   elements (sticky headers, ER wait-time bars, etc.). */
@container event-filters (max-width: 480px) {
  .page-events-and-programs .filter-dropdown {
    width: 100%;
  }

  .custom-multiselect {
    width: 100%;
  }
}
