.will-form-date-input,
.will-form-time-input {
  width: 100%;
  padding: 16px 18px 16px 16px;
  border: 2px solid #d1d5dc;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(16, 24, 40, 0.5);
  box-sizing: border-box;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px 18px;
  transition: border-color 0.2s ease, color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-text-fill-color: currentColor;
}

.will-form-date-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 2v2M17 2v2M3.5 9h17M5 5h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z' stroke='%2398A2B3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.will-form-time-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 7v5l3 2M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z' stroke='%2398A2B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.will-form-date-input:focus,
.will-form-time-input:focus,
.will-form-date-input.will-has-value,
.will-form-time-input.will-has-value {
  outline: none;
  border-color: #101828;
  color: #101828;
}

.will-form-date-input::-webkit-calendar-picker-indicator,
.will-form-time-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}

.will-form-date-input::-webkit-inner-spin-button,
.will-form-time-input::-webkit-inner-spin-button,
.will-form-date-input::-webkit-clear-button,
.will-form-time-input::-webkit-clear-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.will-mobile-time-picker {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.will-mobile-time-picker.is-open {
  display: block;
}

.will-mobile-time-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.will-mobile-time-picker__sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 36px rgba(16, 24, 40, 0.22);
  max-height: 70vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.will-mobile-time-picker__header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #eaecf0;
}

.will-mobile-time-picker__title {
  color: #101828;
  font-size: 15px;
  font-weight: 600;
}

.will-mobile-time-picker__cancel,
.will-mobile-time-picker__done {
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  padding: 8px;
}

.will-mobile-time-picker__cancel {
  color: #667085;
}

.will-mobile-time-picker__done {
  color: #175cd3;
  font-weight: 600;
}

.will-mobile-time-picker__list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.will-mobile-time-picker__item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  padding: 14px 16px;
  font-size: 20px;
  line-height: 1.2;
  color: #101828;
}

.will-mobile-time-picker__item.is-selected {
  background: #f2f4f7;
  color: #175cd3;
  font-weight: 700;
}

body.will-mobile-time-picker-open {
  overflow: hidden;
}

.flatpickr-calendar {
  z-index: 9998;
}

@media (min-width: 769px) {
  .will-mobile-time-picker__sheet {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 40px));
    border-radius: 16px;
    max-height: min(80vh, 620px);
  }

  .will-mobile-time-picker__header {
    padding: 16px 20px;
  }

  .will-mobile-time-picker__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: min(60vh, 460px);
    padding: 16px 20px 20px;
  }

  .will-mobile-time-picker__item {
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 12px 10px;
    font-size: 17px;
    line-height: 1.1;
    transition: all 0.15s ease;
  }

  .will-mobile-time-picker__item:hover {
    border-color: #98a2b3;
    background: #f8fafc;
  }

  .will-mobile-time-picker__item.is-selected {
    border-color: #175cd3;
    background: #eff4ff;
  }
}
