/* Native fields share the same box model on company and employee pages. */
body[data-page] :is(input, select, textarea),
body:has(.ep-header) :is(input, select, textarea) {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  font-family: inherit;
  line-height: 1.5;
}
body[data-page] :is(label, .contact-field),
body:has(.ep-header) label {
  min-width: 0;
}
body[data-page] :is(input[type="date"], input[type="month"], input[type="datetime-local"]),
body:has(.ep-header) :is(input[type="date"], input[type="month"], input[type="datetime-local"]) {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  text-align: left;
}
body[data-page] input::-webkit-date-and-time-value,
body:has(.ep-header) input::-webkit-date-and-time-value {
  min-height: 1.5em;
  text-align: left;
}
body[data-page] input::-webkit-datetime-edit,
body:has(.ep-header) input::-webkit-datetime-edit {
  padding: 0;
}
@media (max-width: 1060px) {
  body[data-page] :is(input, select, textarea),
  body:has(.ep-header) :is(input, select, textarea) {
    font-size: 16px;
    min-height: 50px;
  }
  body[data-page] :is(input[type="checkbox"], input[type="radio"]),
  body:has(.ep-header) :is(input[type="checkbox"], input[type="radio"]) {
    min-height: 20px;
  }
  .ep-date-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.date-be-control {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  background: var(--control-bg, #fff);
  color: var(--text-primary, #3c2a1c);
  border: 1px solid var(--border-color, #b8a68f);
  border-radius: 10px;
  box-sizing: border-box;
}
.date-be-control > input {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 48px;
  margin: 0 !important;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}
.date-be-control > [data-buddhist-date] {
  display: block;
  font: inherit;
  line-height: 1.5;
  padding: 11px 34px 11px 12px;
  min-height: 46px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.date-be-control:after {
  content: "▦";
  position: absolute;
  right: 11px;
  top: 11px;
  pointer-events: none;
}
.date-be-control:focus-within {
  outline: 2px solid #d95a18;
  outline-offset: 2px;
}
.date-be-disabled {
  opacity: 0.6;
}
[data-theme="night"] .date-be-control {
  background: #29231f;
  color: #fff0dc;
  border-color: #85705d;
}
