.re-events-shell {
  --re-blue: #005487;
  --re-blue-strong: #0A2E4A;
  --re-accent: #37AAE1;
  --re-text: #101828;
  --re-muted: #667085;
  --re-line: #DFE7F0;
  --re-line-strong: #CCD8E5;
  --re-soft: #F6F9FC;
  --re-chip: #F2F7FB;
  --re-shadow: 0 18px 42px rgba(10, 46, 74, 0.08);
  --re-shadow-soft: 0 8px 22px rgba(10, 46, 74, 0.05);
  color: var(--re-text);
  font-family: inherit;
  margin: 40px auto;
  max-width: 1180px;
  padding: 0 20px;
  position: relative;
}

.re-calendar-view {
  margin: 0 auto;
  max-width: 960px;
}

.re-events-toolbar {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.re-events-heading,
.re-events-controls,
.re-events-nav,
.re-view-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
}

.re-events-heading h2 {
  color: var(--re-blue-strong);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.re-events-heading {
  width: 100%;
}

.re-events-controls {
  flex-wrap: wrap;
  gap: 12px;
}

.re-icon-button,
.re-today-button,
.re-view-toggle button,
.re-category-filter > button,
.re-list-pagination button,
.re-page-dots button {
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  color: var(--re-blue-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  box-shadow: var(--re-shadow-soft);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.re-icon-button {
  font-size: 23px;
  line-height: 1;
  min-width: 44px;
  padding: 6px 10px;
}

.re-icon-button:hover,
.re-today-button:hover,
.re-category-filter > button:hover,
.re-list-pagination button:hover:not(:disabled),
.re-page-dots button:hover {
  border-color: var(--re-accent);
  box-shadow: 0 12px 26px rgba(15, 83, 135, 0.13);
}

.re-view-toggle {
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  gap: 0;
  overflow: hidden;
  box-shadow: var(--re-shadow-soft);
}

.re-view-toggle button {
  border: 0;
  border-radius: 0;
  display: inline-flex;
  gap: 7px;
}

.re-view-toggle button.is-active {
  background: var(--re-blue);
  color: #fff;
}

.re-category-filter {
  min-width: 190px;
  position: relative;
}

.re-category-filter > button {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 190px;
  width: 100%;
}

.re-category-menu {
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(10, 46, 74, 0.18);
  display: none;
  left: 0;
  min-width: 100%;
  overflow: hidden;
  padding: 6px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 60;
}

.re-category-filter.is-open .re-category-menu {
  display: grid;
  gap: 2px;
}

.re-category-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--re-blue-strong);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.re-category-menu button:hover,
.re-category-menu button.is-active {
  background: var(--re-chip);
  color: var(--re-blue);
}

.re-events-shell.is-loading .re-events-content {
  opacity: 0.55;
  pointer-events: none;
}

.re-loading-overlay {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-shadow: var(--re-shadow-soft);
  color: var(--re-blue-strong);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  left: 50%;
  padding: 12px 16px;
  position: absolute;
  top: 120px;
  transform: translateX(-50%);
  z-index: 130;
}

.re-loading-overlay[hidden] {
  display: none;
}

.re-loading-spinner {
  animation: re-spin 0.75s linear infinite;
  border: 2px solid #B9E4F7;
  border-top-color: var(--re-blue);
  border-radius: 50%;
  height: 18px;
  width: 18px;
}

@keyframes re-spin {
  to {
    transform: rotate(360deg);
  }
}

.re-calendar-weekdays {
  background: #F3F7FB;
  border: 1px solid var(--re-line-strong);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
}

.re-calendar-weekdays span {
  color: #34495E;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 10px;
  text-align: center;
}

.re-calendar-grid {
  background: #fff;
  border: 1px solid var(--re-line-strong);
  border-bottom: 0;
  border-right: 0;
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(var(--re-week-count, 6), 104px);
  margin: 0 auto;
  max-width: 100%;
  min-height: 0;
  overflow: visible;
  position: relative;
  width: 100%;
}

.re-calendar-day {
  border-bottom: 1px solid var(--re-line);
  border-right: 1px solid var(--re-line);
  box-shadow: none;
  box-sizing: border-box;
  height: 104px;
  min-height: 0;
  overflow: visible;
  padding: 10px 8px;
  position: relative;
  z-index: 1;
}

.re-day-number {
  color: var(--re-blue-strong);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.re-calendar-day.is-muted {
  background: #F8FAFC;
}

.re-calendar-day.is-muted .re-day-number {
  color: #A0A8B5;
}

.re-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(55, 170, 225, 0.55);
}

.re-calendar-day.is-selected {
  background: #EAF6FC;
}

.re-calendar-event {
  background: var(--re-event-color, var(--re-blue));
  border-radius: 5px;
  color: #fff;
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  padding: 3px 8px;
  position: relative;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.re-calendar-bar {
  align-self: start;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 84, 135, 0.14);
  height: 18px;
  margin: calc(36px + (var(--re-lane) * 21px)) 6px 0;
  min-width: 0;
  z-index: 3;
}

.re-calendar-event span:first-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.re-calendar-event:hover,
.re-calendar-event:focus {
  box-shadow: 0 8px 18px rgba(0, 84, 135, 0.22);
  color: #fff;
  text-decoration: none;
  z-index: 100;
}

.re-calendar-event.has-no-link,
.re-event-row.has-no-link {
  cursor: default;
}

.re-status-cancelled {
  background: #FEE4E2;
  color: #B42318;
}

.re-status-postponed {
  background: #FEF0C7;
  color: #B54708;
}

.re-status-rescheduled {
  background: #E0F2FE;
  color: #026AA2;
}

.re-status-completed {
  background: #F2F4F7;
  color: #475467;
}

.re-more-events {
  color: var(--re-muted);
  font-size: 12px;
  font-weight: 600;
}

.re-mobile-day-dots {
  display: none;
}

.re-day-mobile-events {
  display: none;
}

.re-mobile-selected-events {
  display: none;
}

.re-event-preview {
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-shadow: 0 24px 56px rgba(10, 46, 74, 0.2);
  color: var(--re-text);
  display: none;
  left: 0;
  min-width: 300px;
  padding: 14px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 120;
}

.re-calendar-event:hover .re-event-preview,
.re-calendar-event:focus .re-event-preview {
  display: grid;
  gap: 8px;
}

.re-event-preview img {
  aspect-ratio: 16 / 8;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  width: 100%;
}

.re-event-preview strong {
  color: var(--re-text);
  font-size: 16px;
  line-height: 1.35;
}

.re-event-preview span {
  color: #344054;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.re-mobile-agenda {
  display: none;
}

.re-list-intro {
  border-bottom: 1px solid var(--re-line);
  margin-bottom: 34px;
  padding-bottom: 20px;
}

.re-list-intro h2 {
  color: var(--re-blue-strong);
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.re-list-intro p {
  color: var(--re-muted);
  font-size: 16px;
  margin: 0;
}

.re-list-month {
  align-items: center;
  color: var(--re-blue-strong);
  display: flex;
  font-size: 22px;
  font-weight: 600;
  gap: 18px;
  margin: 34px 0 16px;
}

.re-list-month::after {
  background: linear-gradient(90deg, var(--re-line-strong), rgba(204, 216, 229, 0.25));
  content: "";
  flex: 1;
  height: 1px;
}

.re-event-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 22px;
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, 32%);
  margin-bottom: 20px;
  min-height: 180px;
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.re-event-row.is-featured {
  border-left: 5px solid var(--re-blue);
}

.re-event-row:hover {
  border-color: #BFD4E7;
  box-shadow: var(--re-shadow);
  color: inherit;
  text-decoration: none;
  transform: translateY(-1px);
}

.re-event-row.is-dimmed {
  opacity: 0.72;
}

.re-event-date {
  background: var(--re-soft);
  border: 1px solid var(--re-line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 82px;
  place-content: center;
  text-align: center;
}

.re-event-date strong {
  color: var(--re-blue-strong);
  font-size: 33px;
  font-weight: 700;
  line-height: 0.95;
}

.re-event-date span {
  color: var(--re-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.re-event-image {
  align-items: center;
  background: #F8FAFC;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-sizing: border-box;
  color: #98A2B3;
  display: flex;
  justify-content: center;
  min-height: 118px;
  overflow: hidden;
  padding: 12px;
}

.re-event-image img {
  border-radius: 7px;
  display: block;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  width: 100%;
}

.re-event-title-row {
  align-items: flex-start;
  display: block;
}

.re-event-title-row h3 {
  color: var(--re-text);
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.re-status {
  background: #EAF6FC;
  border: 1px solid #B9E4F7;
  border-radius: 999px;
  color: #005487;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
  padding: 4px 10px;
}

.re-status.re-status-scheduled {
  background: #ECFDF3;
  border-color: #ABEFC6;
  color: #067647;
}

.re-event-range {
  color: #475467;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.re-event-summary p {
  color: #475467;
  display: -webkit-box;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.re-empty-state {
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-shadow: var(--re-shadow-soft);
  padding: 34px;
  text-align: center;
}

.re-empty-state h3 {
  color: var(--re-blue-strong);
  margin: 0 0 8px;
}

.re-empty-state p {
  color: var(--re-muted);
  margin: 0;
}

.re-list-pagination {
  align-items: center;
  border-top: 1px solid var(--re-line);
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 28px;
}

.re-list-range-label {
  color: var(--re-muted);
  font-size: 14px;
  font-weight: 700;
}

.re-page-dots {
  display: flex;
  gap: 8px;
}

.re-page-dots button.is-active {
  background: var(--re-blue);
  color: #fff;
}

.re-list-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.re-event-drawer-open {
  overflow: hidden;
}

.re-event-drawer {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.22s ease;
  z-index: 2147483001;
}

.re-event-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.re-event-drawer-backdrop {
  background: rgba(10, 46, 74, 0.42);
  inset: 0;
  position: absolute;
}

.re-event-drawer-panel {
  background: #fff;
  border-left: 1px solid var(--re-line);
  box-shadow: -24px 0 60px rgba(10, 46, 74, 0.18);
  box-sizing: border-box;
  height: 100%;
  max-width: min(520px, calc(100vw - 32px));
  outline: none;
  overflow-y: auto;
  padding: 28px;
  position: absolute;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform 0.26s ease;
  width: 520px;
}

.re-event-drawer.is-open .re-event-drawer-panel {
  transform: translateX(0);
}

.re-event-drawer-close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  color: var(--re-blue-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  z-index: 2;
}

.re-event-drawer-close:hover {
  border-color: var(--re-accent);
  color: var(--re-blue);
}

.re-drawer-event {
  display: grid;
  gap: 22px;
  padding-top: 36px;
}

.re-drawer-image {
  background: #F8FAFC;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  box-sizing: border-box;
  max-height: 230px;
  object-fit: contain;
  padding: 14px;
  width: 100%;
}

.re-drawer-header {
  display: grid;
  gap: 12px;
}

.re-drawer-header .re-status {
  margin: 0;
  width: max-content;
}

.re-drawer-header h3 {
  color: var(--re-blue-strong);
  font-size: 30px;
  line-height: 1.18;
  margin: 0;
}

.re-drawer-facts {
  border-top: 1px solid var(--re-line);
  display: grid;
  gap: 0;
  margin: 0;
}

.re-drawer-facts div {
  border-bottom: 1px solid var(--re-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 118px minmax(0, 1fr);
  padding: 13px 0;
}

.re-drawer-facts dt {
  color: var(--re-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.re-drawer-facts dd {
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.re-drawer-facts a {
  color: var(--re-blue);
  font-weight: 700;
  text-decoration: none;
}

.re-drawer-facts a:hover {
  text-decoration: underline;
}

.re-drawer-description {
  color: #344054;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

.re-drawer-cta {
  align-items: center;
  background: var(--re-blue);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 7px 16px;
  text-decoration: none;
  width: max-content;
}

.re-drawer-cta:hover,
.re-drawer-cta:focus {
  background: #063F66;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 900px) {
  .re-events-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .re-events-heading,
  .re-events-controls {
    width: 100%;
  }

  .re-events-heading h2 {
    font-size: 26px;
  }

  .re-calendar-weekdays,
  .re-calendar-grid {
    max-width: 100%;
  }

  .re-calendar-grid {
    background: transparent;
    border: 0;
    border-radius: 0;
    grid-template-rows: repeat(var(--re-week-count, 6), 82px);
    min-height: 0;
  }

  .re-calendar-weekdays {
    border: 0;
    border-radius: 6px;
  }

  .re-calendar-weekdays span {
    font-size: 18px;
    font-weight: 500;
    padding: 12px 4px;
  }

  .re-calendar-day {
    align-items: center;
    border: 0;
    display: grid;
    height: 82px;
    justify-items: center;
    min-height: 82px;
    padding: 4px;
  }

  .re-calendar-day.is-muted {
    background: transparent;
  }

  .re-calendar-day.is-today {
    box-shadow: none;
  }

  .re-day-number {
    font-size: 25px;
    font-weight: 500;
    margin: 0;
  }

  .re-calendar-day.is-muted .re-day-number {
    color: #101828;
  }

  .re-calendar-bar {
    display: none;
  }

  .re-mobile-day-dots {
    display: flex;
    gap: 4px;
    min-height: 8px;
  }

  .re-mobile-dot {
    background: var(--re-event-color, var(--re-blue));
    border-radius: 999px;
    display: block;
    height: 8px;
    width: 8px;
  }

  .re-mobile-dot.re-status-cancelled {
    background: #F04438;
  }

  .re-mobile-dot.re-status-postponed {
    background: #F79009;
  }

  .re-mobile-dot.re-status-rescheduled {
    background: #0BA5EC;
  }

  .re-mobile-selected-events {
    display: block;
    margin: 18px 0 0;
  }

  .re-mobile-selected-heading {
    border-bottom: 1px solid var(--re-line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .re-mobile-selected-heading span {
    color: var(--re-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .re-mobile-selected-heading strong {
    color: var(--re-blue-strong);
    font-size: 14px;
  }

  .re-mobile-selected-list {
    display: grid;
    gap: 10px;
  }

  .re-mobile-selected-card {
    background: #fff;
    border: 1px solid var(--re-line);
    border-radius: 8px;
    box-shadow: var(--re-shadow-soft);
    padding: 14px;
  }

  .re-mobile-selected-card h3 {
    color: var(--re-text);
    font-size: 17px;
    line-height: 1.3;
    margin: 0 0 7px;
  }

  .re-mobile-selected-card p,
  .re-mobile-no-events {
    color: #475467;
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 12px;
  }

  .re-mobile-selected-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .re-mobile-selected-actions .re-status {
    margin: 0;
  }

  .re-mobile-selected-card a {
    align-items: center;
    background: var(--re-blue);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    min-height: 28px;
    padding: 4px 9px;
    text-decoration: none;
  }

  .re-event-row {
    align-items: start;
    gap: 18px;
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 0;
    padding: 18px;
  }

  .re-event-image {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
  }

  .re-event-image img {
    max-height: 210px;
  }

  .re-event-date {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 70px;
  }

  .re-event-date strong {
    font-size: 29px;
  }

  .re-event-date span {
    font-size: 14px;
  }

  .re-event-summary {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  .re-event-title-row {
    align-items: flex-start;
  }

  .re-event-title-row h3 {
    font-size: 24px;
  }

  .re-event-drawer-panel {
    border-left: 0;
    border-radius: 12px 12px 0 0;
    bottom: 0;
    box-shadow: 0 -22px 54px rgba(10, 46, 74, 0.2);
    height: min(86vh, 760px);
    max-width: 100%;
    padding: 22px 18px;
    right: auto;
    top: auto;
    transform: translateY(100%);
    width: 100%;
  }

  .re-event-drawer.is-open .re-event-drawer-panel {
    transform: translateY(0);
  }

  .re-drawer-event {
    padding-top: 28px;
  }

  .re-drawer-header h3 {
    font-size: 24px;
  }

  .re-drawer-image {
    max-height: 190px;
  }
}

@media (max-width: 640px) {
  .re-events-shell {
    margin: 28px auto;
    padding: 0 14px;
  }

  .re-calendar-view {
    max-width: 100%;
  }

  .re-events-heading,
  .re-events-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .re-events-nav,
  .re-view-toggle,
  .re-category-filter,
  .re-category-filter > button {
    width: 100%;
  }

  .re-events-nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
  }

  .re-view-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .re-list-intro h2 {
    font-size: 25px;
  }

  .re-list-month {
    font-size: 24px;
    margin: 26px 0 18px;
  }

  .re-event-row {
    gap: 14px;
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 14px;
  }

  .re-event-date {
    min-height: 62px;
  }

  .re-event-title-row {
    display: block;
  }

  .re-status {
    display: inline-flex;
    margin-bottom: 0;
    margin-top: 10px;
  }

  .re-event-title-row h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .re-event-range,
  .re-event-summary p {
    font-size: 14px;
  }

  .re-list-pagination {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .re-page-dots {
    justify-content: center;
    order: -1;
  }

  .re-drawer-facts div {
    gap: 5px;
    grid-template-columns: 1fr;
  }

  .re-drawer-cta {
    width: 100%;
  }
}
