/* date-field.css — styling for the site-wide fillable date component (src/modules/date-field.js).
   Loaded on EVERY page that has date inputs (index, results, portal, enroll) so the component looks
   and behaves identically everywhere. The fillable MM/DD/YYYY text field is the default; the native
   date input stays the YYYY-MM-DD source of truth and is an invisible overlay on the calendar button. */
.date-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.date-field__text {
  flex: 1 1 auto;        /* inherits each page's shared input styling (padding/border/radius/bg) */
}
.date-field__picker {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  background: var(--input-bg);
  cursor: pointer;
}
.date-field__picker:hover {
  background: color-mix(in srgb, var(--input-bg) 82%, var(--text));
}
.date-field__icon {
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;   /* let clicks fall through to the native input overlay */
}
/* native date input — invisible overlay that opens the OS calendar when the box is clicked.
   Higher specificity than the shared input[type="date"] rule so these overrides win. */
.date-field .date-field__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  box-shadow: none;
}
/* Chromium/WebKit: stretch the control's internal calendar-picker-indicator over the whole button.
   Without this only that ~12px sub-part opens the popup — the rest of the shrunken control is
   MM/DD/YYYY segment-editor dead zone. Also the no-JS/cross-origin-iframe fallback for the
   showPicker() wiring in date-field.js (showPicker throws in cross-origin frames). */
.date-field .date-field__native::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

/* Mobile: 16px on the fillable text twin prevents iOS Safari's zoom-on-focus while typing a date;
   keep the calendar button a comfortable 44px tap target. */
@media (max-width: 768px) {
  .date-field__text { font-size: 16px; }
  .date-field__picker { min-width: 44px; }
}
