.month-block {
  width: calc(7 * 2rem);
  display: flex;
  flex-direction: column;
}

.month-title {
  height: 2rem;
  font-size: 1rem;
  font-weight: 500;
  background: #000;
  color: #fff;
  font-family: var(--font-family-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 2rem);
  grid-template-rows: repeat(7, 2rem);
  font-family: var(--font-family-secondary);
  font-weight: 200;
  font-size: 0.75rem;
}

.cell {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell.day {
  position: relative;
}

.cell.day {
  position: relative;
}

.cell.header {
  background: #f5f5f5;
}

.cell[data-weekday="0"] {
  background: #b6b6b6;
}

.cell[data-weekday="6"] {
  background: #d3d3d3;
}

.calendar-year {
  display: grid;
  grid-template-columns: repeat(4, calc(7 * 2rem));
  column-gap: 0.5rem;
  row-gap: 0.5rem;
  align-items: start;
}

.cell.day.marked {
  background: #000;
  color: #fff;
}

.cell.day.out-month {
  opacity: 0.2;
}

.cell.day.holiday {
  background: #f1f1f1;
  color: #2b2b2b;
}

.cell.day.holiday::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2b2b2b;
}

.cell.day.season {
  background: #f7f2e9;
}

.cell.day.season-range {
  background: #f7f2e9;
}

.cell.day.season-summer {
  background: #fff6dc;
}

.cell.day.season-autumn {
  background: #f8eee3;
}

.cell.day.season-winter {
  background: #eef5fb;
}

.cell.day.season-spring {
  background: #eef9f1;
}

.cell.day.season-range.season-summer {
  background: #fff6dc;
}

.cell.day.season-range.season-autumn {
  background: #f8eee3;
}

.cell.day.season-range.season-winter {
  background: #eef5fb;
}

.cell.day.season-range.season-spring {
  background: #eef9f1;
}

.cell.day.season.season-range.season-summer {
  background: #ffeec2;
}

.cell.day.season.season-range.season-autumn {
  background: #f2e0cf;
}

.cell.day.season.season-range.season-winter {
  background: #e0edf7;
}

.cell.day.season.season-range.season-spring {
  background: #e2f5e8;
}

.cell.day.season::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #2b2b2b;
  opacity: 0.6;
}

.cell.day.marked.season::before {
  background: #fff;
}

.cell.day.marked,
.cell.day.marked.holiday {
  background: #000;
  color: #fff;
}

.cell.day.marked.holiday::after {
  background: #fff;
}

.cell.day.marked.season-range {
  background: #000;
  color: #fff;
}

.cell.day.marked.filtered-out {
  opacity: 0.25;
}

.cell.day.holiday {
  box-shadow: inset 0 0 0 1px #8d8d8d;
}

.cell.day.holiday::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2b2b2b;
}

.calendar-tooltip {
  position: absolute;
  max-width: 220px;
  padding: 0.4rem 0.6rem;
  background: #111;
  color: #fff;
  font-family: var(--font-family-secondary);
  font-size: 0.7rem;
  line-height: 1.3;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--box-shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  white-space: pre-line;
  z-index: var(--z-index-tooltip);
}

.cell.day.note {
  background-image: radial-gradient(
    circle at 6px calc(100% - 6px),
    rgba(0, 0, 0, 0.55) 0 2px,
    transparent 3px
  );
  background-repeat: no-repeat;
}

.cell.day.marked.note {
  background-image: radial-gradient(
    circle at 6px calc(100% - 6px),
    #ffffff 0 2px,
    transparent 3px
  );
}

.note-editor {
  position: absolute;
  width: 240px;
  background: #fff7d6;
  border: 1px solid #e3d3a4;
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow-md);
  padding: 0.6rem;
  z-index: var(--z-index-popover);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.note-editor.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.note-editor__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-family: var(--font-family-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.note-editor__close {
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.note-editor__textarea {
  width: 100%;
  border: 1px solid #e3d3a4;
  border-radius: var(--border-radius-sm);
  padding: 0.4rem;
  font-family: var(--font-family-secondary);
  font-size: 0.75rem;
  resize: vertical;
  background: #fffdf4;
}

.note-editor__actions {
  margin-top: 0.4rem;
  display: flex;
  justify-content: flex-end;
}

.note-editor__save {
  border: none;
  background: #2b2b2b;
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-family-primary);
  font-size: 0.7rem;
  cursor: pointer;
}
