/**
 * Native date inputs — full-width display, picker anchored at the right icon.
 */

.date-input-shell {
  display: block;
  width: 100%;
}

.date-input-shell__surface {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: var(--roadmap-field-min-height, 44px);
  border: 1px solid #e8d2a4;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.date-input-shell:focus-within .date-input-shell__surface {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.date-input-shell__display {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: var(--roadmap-field-pad-block, 0.75rem) var(--roadmap-field-pad-inline, 0.88rem);
  padding-right: 0.35rem;
  color: #431407;
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  pointer-events: none;
  user-select: none;
}

.date-input-shell--empty .date-input-shell__display::before {
  content: "yyyy-mm-dd";
  color: #a16207;
  opacity: 0.72;
}

.date-input-shell input[type="date"],
.date-input-shell__picker {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.85rem;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
  color: transparent !important;
  caret-color: transparent;
  cursor: pointer;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
}

.date-input-shell input[type="date"]::-webkit-datetime-edit,
.date-input-shell input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.date-input-shell input[type="date"]::-webkit-datetime-edit-text,
.date-input-shell input[type="date"]::-webkit-datetime-edit-month-field,
.date-input-shell input[type="date"]::-webkit-datetime-edit-day-field,
.date-input-shell input[type="date"]::-webkit-datetime-edit-year-field {
  display: none;
}

.date-input-shell input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.date-input-shell__trigger,
.date-input-shell__trigger:hover,
.date-input-shell__trigger:active,
.date-input-shell__trigger:focus,
.date-input-shell__trigger:focus-visible {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  min-height: 0 !important;
  padding: 0 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 500 !important;
  pointer-events: none !important;
}

.date-input-shell__trigger {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border-radius: 8px;
  color: #78716c;
  cursor: pointer;
}

.date-input-shell:hover .date-input-shell__trigger,
.date-input-shell:focus-within .date-input-shell__trigger {
  color: #7c2d12;
  background: rgba(254, 243, 199, 0.55) !important;
}

.date-input-shell:has(input[type="date"]:disabled) .date-input-shell__surface {
  opacity: 0.65;
  cursor: not-allowed;
}

.date-input-shell:has(input[type="date"]:disabled) .date-input-shell__trigger {
  opacity: 0.45;
}

#roadmapModal .date-input-shell__surface {
  border-color: #e8d2a4;
  background: #fffdf8;
}

#roadmapModal .date-input-shell__display {
  color: #431407;
}

#roadmapModal .date-input-shell__trigger {
  color: #a16207;
}

#roadmapModal .date-input-shell:focus-within .date-input-shell__trigger {
  color: #7f1d1d;
  background: rgba(254, 226, 226, 0.35) !important;
}

#roadmapModal .date-input-shell input[type="date"] {
  padding: 0 !important;
  min-height: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Native pickers mis-anchor when ancestors use transform. */
.modal-backdrop--date-picker-open .modal-panel,
.modal-backdrop--date-picker-open.portfolio-filters-sheet {
  transform: none !important;
}
