/* Vault: Components/Forms/Calendar Time Picker/calendar-picker
   Recolour only - P3 primary #0ea5e9 / #0284c7 / #0369a1 / #e0f2fe
   ASAP toggle omitted (date always visible). Past dates allowed. */

/* Hide native day/month/year selects from the old DateSelect SSR markup */
select[aria-label="Day"],
select[aria-label="Month"],
select[aria-label="Year"] { display: none !important; }

.nwg-datetime-reveal {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .2s ease, margin .2s ease;
  opacity: 0;
  margin-bottom: 0;
}
.nwg-datetime-reveal.show {
  max-height: 600px;
  overflow: visible;
  opacity: 1;
  margin-bottom: .5rem;
}

.nwg-dtp { position: relative; }
.nwg-dtp-fp-wrap {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .6875rem .875rem;
  border: 1px solid #eff0f6;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  cursor: pointer;
  user-select: none;
}
.nwg-dtp-fp-wrap.is-open {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14,165,233,.1);
  border-bottom-color: #e0e5e4;
}
.nwg-dtp-fp-wrap svg.nwg-dtp-cal-icon { color: #0ea5e9; flex-shrink: 0; }
.nwg-dtp-date-inp {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-family: inherit;
  color: #101b22;
  font-weight: 500;
  padding: 0;
  min-width: 0;
  cursor: text;
}
.nwg-dtp-date-inp::placeholder { color: #9ca3af; font-weight: 500; }

@media (pointer: coarse) {
  .nwg-dtp-date-inp { pointer-events: none; caret-color: transparent; }
}

.nwg-date-err { display: none; font-size: .75rem; font-weight: 600; color: #dc2626; margin-top: .25rem; }
.nwg-date-err.show { display: block; }

.nwg-dtp-panel {
  display: none;
  position: fixed;
  background: #fff;
  border: 1px solid #0ea5e9;
  box-shadow: 0 4px 16px rgba(16,24,40,.13);
  z-index: 9999;
  box-sizing: border-box;
}
.nwg-dtp-panel.is-open { display: block; }

@media (max-width: 640px) {
  .nwg-dtp-panel {
    bottom: 0 !important; left: 0 !important;
    right: 0 !important; top: auto !important;
    width: 100% !important; min-width: 0 !important;
    max-height: 82vh !important; overflow-y: auto !important;
    border: none;
    border-top: 2px solid #0ea5e9;
    border-radius: 0;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: block;
    visibility: hidden;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    box-shadow: 0 -8px 32px rgba(0,0,0,.18);
  }
  .nwg-dtp-panel.is-open {
    transform: translateY(0);
    visibility: visible;
  }
}

.nwg-dtp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 9998;
  -webkit-tap-highlight-color: transparent;
}
.nwg-dtp-backdrop.is-open { display: block; }

.nwg-dtp-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #eff0f6;
}
.nwg-dtp-nav-grp { display: flex; gap: 3px; flex-shrink: 0; }
.nwg-dtp-nav-btn {
  width: 32px; height: 36px;
  border: 1px solid #eff0f6;
  background: #f8fafc;
  font-size: 1.25rem; line-height: 1;
  color: #344054;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0;
  transition: background .12s;
  font-family: inherit; padding: 0;
}
.nwg-dtp-nav-btn:hover { background: #e0f2fe; color: #0ea5e9; }

.nwg-cus-sel { position: relative; flex: 1; min-width: 0; }
.nwg-cus-sel-btn {
  width: 100%; height: 36px;
  border: 1px solid #eff0f6;
  background: #f8fafc;
  font-size: 1rem; font-family: inherit;
  color: #101b22; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px;
  border-radius: 0;
  gap: 4px; white-space: nowrap;
}
.nwg-cus-sel-btn:hover,
.nwg-cus-sel-btn.is-open { border-color: #0ea5e9; background: #fff; }
.nwg-cus-sel-btn svg { flex-shrink: 0; color: #778697; transition: transform .15s; }
.nwg-cus-sel-btn.is-open svg { transform: rotate(180deg); }
.nwg-cus-sel-opts {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid #0ea5e9;
  border-top: none;
  z-index: 10001;
  max-height: 180px;
  overflow-y: auto;
}
.nwg-cus-sel-opts.is-open { display: block; }
.nwg-cus-sel-opt {
  width: 100%; border: none; background: none;
  text-align: left; padding: 8px 10px;
  font-size: 1rem; font-family: inherit;
  color: #344054; cursor: pointer; display: block;
}
.nwg-cus-sel-opt:hover { background: #e0f2fe; color: #0ea5e9; }
.nwg-cus-sel-opt.active { background: #0ea5e9; color: #fff; font-weight: 700; }

.nwg-dtp-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px 8px 2px; gap: 2px;
}
.nwg-dtp-dow {
  text-align: center;
  font-size: .6875rem; font-weight: 700;
  color: #778697; padding: 3px 0;
}

.nwg-dtp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 2px 8px 8px; gap: 2px;
}
.nwg-cal-day {
  display: flex; align-items: center; justify-content: center;
  font-size: .825rem; font-weight: 500;
  color: #344054;
  cursor: pointer;
  border: none; background: none;
  border-radius: 0 !important;
  min-height: 38px; width: 100%;
  transition: background .1s, color .1s;
  font-family: inherit; padding: 0;
}
.nwg-cal-day:hover:not(.disabled):not(.other-month) {
  background: #e0f2fe; color: #0ea5e9;
  border-radius: 0 !important;
}
.nwg-cal-day.other-month { color: #d0d5dd; pointer-events: none; }
.nwg-cal-day.disabled    { color: #d0d5dd; cursor: not-allowed; pointer-events: none; }
.nwg-cal-day.today {
  background: #0ea5e9; color: #fff;
  font-weight: 700; border-radius: 0 !important;
}
.nwg-cal-day.today:hover { background: #0284c7; border-radius: 0 !important; }
.nwg-cal-day.selected {
  background: #0ea5e9; color: #fff;
  font-weight: 700;
  outline: 2px solid #0369a1; outline-offset: 1px;
}
.nwg-cal-day.today.selected { outline-offset: 2px; }
@media (max-width: 640px) {
  .nwg-cal-day { min-height: 44px; }
}

.nwg-dtp-footer {
  display: flex; align-items: center;
  gap: 8px; padding: 8px 10px;
  border-top: 1px solid #eff0f6;
}
.nwg-dtp-today-btn,
.nwg-dtp-cancel-btn {
  flex: 1; height: 40px; border: none;
  font-size: .85rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  border-radius: 0; transition: background .12s; padding: 0;
}
.nwg-dtp-today-btn  { background: #0ea5e9; color: #fff; }
.nwg-dtp-today-btn:hover  { background: #0284c7; }
.nwg-dtp-cancel-btn { background: #f3f4f6; color: #344054; font-weight: 600; }
.nwg-dtp-cancel-btn:hover { background: #e5e7eb; }
