.date-picker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-picker[hidden] { display: none; }

.date-picker-inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  padding: 20px;
  width: 320px;
  max-width: 90vw;
}

.date-picker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dp-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.dp-nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: .15s;
}

.dp-nav:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.dp-day {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: .12s;
}

.dp-day:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

.dp-day.is-out {
  opacity: .3;
}

.dp-day.is-today {
  border-color: var(--accent);
  border-width: 2px;
  color: var(--accent);
  font-weight: 600;
}

.date-picker-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 380px) {
  .date-picker-inner {
    padding: 16px;
    width: 280px;
  }

  .dp-day {
    font-size: 13px;
  }
}
