:host {
  display: block;
}

.hb-calendar {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  background-color: var(--hb-color-white, #ffffff);
  border-radius: 4px;
}

/* 头部：年月 + 上下月按钮 */
.hb-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hb-calendar__header-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--hb-color-text-regular, #606266);
}

.hb-calendar__prev-btn,
.hb-calendar__next-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--hb-color-text-regular, #606266);
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.hb-calendar__prev-btn:hover,
.hb-calendar__next-btn:hover {
  color: var(--hb-color-primary);
}

/* 星期行 */
.hb-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.hb-calendar__weekday {
  text-align: center;
  font-size: 12px;
  color: var(--hb-color-text-placeholder, #c0c4cc);
  font-weight: 500;
  padding: 4px 0;
}

/* 日期网格 */
.hb-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hb-calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--hb-color-text-regular, #606266);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  user-select: none;
}

.hb-calendar__day:hover:not(.hb-calendar__day--other-month) {
  background-color: var(--hb-fill-color-light, #f5f7fa);
}

.hb-calendar__day--other-month {
  color: var(--hb-color-text-placeholder, #c0c4cc);
  cursor: default;
}

.hb-calendar__day--today {
  color: var(--hb-color-primary);
  font-weight: 600;
}

.hb-calendar__day--selected {
  background-color: var(--hb-color-primary);
  color: var(--hb-color-white, #ffffff);
}

.hb-calendar__day--selected:hover {
  background-color: var(--hb-color-primary);
}
