/* ════════════════════════════════
   CUSTOM DATE PICKER
════════════════════════════════ */
.datepicker-wrap {
  position: relative;
}

.datepicker-input {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 300;
  padding: 14px 44px 14px 16px;
  width: 100%;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s;
  caret-color: transparent;
}
.datepicker-input:focus,
.datepicker-input.open {
  border-color: var(--gold);
}
.datepicker-input::placeholder {
  color: rgba(154,144,128,0.5);
}

.datepicker-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 16px;
  pointer-events: none;
}

/* ── Calendar popup ── */
.datepicker-calendar {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 500;
  background: #1a1713;
  border: 1px solid var(--border);
  padding: 20px;
  width: 300px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.datepicker-calendar.open { display: block; }

/* ── Header ── */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cal-nav {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.cal-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.cal-month-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 1px;
}

/* ── Weekdays ── */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
  gap: 2px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 4px 0;
}
.cal-weekdays span:first-child { color: #b87070; }
.cal-weekdays span:last-child  { color: #7090b8; }

/* ── Day grid ── */
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.cal-day:hover:not(.disabled):not(.empty) {
  background: var(--gold-dim);
  color: var(--gold);
}
.cal-day.empty   { cursor: default; }
.cal-day.disabled {
  color: rgba(154,144,128,0.25);
  cursor: not-allowed;
}
.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.cal-day.selected {
  background: var(--gold) !important;
  color: #0c0b09 !important;
  font-weight: 600;
}
.cal-day.in-range {
  background: rgba(201,165,90,0.15);
  color: var(--gold);
}
.cal-day.range-start { border-radius: 2px 0 0 2px; }
.cal-day.range-end   { border-radius: 0 2px 2px 0; }
.cal-day.sun { color: #c08080; }
.cal-day.sat { color: #8090c0; }
.cal-day.sun.selected,
.cal-day.sat.selected { color: #0c0b09 !important; }

/* ── Footer ── */
.cal-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.cal-clear {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
}
.cal-clear:hover { color: var(--gold); }
