@import "./theme.css";
@import "./utilities.css";

.react-aria-Calendar {
  width: calc(var(--spacing-9) * 7);
  max-width: 100%;
  container-type: inline-size;
  color: var(--text-color);
  font: var(--font-size) system-ui;

  header {
    display: flex;
    align-items: center;
    margin: 0 var(--spacing-1) var(--spacing-4) var(--spacing-1);

    .react-aria-Heading {
      flex: 1;
      margin: 0;
      text-align: center;
      font-size: var(--font-size-lg);
    }
  }

  .react-aria-CalendarGrid {
    border-spacing: 0;
  }

  [slot=errorMessage] {
    font: var(--font-size-sm) system-ui;
    color: var(--invalid-color);
  }
}


.react-aria-CalendarHeaderCell {
  font-size: var(--font-size-sm);
}

.react-aria-CalendarCell {
  --gap: var(--spacing-1);
  width: calc((100cqw / 7) - var(--gap));
  aspect-ratio: 1;
  margin: calc(var(--gap) / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size);
  text-align: center;
  border-radius: 9999px;
  cursor: default;
  forced-color-adjust: none;
  transition: scale 200ms;
  -webkit-tap-highlight-color: transparent;

  @media (min-resolution: 200dpi) {
    @container (width < 300px) {
      --gap: 0px;
    }
  }

  &[data-outside-month] {
    display: none;
  }

  &[data-pressed] {
    scale: 0.9;
  }

  &[data-unavailable] {
    text-decoration: line-through;
    color: var(--invalid-color);
  }

  &[data-invalid] {
    --button-color: var(--invalid-color);
  }
}
