.datepicker-container {
  position: relative;
  display: inline-block;
}

.datepicker-input {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--font-sm);
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  width: 120px;
  text-align: center;
  transition: border-color 0.2s;
}

.datepicker-input:hover {
  border-color: var(--primary-color);
}

.datepicker-input.range {
  width: 220px;
  text-align: left;
}

.datepicker-input::placeholder {
  color: var(--text-tertiary);
}

.datepicker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 16px;
  min-width: 560px;
}

/* react-day-picker v10 变量覆盖 */
.rdp-root {
  --rdp-accent-color: #36b26a;
  --rdp-accent-background-color: rgba(54, 178, 106, 0.15);

  --rdp-day-height: 36px;
  --rdp-day-width: 36px;

  --rdp-day_button-border-radius: 50%;
  --rdp-day_button-border: none;
  --rdp-day_button-height: 32px;
  --rdp-day_button-width: 32px;

  --rdp-selected-border: none;
  --rdp-disabled-opacity: 0.35;
  --rdp-outside-opacity: 0.35;
  --rdp-today-color: #36b26a;

  --rdp-range_middle-background-color: rgba(54, 178, 106, 0.12);
  --rdp-range_start-color: white;
  --rdp-range_start-date-background-color: #36b26a;
  --rdp-range_end-color: white;
  --rdp-range_end-date-background-color: #36b26a;

  --rdp-nav_button-height: 28px;
  --rdp-nav_button-width: 28px;
  --rdp-nav-height: 36px;

  --rdp-weekday-padding: 6px 0;
}

/* 日历整体 */
.rdp-root {
  font-size: 13px;
  color: var(--text-primary);
}

/* 双月布局 */
.rdp-months {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
}

.rdp-month {
  flex-shrink: 0;
}

/* 星期标题 */
.rdp-weekday {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* 日期按钮 */
.rdp-day_button {
  font-size: 13px;
  font-weight: 400;
  transition: all 0.15s ease;
}

.rdp-day_button:hover:not([disabled]) {
  background-color: rgba(54, 178, 106, 0.1);
}

/* 选中状态（单日期） */
.rdp-selected:not(.rdp-range_start):not(.rdp-range_end):not(.rdp-range_middle) .rdp-day_button {
  background-color: #36b26a;
  color: white;
  font-weight: 600;
}

/* 范围开始 */
.rdp-range_start .rdp-day_button {
  background-color: #36b26a !important;
  color: white !important;
  font-weight: 600;
}

/* 范围结束 */
.rdp-range_end .rdp-day_button {
  background-color: #36b26a !important;
  color: white !important;
  font-weight: 600;
}

/* 范围中间 */
.rdp-range_middle .rdp-day_button {
  background-color: rgba(54, 178, 106, 0.12);
  color: var(--text-primary);
  border-radius: 0;
}

/* 今天（未选中时） */
.rdp-today:not(.rdp-outside):not(.rdp-selected):not(.rdp-range_start):not(.rdp-range_end) .rdp-day_button {
  color: #36b26a;
  font-weight: 600;
  border: 1.5px solid #36b26a;
}

/* 导航按钮 */
.rdp-button_next,
.rdp-button_previous {
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.rdp-button_next:hover,
.rdp-button_previous:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* 年月下拉 */
.rdp-dropdowns {
  gap: 6px;
}

.rdp-dropdown {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  border: none;
  background: transparent;
}

.rdp-dropdown:hover {
  background: var(--bg-secondary);
}

/* 月份标题 */
.rdp-month_caption {
  font-size: 14px;
  font-weight: 600;
}

/* outside days */
.rdp-outside .rdp-day_button {
  color: var(--text-tertiary);
}
