.localgov-add-to-calendar:has(+ *) {
  margin-block-end: var(--vertical-rhythm-spacing);
}

.localgov-add-to-calendar__trigger {
  display: flex;
  gap: var(--spacing);
  align-items: center;
  svg path {
    fill: var(--add-to-calendar--icon-color);
  }
  &:focus svg path,
  &:hover svg path {
    fill: var(--add-to-calendar--icon-color-hover);
  }
}

.localgov-add-to-calendar__dialog {
  overflow: auto;
  width: var(--add-to-calendar-dialog-width);
  max-width: var(--add-to-calendar-dialog-max-width);
  height: var(--add-to-calendar-dialog-height);
  max-height: var(--add-to-calendar-dialog-max-height);
  margin: auto;
}

.localgov-add-to-calendar__dialog[open] {
  display: flex;
  flex-direction: column;
}

.localgov-add-to-calendar__dialog-close {
  display: flex;
  justify-content: end;
}

.localgov-add-to-calendar__dialog::backdrop {
  opacity: var(--add-to-calendar-dialog-backdrop-opacity);
  background-color: var(--add-to-calendar-dialog-backdrop-color);
}

.localgov-add-to-calendar__items {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
}

.localgov-add-to-calendar__item + .localgov-add-to-calendar__item {
  margin-block-start: var(--spacing);
}
