.event-calendar {
  --calendar-border-color: #d8d8d8;
  --calendar-header-color: #777;
  --calendar-sunday-color: #d94c4c;
  --calendar-saturday-color: #3977c5;

  width: 100%;
}

.event-calendar__inner {
  max-width: 800px;
  margin: 0 auto;
}

.event-calendar__title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 2em;
  @media screen and (max-width: 750px){
    text-align: center;
  }
}

.event-calendar__navigation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.event-calendar__range {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.event-calendar__arrow {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    display: block;
    width: 8px;
  }
}

.event-calendar__arrow:hover {
  background: #f5f5f5;
}

.event-calendar__arrow:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.35);
  outline-offset: 2px;
}

.event-calendar__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.event-calendar__months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.event-calendar__month {
  min-width: 0;
}

.event-calendar__month-title {
  margin: 0 0 12px;
  font-size: 20px;
  text-align: center;
}

.event-calendar__table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.event-calendar__table th,
.event-calendar__table td {
  border: 1px solid var(--calendar-border-color);
}

.event-calendar__table th {
  height: 33px;
  padding: 4px 2px;
  background: var(--calendar-header-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.event-calendar__table th.is-sunday {
  background: var(--calendar-sunday-color);
}

.event-calendar__table th.is-saturday {
  background: var(--calendar-saturday-color);
}

.event-calendar__table td {
  height: 57px;
  padding: 8px 5px;
  background: #fff;
  vertical-align: top;
}

.event-calendar__table td.is-empty {
  background: #f5f5f5;
}

.event-calendar__day {
  position: relative;
  text-align: center;
}

.event-calendar__day-number {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1;
}

.event-calendar__day.is-sunday .event-calendar__day-number {
  color: var(--calendar-sunday-color);
}

.event-calendar__day.is-saturday .event-calendar__day-number {
  color: var(--calendar-saturday-color);
}

.event-calendar__day.is-today {
  background: #fffbe5;
  box-shadow: inset 0 0 0 2px #e6ba1a;
}

.event-calendar__count {
  display: block;
  padding: 2px 2px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #222;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.event-calendar__count:hover {
  background: #ddd;
  text-decoration: underline;
}

.event-calendar__count:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.35);
  outline-offset: 1px;
}

@media (max-width: 767px) {
  .event-calendar__navigation {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
    margin-bottom: 16px;
  }

  .event-calendar__arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .event-calendar__range {
    font-size: 17px;
  }

  .event-calendar__months {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .event-calendar__month-title {
    font-size: 18px;
    display: none;
  }

  .event-calendar__table th {
    height: 29px;
    font-size: 12px;
  }

  .event-calendar__table td {
    height: 56px;
    padding: 6px 3px;
  }

  .event-calendar__day-number {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .event-calendar__count {
    padding: 4px 1px;
    font-size: 12px;
  }
}