:root {
  --wfce-cream: #faf5e3;
  --wfce-red: #ee3424;
  --wfce-ink: #121212;
  --wfce-tan: #ccc3b1;
  --wfce-white: #fff;
}

.wfce-delivery-date-row > td {
  padding: 1.35rem 0 !important;
  text-align: left !important;
}

.wfce-delivery-date-control {
  width: 100%;
}

.wfce-delivery-date-control > label {
  color: var(--wfce-ink);
  display: block;
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.65rem;
}

.wfce-delivery-date-control .optional {
  font-size: 0.8em;
  font-weight: 400;
}

.wfce-date-input-shell {
  position: relative;
  width: 100%;
}

.wfce-date-input-shell #wfce_delivery_date_picker {
  background: var(--wfce-cream);
  border: 1.5px solid var(--wfce-ink);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--wfce-ink);
  cursor: pointer;
  font: inherit;
  min-height: 3.2rem;
  padding: 0.7rem 3.5rem 0.7rem 1.15rem;
  width: 100%;
}

.wfce-date-input-shell #wfce_delivery_date_picker:focus {
  border-color: var(--wfce-red);
  box-shadow: 0 0 0 2px rgba(238, 52, 36, 0.18);
  outline: none;
}

.wfce-calendar-button {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  color: var(--wfce-ink) !important;
  cursor: pointer;
  display: flex;
  height: 2.65rem;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.65rem;
}

.wfce-calendar-button:hover,
.wfce-calendar-button:focus-visible {
  background: rgba(238, 52, 36, 0.1) !important;
  color: var(--wfce-red) !important;
  outline: none;
}

.wfce-calendar-button svg {
  fill: none;
  height: 1.35rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.35rem;
}

.wfce-clear-date {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--wfce-red) !important;
  cursor: pointer;
  font: inherit;
  font-size: 0.88em;
  margin: 0.55rem 0 0 !important;
  padding: 0 !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.wfce-clear-date[hidden] {
  display: none !important;
}

.wfce-delivery-help {
  color: var(--wfce-ink);
  display: block;
  font-size: 0.88em;
  line-height: 1.45;
  margin: 0.55rem 0 0;
  opacity: 0.78;
  position: static !important;
  transform: none !important;
  width: auto !important;
}

.wfce-delivery-help::before,
.wfce-delivery-help::after {
  display: none !important;
}

.wfce-delivery-help.is-loading {
  opacity: 0.58;
}

.wfce-delivery-help.is-error {
  color: #a52318;
  opacity: 1;
}

.wfce-delivery-help.is-ready {
  opacity: 0.78;
}

/* WordPress supplies jQuery UI's calendar behavior; this plugin supplies its
   frontend presentation so no WordPress admin styling leaks into checkout. */
body #ui-datepicker-div.ui-datepicker:not(.wfce-datepicker) {
  display: none;
}

body .ui-datepicker.wfce-datepicker {
  background: var(--wfce-cream);
  border: 1.5px solid var(--wfce-ink);
  border-radius: 1rem;
  box-shadow: 0 0.9rem 2.5rem rgba(18, 18, 18, 0.2);
  box-sizing: border-box;
  color: var(--wfce-ink);
  display: none;
  font-family: inherit;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem;
  width: 20rem;
  z-index: 999999 !important;
}

.wfce-datepicker .ui-datepicker-header {
  background: var(--wfce-red);
  border-radius: 0.7rem;
  color: var(--wfce-cream);
  min-height: 2.75rem;
  padding: 0.35rem 3rem;
  position: relative;
}

.wfce-datepicker .ui-datepicker-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 2.05rem;
  text-align: center;
}

.wfce-datepicker .ui-datepicker-prev,
.wfce-datepicker .ui-datepicker-next {
  align-items: center;
  border-radius: 50%;
  color: var(--wfce-cream);
  cursor: pointer;
  display: flex;
  height: 2rem;
  justify-content: center;
  position: absolute;
  top: 0.38rem;
  width: 2rem;
}

.wfce-datepicker .ui-datepicker-prev {
  left: 0.45rem;
}

.wfce-datepicker .ui-datepicker-next {
  right: 0.45rem;
}

.wfce-datepicker .ui-datepicker-prev::before,
.wfce-datepicker .ui-datepicker-next::before {
  border-style: solid;
  content: '';
  display: block;
  height: 0.5rem;
  transform: rotate(45deg);
  width: 0.5rem;
}

.wfce-datepicker .ui-datepicker-prev::before {
  border-width: 0 0 2px 2px;
  margin-left: 0.2rem;
}

.wfce-datepicker .ui-datepicker-next::before {
  border-width: 2px 2px 0 0;
  margin-right: 0.2rem;
}

.wfce-datepicker .ui-datepicker-prev:hover,
.wfce-datepicker .ui-datepicker-next:hover,
.wfce-datepicker .ui-datepicker-prev:focus,
.wfce-datepicker .ui-datepicker-next:focus {
  background: rgba(250, 245, 227, 0.2);
  outline: none;
}

.wfce-datepicker .ui-icon {
  display: none;
}

.wfce-datepicker table {
  border: 0;
  border-collapse: separate;
  border-spacing: 0.18rem;
  margin: 0.55rem 0 0;
  table-layout: fixed;
  width: 100%;
}

.wfce-datepicker th {
  border: 0;
  color: var(--wfce-ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0;
  text-align: center;
  text-transform: uppercase;
}

.wfce-datepicker td {
  border: 0;
  padding: 0;
  text-align: center;
}

.wfce-datepicker td a,
.wfce-datepicker td span {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  box-sizing: border-box;
  color: var(--wfce-ink);
  display: flex;
  font-size: 0.92rem;
  height: 2.25rem;
  justify-content: center;
  margin: auto;
  text-decoration: none;
  width: 2.25rem;
}

.wfce-datepicker td a:hover,
.wfce-datepicker td a:focus {
  background: rgba(238, 52, 36, 0.12);
  border-color: var(--wfce-red);
  color: var(--wfce-ink);
  outline: none;
}

.wfce-datepicker td a.ui-state-active {
  background: var(--wfce-red);
  border-color: var(--wfce-red);
  color: var(--wfce-white);
  font-weight: 700;
}

.wfce-datepicker td a.ui-state-highlight:not(.ui-state-active) {
  border-color: var(--wfce-tan);
  font-weight: 700;
}

.wfce-datepicker td.ui-state-disabled span {
  color: #827d73;
  opacity: 0.42;
}

.wfce-datepicker td.ui-datepicker-other-month span {
  opacity: 0.22;
}

.wfce-order-data,
.wfce-admin-order-data {
  margin-top: 1.5rem;
}

.wfce-order-data p,
.wfce-admin-order-data p {
  margin: 0.4rem 0;
}

.wfce-express-checkout-notice {
  color: var(--wfce-cream);
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  margin: 0.75rem 0;
  font-size: 0.9em;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .wfce-delivery-date-row > td {
    padding: 1rem 0 !important;
  }

  body .ui-datepicker.wfce-datepicker {
    left: 1rem !important;
    right: 1rem !important;
    width: auto;
  }
}
