/* Calendar picker popup — ported from docs/design/hd/assets/datepicker.js,
   which injects these rules from JS. They live in a real stylesheet here so
   the popup is styled before the controller runs.

   .dp-d[disabled] has no counterpart in the design file: the mockup's picker
   ignores min/max, while the app's date fields carry real limits. */

.dp-pop {
  position: absolute;
  z-index: 120;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 16px;
  box-shadow: 0 24px 54px -22px rgba(20, 27, 36, .35);
  padding: 14px;
  width: 284px;
  font-family: inherit;
  font-size: 14px;
}

/* Inside a modal dialog the picker sits in flow under its field (see
   datepicker_controller.js), so it takes the field's width and drops the
   floating shadow. */
.dp-pop.dp-inline {
  position: static;
  width: 100%;
  margin-top: 6px;
  box-shadow: none;
}

.dp-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }

.dp-nav {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  background: #fff;
  color: #3d4a57;
  cursor: pointer;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.dp-nav:hover { border-color: #141b24; }

.dp-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.dp-dow span {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a929c;
  padding: 4px 0;
}

.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.dp-d {
  height: 34px;
  border: none;
  background: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: #141b24;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dp-d:hover { background: #f5f6f7; }
.dp-d.mut { color: #c3c8cd; }
.dp-d.today { box-shadow: inset 0 0 0 1.5px #009fad; color: #00727d; font-weight: 600; }
.dp-d.sel { background: #009fad; color: #fff; font-weight: 700; box-shadow: none; }
.dp-d:focus-visible { outline: 2px solid #009fad; outline-offset: -2px; }

.dp-d[disabled] { color: #d7dbdf; cursor: default; }
.dp-d[disabled]:hover { background: none; }

.dp-ft {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f1f3;
}
.dp-ft button {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #00727d;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.dp-ft button:hover { background: #e6f6f8; }
.dp-ft .dp-clear { color: #68727e; }

/* A typed date that doesn't parse, or falls outside min/max, leaves the
   ISO value empty — flag it rather than letting the form look valid. */
input[aria-invalid="true"].input { border-color: #c4574c; }
