/* One shared date, time and date-time control. Native values stay in the form; this is the visible interface. */
.cf-datetime-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.cf-datetime-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  min-inline-size: 1px !important;
  min-block-size: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cf-datetime-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #f4f2eb;
  background: rgba(255,255,255,.028);
  box-shadow: none;
  font: 700 11px "DM Sans";
  letter-spacing: .01em;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cf-datetime-trigger:hover:not(:disabled) {
  border-color: rgba(240,223,187,.36);
  background: rgba(255,255,255,.05);
}

.cf-datetime-trigger:focus-visible {
  border-color: rgba(240,223,187,.72);
  outline: 0;
  background: rgba(240,223,187,.07);
  box-shadow: 0 0 0 3px rgba(240,223,187,.1);
}

.cf-datetime-trigger:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.cf-datetime-trigger__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cf-datetime-field.is-empty .cf-datetime-trigger__value {
  color: var(--muted-2);
  font-weight: 600;
}

.cf-datetime-trigger__icon {
  width: 20px;
  height: 20px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--cream);
}

.cf-datetime-trigger__icon svg {
  width: 20px;
  height: 20px;
}

.cf-datetime-backdrop {
  position: fixed;
  z-index: 148;
  inset: 0;
  display: none;
  background: rgba(3,4,7,.56);
  backdrop-filter: blur(3px);
}

.cf-datetime-popover {
  position: fixed;
  z-index: 149;
  width: min(374px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  color: #f4f2eb;
  background: #15171c;
  box-shadow: 0 24px 62px rgba(0,0,0,.44);
}

.cf-datetime-popover[data-type="datetime"] {
  width: min(660px, calc(100vw - 24px));
}

.cf-datetime-popover[hidden],
.cf-datetime-backdrop[hidden] {
  display: none !important;
}

.cf-datetime-popover__content {
  padding: 17px;
}

.cf-datetime-popover__title {
  display: block;
  margin: 1px 2px 14px;
  color: #eef0f3;
  font: 800 12px "Manrope";
}

.cf-datetime-popover__body {
  min-width: 0;
}

.cf-datetime-popover__body--datetime {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, .74fr);
  gap: 14px;
}

.cf-datetime-popover[data-type="datetime"] .cf-datetime-calendar,
.cf-datetime-popover[data-type="datetime"] .cf-datetime-time {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cf-datetime-calendar,
.cf-datetime-time {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(255,255,255,.018);
}

.cf-datetime-calendar__header {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.cf-datetime-calendar__month {
  color: #f4f2eb;
  font: 800 14px "Manrope";
  text-align: center;
}

.cf-datetime-icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  color: #e9ebee;
  background: rgba(255,255,255,.018);
  cursor: pointer;
}

.cf-datetime-icon-button:hover {
  border-color: rgba(240,223,187,.48);
  color: var(--cream);
  background: rgba(240,223,187,.06);
}

.cf-datetime-icon-button:focus-visible,
.cf-datetime-day:focus-visible,
.cf-datetime-time-option:focus-visible,
.cf-datetime-text-button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.cf-datetime-icon-button svg {
  width: 17px;
  height: 17px;
}

.cf-datetime-icon-button.is-previous svg {
  transform: rotate(180deg);
}

.cf-datetime-calendar__weekdays,
.cf-datetime-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cf-datetime-calendar__weekdays {
  margin-bottom: 6px;
}

.cf-datetime-calendar__weekdays span {
  color: #8e96a2;
  font: 800 8px "DM Sans";
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.cf-datetime-day {
  aspect-ratio: 1;
  min-height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #f0f1f3;
  background: transparent;
  font: 700 11px "DM Sans";
  cursor: pointer;
}

.cf-datetime-day:hover:not(:disabled):not(.is-selected) {
  color: var(--cream);
  background: rgba(240,223,187,.1);
}

.cf-datetime-day.is-outside {
  color: #555c66;
}

.cf-datetime-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(240,223,187,.5);
}

.cf-datetime-day.is-selected {
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 4px 13px rgba(240,223,187,.17);
}

.cf-datetime-day:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.cf-datetime-time {
  display: flex;
  flex-direction: column;
}

.cf-datetime-time__label {
  display: block;
  margin: 2px 2px 13px;
  color: #eef0f3;
  font: 800 12px "Manrope";
}

.cf-datetime-time__picker {
  min-height: 248px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.cf-datetime-time__separator {
  color: #e9ebee;
  font: 800 22px/1 "DM Sans";
  text-align: center;
}

.cf-datetime-time-column {
  height: 248px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 96px 1px;
  scrollbar-width: none;
  scroll-snap-type: y proximity;
}

.cf-datetime-time-column::-webkit-scrollbar {
  display: none;
}

.cf-datetime-time-option {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #89919c;
  background: transparent;
  font: 700 15px "DM Sans";
  cursor: pointer;
  scroll-snap-align: center;
}

.cf-datetime-time-option:hover:not(.is-selected) {
  color: #e9ebee;
  background: rgba(255,255,255,.05);
}

.cf-datetime-time-option.is-selected {
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 5px 15px rgba(240,223,187,.16);
}

.cf-datetime-time-option:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.cf-datetime-time-option:disabled:hover {
  color: #89919c;
  background: transparent;
}

.cf-datetime-popover__footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 17px;
  border-top: 1px solid rgba(255,255,255,.075);
}

.cf-datetime-text-button {
  padding: 7px 2px;
  border: 0;
  color: #969faa;
  background: transparent;
  font: 700 10px "DM Sans";
  cursor: pointer;
}

.cf-datetime-text-button:hover:not(:disabled) {
  color: #f0f1f3;
}

.cf-datetime-text-button.is-accent {
  color: var(--cream);
}

.cf-datetime-text-button:disabled {
  cursor: default;
  opacity: .38;
}

/* For standalone date and time choices, keep only the selection panel itself. */
.cf-datetime-popover[data-type="date"],
.cf-datetime-popover[data-type="time"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cf-datetime-popover[data-type="date"] .cf-datetime-popover__content,
.cf-datetime-popover[data-type="time"] .cf-datetime-popover__content {
  padding: 0;
}

.cf-datetime-popover[data-type="date"] .cf-datetime-calendar,
.cf-datetime-popover[data-type="time"] .cf-datetime-time {
  background: #15171c;
}

.cf-datetime-popover[data-type="date"] .cf-datetime-popover__title,
.cf-datetime-popover[data-type="date"] .cf-datetime-popover__footer,
.cf-datetime-popover[data-type="time"] .cf-datetime-popover__title,
.cf-datetime-popover[data-type="time"] .cf-datetime-popover__footer,
.cf-datetime-popover[data-type="time"] .cf-datetime-time__label {
  display: none;
}

@media (max-width: 720px) {
  .cf-datetime-backdrop {
    display: block;
  }

  .cf-datetime-popover,
  .cf-datetime-popover[data-type="datetime"] {
    inset: auto 0 0;
    width: 100%;
    max-height: min(88dvh, 760px);
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 23px 23px 0 0;
  }

  .cf-datetime-popover__content {
    padding: 17px 15px;
  }

  .cf-datetime-popover__body--datetime {
    grid-template-columns: 1fr;
  }

  .cf-datetime-time__picker {
    min-height: 196px;
  }

  .cf-datetime-time-column {
    height: 196px;
    padding-block: 72px;
  }

  .cf-datetime-popover[data-type="date"],
  .cf-datetime-popover[data-type="time"] {
    inset: auto 12px 12px;
    width: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
}
