.wp-block-calendar {
  caption {
    padding: 1em 0;
    font-weight: var(--wp--custom--font-weight--medium);
  }

  table {
    border: 0;
    line-height: 1;
    text-align: center;
    background: var(--wp--custom--elements-calendar--background, var(--wp--preset--color--neutral-0));
    border-radius: var(--wp-custom-elements-calendar--radius, var(--wp--custom--border-radius--small));
  }

  table:where(:not(.has-text-color)) {
    color: inherit;
  }

  table:where(:not(.has-text-color)) td,
  table:where(:not(.has-text-color)) th {
    border-color: var(--wp--custom--border--color);
  }

  td,
  th {
    padding: 1em 0;
    text-align: center;
  }

  td a,
  th a {
    padding: .5em;
    margin: -.5em;
    border-radius: 99px;
    width: 2em;
    line-height: 1;
    background: transparent !important;
    position: relative;
    z-index: 0;
  }

  a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
  }

  a:hover {
    text-decoration: none;
  }

  td a::before,
  th a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentcolor;
    opacity: 0.1;
    transition: var(--wp--custom--transition);
    border-radius: inherit;
    z-index: -1;
  }

  thead th:first-of-type {
    border-top-left-radius: inherit;
  }

  thead th:last-of-type {
    border-top-right-radius: inherit;
  }

  nav {
    padding: 1em 0;
  }
}

:where(.wp-block-calendar table:not(.has-background) th) {
  background: var(--wp--preset--color--neutral-200);
}

