:host {
  display: inline-block;
}

.hb-date-range-picker {
  display: inline-block;
  position: relative;
}

.hb-date-range-picker__input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.hb-date-range-picker__input {
  height: var(--hb-size-default, 32px);
  line-height: var(--hb-size-default, 32px);
  width: 140px;
  padding: 0 8px;
  font-size: var(--hb-font-size-base, 14px);
  color: var(--hb-color-text, #606266);
  background-color: var(--hb-color-bg-container, #ffffff);
  border: 1px solid var(--hb-color-border, #dcdfe6);
  border-radius: var(--hb-border-radius-base, 4px);
  box-sizing: border-box;
  cursor: pointer;
  outline: none;
  transition: border-color var(--hb-transition-duration, 0.2s) ease;
}

.hb-date-range-picker__input:hover:not(:disabled) {
  border-color: var(--hb-color-primary, #1677ff);
}

.hb-date-range-picker__separator {
  font-size: var(--hb-font-size-base, 14px);
  color: var(--hb-color-text-secondary, #909399);
}

.hb-date-range-picker__suffix {
  display: inline-flex;
  align-items: center;
  margin-left: -28px;
  pointer-events: none;
}

.hb-date-range-picker__clear {
  cursor: pointer;
  font-size: 16px;
  color: var(--hb-color-text-placeholder, #c0c4cc);
  pointer-events: auto;
  transition: color var(--hb-transition-duration, 0.2s) ease;
}

.hb-date-range-picker__clear:hover {
  color: var(--hb-color-text, #606266);
}

.hb-date-range-picker__icon {
  font-size: 14px;
}

.hb-date-range-picker__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  display: flex;
  gap: 8px;
  padding: 8px;
  background-color: var(--hb-color-bg-container, #ffffff);
  border: 1px solid var(--hb-color-border, #dcdfe6);
  border-radius: var(--hb-border-radius-base, 4px);
  box-shadow: var(--hb-box-shadow-lg, 0 2px 12px 0 rgba(0, 0, 0, 0.1));
  z-index: var(--hb-z-index-dropdown, 1050);
}

.hb-date-range-picker__pane {
  padding: 12px;
  min-width: 280px;
}

.hb-date-range-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hb-date-range-picker__header-label {
  font-weight: 600;
  font-size: var(--hb-font-size-base, 14px);
  color: var(--hb-color-text, #606266);
}

.hb-date-range-picker__prev-btn,
.hb-date-range-picker__next-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--hb-color-text, #606266);
  padding: 4px 8px;
  transition: color var(--hb-transition-duration, 0.2s) ease;
}

.hb-date-range-picker__prev-btn:hover,
.hb-date-range-picker__next-btn:hover {
  color: var(--hb-color-primary, #1677ff);
}

.hb-date-range-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.hb-date-range-picker__weekday {
  text-align: center;
  font-size: var(--hb-font-size-sm, 12px);
  color: var(--hb-color-text-tertiary, #909399);
  font-weight: 500;
}

.hb-date-range-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hb-date-range-picker__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--hb-color-text, #606266);
  cursor: pointer;
  border-radius: var(--hb-border-radius-base, 4px);
  transition: all var(--hb-transition-duration, 0.2s) ease;
}

.hb-date-range-picker__day:hover:not(.hb-date-range-picker__day--other-month) {
  background-color: var(--hb-color-fill-tertiary, #f5f7fa);
}

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

.hb-date-range-picker__day--disabled {
  color: var(--hb-color-text-placeholder, #c0c4cc);
  cursor: not-allowed;
}

.hb-date-range-picker__day--disabled:hover {
  background-color: transparent;
}

.hb-date-range-picker__day--today {
  color: var(--hb-color-primary, #1677ff);
  font-weight: 600;
}

.hb-date-range-picker__day--in-range {
  background-color: var(--hb-color-primary-bg, #e6f4ff);
  border-radius: 0;
}

.hb-date-range-picker__day--start,
.hb-date-range-picker__day--end {
  background-color: var(--hb-color-primary, #1677ff);
  color: var(--hb-color-text-inverse, #ffffff);
}

.hb-date-range-picker--small .hb-date-range-picker__input {
  height: var(--hb-size-sm, 24px);
  line-height: var(--hb-size-sm, 24px);
  font-size: var(--hb-font-size-sm, 12px);
}

.hb-date-range-picker--large .hb-date-range-picker__input {
  height: var(--hb-size-lg, 40px);
  line-height: var(--hb-size-lg, 40px);
  font-size: var(--hb-font-size-lg, 16px);
}

.hb-date-range-picker--disabled {
  cursor: not-allowed;
}

.hb-date-range-picker--disabled .hb-date-range-picker__input {
  background-color: var(--hb-color-fill-tertiary, #f5f7fa);
  color: var(--hb-color-text-disabled, #c0c4cc);
  cursor: not-allowed;
}
