@import url("/vendor/flatpickr.min.css");

.generic-input-wrap.has-unit-select[data-suffix]:not([data-suffix=""])::after {
  content: none;
}

.generic-input-wrap.has-unit-select input,
.generic-input-wrap.has-unit-select .generic-unit-display-input {
  padding-right: 88px;
}

.generic-input-wrap.has-unit-select .generic-unit-base-input {
  display: none;
}

.generic-input-wrap.has-unit-select .generic-unit-display-input {
  width: 100%;
}

.generic-unit-select {
  position: absolute;
  top: 7px;
  right: 8px;
  bottom: 7px;
  width: 72px;
  border: 0;
  border-left: 1px solid #dbe4ef;
  border-radius: 0 10px 10px 0;
  padding: 0 24px 0 10px;
  background: #fcfdff;
  color: #475569;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23475569' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  cursor: pointer;
}

.generic-unit-select:focus {
  outline: none;
}

.generic-input-wrap.has-unit-select:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.generic-input-wrap.has-unit-select:focus-within input,
.generic-input-wrap.has-unit-select:focus-within .generic-unit-display-input,
.generic-input-wrap.has-unit-select:focus-within .generic-unit-select {
  box-shadow: none;
}

.generic-input-wrap.is-date-wrap {
  cursor: pointer;
}

.generic-input-wrap.is-date-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  background: no-repeat center / 18px 18px url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.25 2.25V4.5M12.75 2.25V4.5M3.375 6.75H14.625M4.5 3.75H13.5C14.3284 3.75 15 4.42157 15 5.25V13.5C15 14.3284 14.3284 15 13.5 15H4.5C3.67157 15 3 14.3284 3 13.5V5.25C3 4.42157 3.67157 3.75 4.5 3.75Z' stroke='%230f172a' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.generic-input-wrap.is-date-wrap .flatpickr-input,
.generic-input-wrap.is-date-wrap .generic-date-display {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd8ec;
  border-radius: 12px;
  padding: 0 48px 0 14px;
  font: inherit;
  color: inherit;
  background: #fcfdff;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.generic-input-wrap.is-date-wrap .flatpickr-input:focus,
.generic-input-wrap.is-date-wrap .generic-date-display:focus {
  outline: 0;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.generic-input-wrap.is-date-wrap .flatpickr-input::placeholder,
.generic-input-wrap.is-date-wrap .generic-date-display::placeholder {
  color: #94a3b8;
}

.generic-input-wrap.is-date-wrap input[type="hidden"] + .flatpickr-input {
  padding-right: 48px;
}

.flatpickr-calendar {
  border: 1px solid #dbe7f3;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  font-family: var(--font-sans);
  border-radius: 16px;
}

.flatpickr-calendar.open {
  z-index: 40;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  background: #fff;
  color: #0f172a;
  font-weight: 500;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  appearance: auto;
  -webkit-appearance: menulist;
  border: 0;
  padding-right: 8px;
}

.flatpickr-weekday {
  color: #475569;
  font-weight: 500;
}

.flatpickr-day {
  color: #0f172a;
  border-color: transparent;
}

.flatpickr-day.today {
  border-color: #2563eb;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.flatpickr-day:hover {
  background: #eef2ff;
  border-color: #eef2ff;
}
