/* ── Nyxia Date Picker v2 ───────────────────────────────────────── */

/* Popup — always on body, position:fixed via JS */
.nyx-dp-popup {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.20);
  border: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
  user-select: none;
  min-width: 320px;
}

/* Header */
.nyx-dp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--nyx-dp-primary, var(--nyx-primary, #2A5C43));
  color: #fff;
}
.nyx-dp-month-label { font-weight: 700; font-size: .95rem; }
.nyx-dp-nav {
  background: rgba(255,255,255,.18); border: none; border-radius: 8px;
  color: #fff; width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: background .15s; padding: 0;
}
.nyx-dp-nav:hover { background: rgba(255,255,255,.32); }

/* Day-of-week */
.nyx-dp-dow {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 10px 12px 4px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  color: rgba(0,0,0,.4); text-align: center;
}

/* Days */
.nyx-dp-days {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 2px 12px 12px;
  gap: 2px;
}
.nyx-dp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: .83rem; cursor: pointer;
  transition: background .1s, color .1s;
  color: #222; position: relative;
}
.nyx-dp-day:hover:not(.nyx-dp-day--past):not(.nyx-dp-day--blocked):not(.nyx-dp-day--empty) {
  background: rgba(42,92,67,.13);
}
.nyx-dp-day--empty       { pointer-events: none; }
.nyx-dp-day--past        { color: #ccc; pointer-events: none; }
.nyx-dp-day--blocked     { color: #ddd; pointer-events: none; text-decoration: line-through; }
.nyx-dp-day--weekend     { color: #5a8a6a; }
.nyx-dp-day--today       { box-shadow: inset 0 0 0 2px var(--nyx-dp-primary, var(--nyx-primary, #2A5C43)); font-weight: 700; }
.nyx-dp-day--start,
.nyx-dp-day--end {
  background: var(--nyx-dp-primary, var(--nyx-primary, #2A5C43)) !important;
  color: #fff !important; font-weight: 700; border-radius: 50%;
}
.nyx-dp-day--in-range {
  background: rgba(42,92,67,.1);
  border-radius: 0;
  color: #1a2f26;
}
/* first/last cell of a range row — round only the outer side */
.nyx-dp-day--start.nyx-dp-day--in-range { border-radius: 50% 0 0 50%; }
.nyx-dp-day--end.nyx-dp-day--in-range   { border-radius: 0 50% 50% 0; }

/* Footer */
.nyx-dp-footer {
  border-top: 1px solid rgba(0,0,0,.07);
  padding: 9px 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: rgba(0,0,0,.45);
}
.nyx-dp-hint   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nyx-dp-clear  {
  background: none; border: none; color: #c0392b; cursor: pointer;
  font-size: .8rem; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; transition: background .15s;
}
.nyx-dp-clear:hover { background: rgba(192,57,43,.08); }

/* Backdrop */
.nyx-dp-backdrop {
  display: none; position: fixed; inset: 0; z-index: 999998;
  background: transparent; /* just catches clicks */
}
.nyx-dp-backdrop.active { display: block; }
