.wdx-ev-month {
  --wdx-ev-lane: 1.75rem;
  --wdx-ev-cell-pad: 6px;
  --wdx-ev-cell-line: 1px;
  display: grid;
  gap: 8px;
}

.wdx-ev-month__grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--wdx-ev-line);
  border-radius: var(--wdx-ev-radius-sm);
  background: var(--wdx-ev-bg);
}

.wdx-ev-month__caption {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wdx-ev-month__weekday {
  padding: 10px var(--wdx-ev-cell-pad);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: start;
  text-transform: uppercase;
  background: var(--wdx-ev-surface);
  border-block-end: var(--wdx-ev-cell-line) solid var(--wdx-ev-line);
}
.wdx-ev-month__weekday:first-child {
  border-start-start-radius: calc(var(--wdx-ev-radius-sm) - 1px);
}
.wdx-ev-month__weekday:last-child {
  border-start-end-radius: calc(var(--wdx-ev-radius-sm) - 1px);
}
.wdx-ev-month__weekday abbr {
  text-decoration: none;
  cursor: default;
}

.wdx-ev-month__day {
  position: relative;
  height: 8rem;
  padding: 4px var(--wdx-ev-cell-pad) 8px;
  vertical-align: top;
  border-inline-end: var(--wdx-ev-cell-line) solid transparent;
  border-block-end: var(--wdx-ev-cell-line) solid transparent;
  border-color: var(--wdx-ev-line);
  background: var(--wdx-ev-bg);
}
.wdx-ev-month__day:last-child {
  border-inline-end-color: transparent;
}
.wdx-ev-month__day--other {
  background: var(--wdx-ev-soft);
}
.wdx-ev-month__day--other .wdx-ev-month__daynum {
  color: var(--wdx-ev-muted);
}
.wdx-ev-month__day:has(.wdx-ev-month__daylink:focus-visible) {
  box-shadow: inset 0 0 0 2px var(--wdx-ev-ink);
}

.wdx-ev-month__week:last-child .wdx-ev-month__day {
  border-block-end-color: transparent;
}
.wdx-ev-month__week:last-child .wdx-ev-month__day:first-child {
  border-end-start-radius: calc(var(--wdx-ev-radius-sm) - 1px);
}
.wdx-ev-month__week:last-child .wdx-ev-month__day:last-child {
  border-end-end-radius: calc(var(--wdx-ev-radius-sm) - 1px);
}

.wdx-ev-month__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 6px;
  margin-block-end: 4px;
}

.wdx-ev-month__daylink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 2px 6px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
}
.wdx-ev-month__daylink:hover .wdx-ev-month__daynum {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.wdx-ev-month__date {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wdx-ev-month__day--today .wdx-ev-month__daylink {
  background: var(--wdx-ev-ink);
  color: var(--wdx-ev-bg);
}

.wdx-ev-month__today {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.wdx-ev-month__events {
  display: grid;
  gap: 3px;
}

.wdx-ev-month__event {
  position: relative;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.wdx-ev-month__link {
  display: block;
  min-height: 24px;
  padding: 3px 6px;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .wdx-ev-month__link {
    transition: none;
  }
}
html[data-wdx-motion=reduce] .wdx-ev-month__link {
  transition: none;
}

.wdx-ev-month__link:hover {
  background: var(--wdx-ev-surface);
}
.wdx-ev-month__link:hover .wdx-ev-month__title {
  text-decoration: underline;
}
.wdx-ev-month__link:focus-visible {
  position: relative;
  z-index: 4;
}

.wdx-ev-month__time {
  display: block;
  font-weight: 700;
}

.wdx-ev-month__title {
  overflow-wrap: anywhere;
}

.wdx-ev-month__cost {
  display: block;
  font-size: 0.75rem;
  color: var(--wdx-ev-muted);
}

.wdx-ev-month__star {
  margin-inline-end: 3px;
}

.wdx-ev-month__status {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 0 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
  border: 1px solid currentColor;
  border-radius: 4px;
}

.wdx-ev-month__event--canceled .wdx-ev-month__title {
  text-decoration: line-through;
}

.wdx-ev-month__cat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline: 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--wdx-ev-muted);
}
.wdx-ev-month__cat::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--wdx-ev-chip, var(--wdx-ev-edge));
}

.wdx-ev-month__event:not(.wdx-ev-month__event--span) > .wdx-ev-month__link {
  box-shadow: inset 3px 0 0 var(--wdx-ev-cat, transparent);
}

[dir=rtl] .wdx-ev-month__event:not(.wdx-ev-month__event--span) > .wdx-ev-month__link {
  box-shadow: inset -3px 0 0 var(--wdx-ev-cat, transparent);
}

.wdx-ev-month__gap,
.wdx-ev-month__event--span {
  height: var(--wdx-ev-lane);
}

