.myd-address-assist-wrap {
  margin: 0 0 14px;
}

.myd-address-assist-button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  background: #111827;
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .18);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.myd-address-assist-button:hover,
.myd-address-assist-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(17, 24, 39, .24);
  outline: none;
}

.myd-address-assist-button:active {
  transform: translateY(0);
}

.myd-address-assist-button:disabled {
  opacity: .74;
  cursor: wait;
  transform: none;
}

.myd-address-assist-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 15px;
}

.myd-address-assist-loading .myd-address-assist-icon {
  animation: mydAddressPulse .8s ease-in-out infinite alternate;
}

@keyframes mydAddressPulse {
  from { transform: scale(.96); opacity: .72; }
  to { transform: scale(1.04); opacity: 1; }
}

.myd-address-assist-help {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(17, 24, 39, .06);
  color: #374151;
  font-size: 12px;
  line-height: 1.4;
}

.myd-address-assist-error {
  background: rgba(176, 0, 32, .08);
  color: #b00020;
}

body.myd-address-modal-open {
  overflow: hidden;
}

.myd-address-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.myd-address-modal--open {
  display: flex;
}

.myd-address-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
}

.myd-address-modal__dialog {
  position: relative;
  width: min(94vw, 520px);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  box-sizing: border-box;
}

.myd-address-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.myd-address-modal__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-right: 36px;
  margin-bottom: 14px;
}

.myd-address-modal__pin {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.myd-address-modal h3 {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1.2;
  color: #111827;
}

.myd-address-modal p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.myd-address-modal__map {
  height: 220px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #eef2f7;
  margin-bottom: 15px;
}

.myd-address-modal__map-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  color: #4b5563;
  font-size: 13px;
  box-sizing: border-box;
}

.myd-address-modal__label {
  display: block;
  margin: 0 0 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.myd-address-modal__input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.myd-address-modal__input:focus {
  border-color: #111827;
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .10);
}

.myd-address-modal__input--error {
  border-color: #b00020;
  box-shadow: 0 0 0 3px rgba(176, 0, 32, .10);
}

.myd-address-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.myd-address-modal__warning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.4;
}

.myd-address-modal__warning--error {
  background: rgba(176, 0, 32, .08);
  color: #b00020;
}

.myd-address-modal__actions {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 10px;
}

.myd-address-modal__primary,
.myd-address-modal__secondary {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.myd-address-modal__primary {
  background: #16a34a;
  color: #fff;
}

.myd-address-modal__secondary {
  background: #f3f4f6;
  color: #111827;
}

@media (max-width: 520px) {
  .myd-address-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .myd-address-modal__dialog {
    width: 100%;
    border-radius: 24px 24px 16px 16px;
    padding: 18px;
  }

  .myd-address-modal__map {
    height: 190px;
  }

  .myd-address-modal__grid,
  .myd-address-modal__actions {
    grid-template-columns: 1fr;
  }
}


/* Google Places suggestions must stay above the confirmation modal. */
.pac-container,
.myd-address-modal-pac {
  z-index: 10000000 !important;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
  overflow: hidden;
}


.pac-container.myd-pac-container-hidden {
  display: none !important;
  visibility: hidden !important;
}

.pac-item {
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.pac-item-query {
  font-size: 14px;
}

/* Keep the original 3.0.12 modal logic intact, but hide the reject button from customers. */
#myd-address-reject,
.myd-address-modal__secondary#myd-address-reject {
  display: none !important;
}

/* With the secondary button hidden, make the confirm button occupy the full row. */
.myd-address-modal__actions {
  grid-template-columns: 1fr !important;
}

.myd-whatsapp-help {
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 12px;
  color: #6b7280;
}

.myd-whatsapp-confirm-error {
  display: none;
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 10px;
  color: #cb2027;
  font-weight: 600;
}
