.wrapper {
  position: relative;
  display: inline-block;
}

.trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  min-width: 130px;
  transition: border-color 0.15s;
}

.trigger:hover,
.trigger:focus {
  border-color: var(--color-primary);
}

.placeholder {
  color: var(--color-text-disabled);
}

.calendarIcon {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.clearBtn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.clearBtn:hover {
  color: var(--color-text-primary);
}

.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  background: var(--color-bg-dropdown);
  border: 1px solid var(--color-border-card);
  border-radius: 12px;
  box-shadow:
    0 8px 32px var(--color-shadow-dropdown),
    inset 0 1px 0 var(--color-inset-highlight);
  backdrop-filter: var(--bf-glass-md);
  -webkit-backdrop-filter: var(--bf-glass-md);
  padding: 12px;
  min-width: 280px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.navBtn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.navBtn:hover {
  background: var(--color-inset-highlight);
  color: var(--color-text-primary);
}

.monthLabel {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.weekRow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}

.weekDay {
  font-size: 11px;
  color: var(--color-text-disabled);
  padding: 4px 0;
  user-select: none;
}

.daysGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dayCell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: none;
  background: none;
  color: var(--color-text-primary);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.1s;
}

.dayCell:hover {
  background: var(--color-info-bg-soft);
}

.otherMonth {
  color: var(--color-text-disabled);
  opacity: 0.4;
}

.today {
  border: 1px solid var(--color-primary);
}

.selected {
  background: var(--color-primary) !important;
  color: var(--color-on-primary) !important;
}
