.purchase-card .mwdh-delivery-hint,
.purchase-form-shell .mwdh-delivery-hint,
.woocommerce div.product form.cart .mwdh-delivery-hint {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mwdh-delivery-hint {
  --mwdh-accent-color: #2e7d32;
  --mwdh-details-color: #e65100;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 1.5;
  color: #111111;
}

.mwdh-delivery-hint__shipping {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  padding: 0;
  font-weight: 700;
  color: var(--mwdh-accent-color);
}

.mwdh-delivery-hint__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--mwdh-accent-color);
  line-height: 1;
}

.mwdh-delivery-hint__icon svg {
  display: block;
}

.mwdh-delivery-hint__shipping-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mwdh-accent-color);
}

.mwdh-delivery-hint__line {
  margin: 0;
  padding: 0;
  color: #111111;
  font-weight: 400;
}

.mwdh-delivery-hint__postcode {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.mwdh-delivery-hint__date {
  font-weight: 400;
  color: #111111;
}

.mwdh-delivery-hint,
.mwdh-delivery-hint__line,
.purchase-card .mwdh-delivery-hint,
.purchase-form-shell .mwdh-delivery-hint {
  overflow: visible;
}

.mwdh-delivery-hint__line {
  display: block;
}

.mwdh-delivery-hint__details,
.mwdh-delivery-hint__details--link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mwdh-details-color);
  font: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.mwdh-delivery-hint__details:hover,
.mwdh-delivery-hint__details:focus-visible,
.mwdh-delivery-hint__details--link:hover,
.mwdh-delivery-hint__details--link:focus-visible {
  color: #bf360c;
}

.mwdh-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 200;
  width: min(380px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.mwdh-popover.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.mwdh-popover[hidden]:not(.is-open) {
  display: none !important;
}

.mwdh-popover.mwdh-popover--fixed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100002;
  margin: 0;
}

.mwdh-popover__panel {
  position: relative;
  padding: 14px 16px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  text-align: left;
}

.mwdh-popover__arrow {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #ffffff;
  border-top: 1px solid #d9d9d9;
  border-left: 1px solid #d9d9d9;
  transform: rotate(45deg);
  box-sizing: border-box;
}

.mwdh-popover__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #111111;
}

.mwdh-popover__content {
  font-size: 13px;
  line-height: 1.65;
  color: #333333;
}

.mwdh-popover__content ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.mwdh-popover__content li {
  margin: 0 0 8px;
}

.mwdh-popover__content li:last-child {
  margin-bottom: 0;
}

.mwdh-popover__content p {
  margin: 0 0 8px;
}

.mwdh-popover__content p:last-child {
  margin-bottom: 0;
}

.mwdh-popover__more {
  margin: 10px 0 0 !important;
  font-size: 13px;
}

.mwdh-popover__more a {
  color: var(--mwdh-details-color);
  text-decoration: underline;
}

@media (max-width: 520px) {
  .mwdh-popover {
    left: 0;
    transform: none;
  }

  .mwdh-popover__arrow {
    left: 24px;
    margin-left: 0;
  }
}

/* Location picker modal */
.mwdh-location-modal {
  --mwdh-location-btn-color: #ff4e20;
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.mwdh-location-modal[hidden] {
  display: none !important;
}

.mwdh-location-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mwdh-location-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.mwdh-location-modal__header {
  padding: 14px 18px;
  background: #f3f3f3;
  border-bottom: 1px solid #e5e5e5;
}

.mwdh-location-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #111111;
}

.mwdh-location-modal__form {
  padding: 18px 18px 16px;
}

.mwdh-location-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.mwdh-field {
  position: relative;
  margin-bottom: 12px;
}

.mwdh-location-modal__row .mwdh-field {
  margin-bottom: 0;
}

.mwdh-field__label {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 1;
  font-size: 11px;
  line-height: 1.2;
  color: #888888;
  pointer-events: none;
}

.mwdh-field__control {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 22px 36px 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  line-height: 1.35;
  appearance: none;
}

.mwdh-field--select .mwdh-field__control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.mwdh-field__control:focus {
  outline: none;
  border-color: #999999;
}

.mwdh-field[data-mwdh-state-field][hidden] {
  display: none;
}

.mwdh-location-modal__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.mwdh-location-modal__done {
  min-width: 88px;
  min-height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 2px;
  background: var(--mwdh-location-btn-color);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.mwdh-location-modal__done:hover,
.mwdh-location-modal__done:focus-visible {
  filter: brightness(0.95);
}

body.mwdh-location-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .mwdh-location-modal__row {
    grid-template-columns: 1fr;
  }
}
