.hac-calendar {
  --hac-border: #dedede;
  --hac-muted: #e0e0e0;
  --hac-text: #525252;
  --hac-accent: #55705b;
  width: 100%;
  color: var(--hac-text);
}

.hac-header {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto minmax(60px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.hac-current-month {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  text-align: center;
}

.hac-month-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 1rem;
}

.hac-month-button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.hac-prev {
  justify-self: start;
}

.hac-next {
  justify-self: end;
}

.hac-month-button > span[aria-hidden='true'] {
  font-size: 2rem;
  line-height: 1;
}

.hac-status {
  min-height: 1.5em;
  margin: 8px 0;
  text-align: center;
  font-size: 0.9rem;
}

.hac-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--hac-border);
  border-left: 1px solid var(--hac-border);
}

.hac-weekday,
.hac-day {
  border-right: 1px solid var(--hac-border);
  border-bottom: 1px solid var(--hac-border);
}

.hac-weekday {
  padding: 9px 3px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
}

.hac-weekday.is-saturday {
  color: #376a9f;
}

.hac-weekday.is-sunday {
  color: #a44c4c;
}

.hac-day {
  position: relative;
  min-height: clamp(64px, 11vw, 105px);
  padding: 7px;
  background: #fff;
  user-select: none;
  pointer-events: none;
}

.hac-day.is-empty,
.hac-day.is-past,
.hac-day.is-closed {
  background: var(--hac-muted);
}

.hac-day-number {
  display: block;
  font-size: 0.95rem;
  line-height: 1;
}

.hac-day-mark {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--hac-accent);
}

.hac-day.is-full .hac-day-mark {
  color: #a65b4e;
}

.hac-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 0.82rem;
}

.hac-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hac-legend i {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hac-border);
  font-style: normal;
  background: #fff;
}

.hac-legend-available {
  color: var(--hac-accent);
}

.hac-legend-future {
  color: var(--hac-accent);
}

.hac-legend-full {
  color: #a65b4e;
}

.hac-legend-closed {
  background: var(--hac-muted) !important;
}

.hac-error {
  color: #b42318;
}

@media (max-width: 600px) {
  .hac-header {
    gap: 4px;
  }

  .hac-day {
    min-height: 58px;
    padding: 5px;
  }

  .hac-weekday {
    padding: 7px 2px;
    font-size: 0.8rem;
  }

  .hac-day-number {
    font-size: 0.82rem;
  }

  .hac-month-button {
    padding-inline: 4px;
  }
}