.wdx-ev-month__event--bar {
  z-index: 2;
}
.wdx-ev-month__event--bar > .wdx-ev-month__link {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  width: calc(var(--wdx-ev-span, 1) * 100% + (var(--wdx-ev-span, 1) - 1) * (2 * var(--wdx-ev-cell-pad) + var(--wdx-ev-cell-line)));
  height: var(--wdx-ev-lane);
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  border-inline-start: 4px solid var(--wdx-ev-cat, var(--wdx-ev-ink));
  background: color-mix(in srgb, var(--wdx-ev-cat, var(--wdx-ev-ink)) 12%, var(--wdx-ev-bg));
}
.wdx-ev-month__event--bar > .wdx-ev-month__link:hover {
  background: color-mix(in srgb, var(--wdx-ev-cat, var(--wdx-ev-ink)) 22%, var(--wdx-ev-bg));
}
.wdx-ev-month__event--bar > .wdx-ev-month__link:hover, .wdx-ev-month__event--bar > .wdx-ev-month__link:focus-visible {
  z-index: 5;
  height: auto;
  min-height: var(--wdx-ev-lane);
  white-space: normal;
}
.wdx-ev-month__event--bar > .wdx-ev-month__link:hover .wdx-ev-month__title, .wdx-ev-month__event--bar > .wdx-ev-month__link:focus-visible .wdx-ev-month__title {
  overflow: visible;
  white-space: normal;
}
.wdx-ev-month__event--bar > .wdx-ev-month__link .wdx-ev-month__time {
  display: inline;
  flex: none;
}
.wdx-ev-month__event--bar > .wdx-ev-month__link .wdx-ev-month__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wdx-ev-month__event--bar.wdx-ev-month__event--before > .wdx-ev-month__link {
  inset-inline-start: calc(-1 * var(--wdx-ev-cell-pad));
  width: calc(var(--wdx-ev-span, 1) * 100% + (var(--wdx-ev-span, 1) - 1) * (2 * var(--wdx-ev-cell-pad) + var(--wdx-ev-cell-line)) + var(--wdx-ev-cell-pad));
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-inline-start-style: dashed;
}
.wdx-ev-month__event--bar.wdx-ev-month__event--after > .wdx-ev-month__link {
  width: calc(var(--wdx-ev-span, 1) * 100% + (var(--wdx-ev-span, 1) - 1) * (2 * var(--wdx-ev-cell-pad) + var(--wdx-ev-cell-line)) + var(--wdx-ev-cell-pad));
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}
.wdx-ev-month__event--bar.wdx-ev-month__event--before.wdx-ev-month__event--after > .wdx-ev-month__link {
  width: calc(var(--wdx-ev-span, 1) * 100% + (var(--wdx-ev-span, 1) - 1) * (2 * var(--wdx-ev-cell-pad) + var(--wdx-ev-cell-line)) + 2 * var(--wdx-ev-cell-pad));
}

.wdx-ev-month__event--cont .wdx-ev-month__cont-note {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.wdx-ev-month__event--cont > .wdx-ev-month__link {
  display: none;
}

.wdx-ev-month__more {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-block-start: 4px;
  padding: 2px 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: underline;
}
.wdx-ev-month__more:hover {
  text-decoration-thickness: 2px;
}

.wdx-ev-month__keys {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wdx-ev-month:has(.wdx-ev-month__daylink:focus-visible) .wdx-ev-month__keys {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  font-size: 0.875rem;
  color: var(--wdx-ev-muted);
}

@container wdx-ev (max-width: 760px) {
  .wdx-ev-month__grid,
  .wdx-ev-month__grid > tbody,
  .wdx-ev-month__week,
  .wdx-ev-month__day {
    display: block;
    width: auto;
    height: auto;
  }
  .wdx-ev-month__grid {
    border: 0;
    background: transparent;
  }
  .wdx-ev-month__grid > thead {
    display: none;
  }
  .wdx-ev-month__grid > tbody {
    display: grid;
    gap: 12px;
  }
  .wdx-ev-month__week {
    display: contents;
  }
  .wdx-ev-month__day--empty,
  .wdx-ev-month__day--other {
    display: none;
  }
  .wdx-ev-month__grid .wdx-ev-month__week .wdx-ev-month__day {
    padding: 12px 14px 14px;
    border: 1px solid var(--wdx-ev-line);
    border-radius: var(--wdx-ev-radius-sm);
    background: var(--wdx-ev-bg);
  }
  .wdx-ev-month__head {
    justify-content: flex-start;
    margin-block-end: 8px;
  }
  .wdx-ev-month__daylink {
    justify-content: flex-start;
    min-height: 24px;
    padding: 0;
    font-family: var(--wdx-ev-font-display);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    background: none !important;
    color: inherit !important;
  }
  .wdx-ev-month__daylink:hover .wdx-ev-month__date {
    text-decoration: underline;
  }
  .wdx-ev-month__daynum {
    display: none;
  }
  .wdx-ev-month__date {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
  }
  .wdx-ev-month__day--today .wdx-ev-month__today {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--wdx-ev-ink);
    color: var(--wdx-ev-bg);
  }
  .wdx-ev-month__events {
    gap: 6px;
  }
  .wdx-ev-month__event {
    font-size: 0.9375rem;
  }
  .wdx-ev-month__gap {
    display: none;
  }
  .wdx-ev-month__event--span {
    height: auto;
  }
  .wdx-ev-month__event--bar > .wdx-ev-month__link,
  .wdx-ev-month__event--cont > .wdx-ev-month__link {
    position: static;
    display: block;
    width: auto !important;
    height: auto;
    white-space: normal;
    border-inline-start: 4px solid var(--wdx-ev-cat, var(--wdx-ev-ink));
    border-radius: 6px;
    background: color-mix(in srgb, var(--wdx-ev-cat, var(--wdx-ev-ink)) 12%, var(--wdx-ev-bg));
    font-weight: 700;
  }
  .wdx-ev-month__event--bar > .wdx-ev-month__link .wdx-ev-month__title,
  .wdx-ev-month__event--cont > .wdx-ev-month__link .wdx-ev-month__title {
    white-space: normal;
  }
  .wdx-ev-month__event--before > .wdx-ev-month__link {
    inset-inline-start: auto;
  }
  .wdx-ev-month__event--cont .wdx-ev-month__cont-note {
    display: none;
  }
  .wdx-ev-month__time {
    display: inline;
    margin-inline-end: 6px;
  }
  .wdx-ev-month__link {
    padding: 6px 10px;
  }
  .wdx-ev-month__cat {
    padding-inline: 10px;
  }
}
@media print {
  .wdx-ev-month__day {
    break-inside: avoid;
  }
}
