.employee-month {
  container-type: inline-size;
  min-width: 0;
  border: 1px solid var(--line, #dce4ed);
  background: var(--paper, #fff);
}

.employee-month-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line, #dce4ed);
}

.employee-month-title {
  margin: 0;
  color: var(--navy, #203652);
  font-size: 19px;
  letter-spacing: -.022em;
}

.employee-month-period,
.employee-month-message {
  margin: 3px 0 0;
  color: var(--muted, #526176);
  font-size: 13px;
}
.employee-month-period { text-transform: capitalize; }

.employee-month-actions { display: flex; align-items: center; gap: 6px; }
.employee-month-actions .button, .employee-month-move { min-height: 44px; }
.employee-month-move { min-width: 44px; }

.employee-month-project { --event-ink: #3c526d; --event-fill: #e7eef6; }
.employee-month-job { --event-ink: #86431e; --event-fill: #faecdf; }
.employee-month-meeting { --event-ink: #385e50; --event-fill: #e1f0e8; }

.employee-month-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  padding: 0;
  color: var(--muted, #526176);
  font-size: 12px;
  list-style: none;
}

.employee-month-legend-item,
.employee-month-event-type {
  display: flex;
  align-items: center;
  gap: 6px;
}

.employee-month-legend-item::before,
.employee-month-event-type::before,
.employee-month-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--event-ink);
}

.employee-month-legend-item::before,
.employee-month-event-type::before { content: ''; }

.employee-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line, #dce4ed);
  background: var(--line, #dce4ed);
}

.employee-month-weekday,
.employee-month-gap {
  padding: 6px 8px;
  color: var(--muted, #526176);
  background: #f4f7fa;
  font-size: 12px;
  font-weight: 650;
}

.employee-month-date {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  min-height: 79px;
  padding: 4px 5px 6px;
  border: 0;
  color: var(--navy, #203652);
  background: var(--paper, #fff);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.employee-month-date:hover { background: #f1f6fa; }
.employee-month-date[aria-pressed='true'] {
  background: #e9f2fb;
  box-shadow: inset 0 0 0 2px #5c83aa;
}

.employee-month-date:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #28537c;
  outline-offset: -3px;
}

.employee-month-date-top {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.employee-month-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  min-height: 22px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.employee-month-date[aria-current='date'] .employee-month-day-number {
  color: #fff;
  background: #2f567c;
}

.employee-month-date-month,
.employee-month-more {
  min-width: 0;
  overflow: hidden;
  color: var(--muted, #526176);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-month-previews { display: grid; gap: 2px; min-width: 0; }
.employee-month-chip {
  overflow: hidden;
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--event-ink);
  background: var(--event-fill);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-month-more { padding-inline: 3px; }
.employee-month-dots { display: none; }

.employee-month-agenda { padding: 12px 15px 15px; }
.employee-month-agenda-title {
  margin: 0;
  color: var(--navy, #203652);
  font-size: 15px;
  text-transform: capitalize;
}

.employee-month-agenda-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr));
  gap: 9px 16px;
}

.employee-month-event-group { min-width: 0; margin-top: 8px; }
.employee-month-event-type {
  margin: 0 0 4px;
  color: var(--event-ink);
  font-size: 12px;
  font-weight: 750;
}

.employee-month-event-list { margin: 0; padding: 0; list-style: none; }
.employee-month-event {
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 4px 0;
  overflow-wrap: anywhere;
}

.employee-month-event-title {
  color: var(--navy, #203652);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 2px;
}

.employee-month-event a:focus-visible { outline-offset: 3px; }
.employee-month-event-detail { color: var(--muted, #526176); font-size: 12px; }

.employee-month-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@container (max-width: 560px) {
  .employee-month-header { gap: 10px 12px; padding-inline: 12px; }
  .employee-month-agenda { padding-inline: 12px; }
  .employee-month-weekday { padding-inline: 1px; font-size: 11px; text-align: center; }
  .employee-month-date { min-height: 53px; padding: 3px 1px 2px; }
  .employee-month-date-top { flex-direction: column; gap: 0; }
  .employee-month-date-month { max-width: 100%; font-size: 9px; }
  .employee-month-previews { display: none; }
  .employee-month-dots { display: flex; justify-content: center; gap: 2px; }
  .employee-month-dot { width: 5px; height: 5px; }
}

@container (max-width: 370px) {
  .employee-month-actions { gap: 4px; }
  .employee-month-actions .button { padding-inline: 9px; }
  .employee-month-legend { flex-basis: 100%; }
}
