.dads-date-picker {
  display: inline-block;
  vertical-align: middle;
  color: var(--color-neutral-solid-gray-800);
  font-weight: normal;
  font-size: calc(16 / 16 * 1rem);
  line-height: 1.7;
  font-family: var(--font-family-sans);
  letter-spacing: 0.02em;
}

.dads-date-picker__controls {
  position: relative;
  display: flex;
  align-items: end;
  column-gap: calc(16 / 16 * 1rem);
}

.dads-date-picker__inputs {
  --_background-color: var(--color-neutral-white);

  display: inline-flex;
  box-sizing: border-box;
  border-radius: calc(8 / 16 * 1rem);
  border: 1px solid var(--color-neutral-solid-gray-600);
  background-color: var(--_background-color);
  padding: calc(2 / 16 * 1rem) 0 calc(2 / 16 * 1rem) calc(2 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="sm"] .dads-date-picker__inputs {
  height: calc(40 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="md"] .dads-date-picker__inputs {
  height: calc(48 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="lg"] .dads-date-picker__inputs {
  height: calc(56 / 16 * 1rem);
}

.dads-date-picker__inputs:focus-within {
  border-color: var(--color-neutral-black);
}

@media (hover: hover) {
  .dads-date-picker__inputs:hover {
    border-color: var(--color-neutral-solid-gray-900);
  }
}

.dads-date-picker__inputs[data-error] {
  border-color: var(--color-semantic-error-1);
}

.dads-date-picker__inputs[data-error]:focus-within {
  border-color: var(--color-primitive-red-1000);
}

.dads-date-picker__inputs[data-disabled] {
  --_background-color: var(--color-neutral-solid-gray-50);
  border-color: var(--color-neutral-solid-gray-300);
  color: var(--color-neutral-solid-gray-420);
}

.dads-date-picker__inputs[data-readonly] {
  border-style: dashed;
  border-color: var(--color-neutral-solid-gray-600);
}

@media (forced-colors: active) {
  .dads-date-picker__inputs:focus-within {
    border-color: Highlight;
  }

  @media (hover: hover) {
    .dads-date-picker__inputs:hover {
      border-color: Highlight;
    }
  }

  .dads-date-picker__inputs[data-disabled] {
    --_background-color: ButtonFace;
    border-color: GrayText;
    color: GrayText;
  }

  .dads-date-picker__inputs[data-readonly] {
    border-color: currentcolor;
  }
}

.dads-date-picker__year,
.dads-date-picker__month,
.dads-date-picker__day {
  position: relative;
  z-index: 0;
  display: inline-flex;
  flex-direction: row-reverse;
}

:is(.dads-date-picker__month, .dads-date-picker__day):not(:first-child) {
  margin-left: calc(-4 / 16 * 1rem);
}

:is(.dads-date-picker__month, .dads-date-picker__day):last-child {
  padding-right: calc(16 / 16 * 1rem);
}

.dads-date-picker__label {
  position: relative;
  z-index: 1;
  align-self: center;
  background-color: var(--_background-color);
  padding: calc(4 / 16 * 1rem);
  line-height: 1;
}

.dads-date-picker__input {
  margin-right: calc(-4 / 16 * 1rem);
  box-sizing: border-box;
  width: calc(64 / 16 * 1rem);
  border-radius: calc(8 / 16 * 1rem);
  border: 1px solid transparent;
  background-color: transparent;
  padding-right: calc(12 / 16 * 1rem);
  color: inherit;
  text-align: right;
  font: inherit;
  letter-spacing: inherit;
}

.dads-date-picker__input:focus {
  outline: calc(4 / 16 * 1rem) solid var(--color-neutral-black);
  outline-offset: calc(2 / 16 * 1rem);
  border: 1px solid var(--color-neutral-solid-gray-600);
  box-shadow: 0 0 0 calc(2 / 16 * 1rem) var(--color-primitive-yellow-300);
}

:is(.dads-date-picker__month, .dads-date-picker__day) .dads-date-picker__input {
  width: calc(44 / 16 * 1rem);
}

.dads-date-picker__separated-inputs {
  display: inline-flex;
  column-gap: calc(16 / 16 * 1rem);
  box-sizing: content-box;
  padding-top: calc(12 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="sm"]
  .dads-date-picker__separated-inputs {
  height: calc(40 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="md"]
  .dads-date-picker__separated-inputs {
  height: calc(48 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="lg"]
  .dads-date-picker__separated-inputs {
  height: calc(56 / 16 * 1rem);
}

.dads-date-picker__separated-year,
.dads-date-picker__separated-month,
.dads-date-picker__separated-day {
  position: relative;
}

.dads-date-picker__separated-label {
  position: absolute;
  top: calc(-12 / 16 * 1rem);
  right: 0;
  left: 0;
  margin: 0 auto;
  box-sizing: border-box;
  width: calc(24 / 16 * 1rem);
  background-color: var(--color-neutral-white);
  padding: calc(4 / 16 * 1rem);
  line-height: 1;
}

.dads-date-picker__separated-label:has(+ :disabled) {
  color: var(--color-neutral-solid-gray-420);
}

@media (forced-colors: active) {
  .dads-date-picker__separated-label:has(+ :disabled) {
    color: GrayText;
  }
}

.dads-date-picker__separated-input {
  box-sizing: border-box;
  width: calc(72 / 16 * 1rem);
  height: 100%;
  border-radius: calc(8 / 16 * 1rem);
  border: 1px solid var(--color-neutral-solid-gray-600);
  background-color: var(--color-neutral-white);
  color: inherit;
  text-align: center;
  font: inherit;
  letter-spacing: inherit;
}

.dads-date-picker__separated-input:read-only:not(:disabled) {
  border-style: dashed;
}

.dads-date-picker__separated-input[aria-invalid="true"] {
  border-color: var(--color-semantic-error-1);
}

@media (hover: hover) {
  .dads-date-picker__separated-input:not(:read-only):hover {
    border-color: var(--color-neutral-solid-gray-900);
  }

  .dads-date-picker__separated-input[aria-invalid="true"]:hover {
    border-color: var(--color-primitive-red-1000);
  }
}

.dads-date-picker__separated-input:focus-visible {
  outline: calc(4 / 16 * 1rem) solid var(--color-neutral-black);
  outline-offset: calc(2 / 16 * 1rem);
  box-shadow: 0 0 0 calc(2 / 16 * 1rem) var(--color-primitive-yellow-300);
}

.dads-date-picker__separated-input:disabled {
  border-color: var(--color-neutral-solid-gray-600);
  background-color: var(--color-neutral-solid-gray-50);
  color: var(--color-neutral-solid-gray-420);
}

:is(.dads-date-picker__separated-month, .dads-date-picker__separated-day)
  .dads-date-picker__separated-input {
  width: calc(56 / 16 * 1rem);
}

@media (forced-colors: active) {
  .dads-date-picker__separated-input:disabled {
    border-color: GrayText;
    color: GrayText;
  }
}

.dads-date-picker__calendar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: calc(4 / 16 * 1rem);
  border-radius: calc(6 / 16 * 1rem);
  border: 1px solid;
  background-color: var(--color-neutral-white);
  padding-right: calc(12 / 16 * 1rem);
  padding-left: calc(12 / 16 * 1rem);
  color: var(--color-primitive-blue-900);
}

.dads-date-picker__controls[data-size="sm"] .dads-date-picker__calendar-button {
  height: calc(40 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="md"] .dads-date-picker__calendar-button {
  height: calc(48 / 16 * 1rem);
}

.dads-date-picker__controls[data-size="lg"] .dads-date-picker__calendar-button {
  height: calc(56 / 16 * 1rem);
}

@media (hover: hover) {
  .dads-date-picker__calendar-button:enabled:hover {
    border-width: calc(3 / 16 * 1rem);
    padding-right: calc(10 / 16 * 1rem);
    padding-left: calc(10 / 16 * 1rem);
  }
}

.dads-date-picker__calendar-button:focus-visible {
  outline: calc(4 / 16 * 1rem) solid var(--color-neutral-black);
  outline-offset: calc(2 / 16 * 1rem);
  border-radius: calc(4 / 16 * 1rem);
  box-shadow: 0 0 0 calc(2 / 16 * 1rem) var(--color-primitive-yellow-300);
}

.dads-date-picker__calendar-button:disabled {
  cursor: default;
  background-color: var(--color-neutral-white);
  color: var(--color-neutral-solid-gray-300);
  text-decoration: none;
}

@media (forced-colors: active) {
  .dads-date-picker__calendar-button:disabled {
    border-color: GrayText;
    color: GrayText;
  }
}

.dads-date-picker__calendar-icon {
  width: calc(24 / 16 * 1rem);
  height: calc(24 / 16 * 1rem);
}

.dads-date-picker__calendar-chevron {
  width: calc(16 / 16 * 1rem);
  height: calc(16 / 16 * 1rem);
}

.dads-date-picker__calendar-button[aria-expanded="true"]
  .dads-date-picker__calendar-chevron {
  rotate: 180deg;
}

.dads-date-picker__backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.dads-date-picker__calendar-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1;
  border-radius: calc(8 / 16 * 1rem);
  border: 1px solid var(--color-neutral-solid-gray-420);
  background-color: var(--color-neutral-white);
  box-shadow: var(--elevation-1);
}

.dads-date-picker__error-text {
  margin: calc(8 / 16 * 1rem) 0 0 0;
  color: var(--color-semantic-error-1);
  line-height: 1.7;
}
