/* M2 ECO — compact Noon-style address form */
.m2-addr {
  --m2-ink: var(--m2-brand-ink, #05141F);
  --m2-cyan: var(--m2-brand-primary, #55C8E8);
  --m2-muted: #6b7a86;
  --m2-border: #e6ecef;
  --m2-soft: #f5f8fa;
  --m2-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: "Albert Sans", Cairo, Tajawal, sans-serif;
  color: var(--m2-ink);
}
.m2-addr__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--m2-border);
  border-radius: var(--m2-radius);
  box-shadow: 0 2px 10px rgba(5, 20, 31, 0.05);
}
.m2-addr__card-map {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--m2-soft);
  border: 1px solid var(--m2-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.m2-addr__card-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m2-addr__card-placeholder {
  color: var(--m2-cyan);
  font-size: 22px;
}
.m2-addr__card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m2-addr__card-body strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m2-addr__card-body span {
  font-size: 12px;
  color: var(--m2-muted);
  line-height: 1.4;
}
.m2-addr__card-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--m2-cyan);
  background: #fff;
  color: #0891b2;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}
.m2-addr__map-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: #b45309;
}
.m2-addr__types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.m2-addr__type {
  flex: 1 1 0;
  min-width: 90px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--m2-border);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin: 0;
}
.m2-addr__type input { position: absolute; opacity: 0; pointer-events: none; }
.m2-addr__type .fa { color: var(--m2-muted); }
.m2-addr__type.is-active {
  border-color: var(--m2-cyan);
  background: rgba(85, 200, 232, 0.12);
  color: var(--m2-ink);
  box-shadow: 0 0 0 2px rgba(85, 200, 232, 0.2);
}
.m2-addr__type.is-active .fa { color: #0891b2; }
.m2-addr__row { display: grid; gap: 10px; }
.m2-addr__row--2 { grid-template-columns: 1fr 1fr; }
.m2-addr__field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--m2-muted);
  margin-bottom: 6px;
}
.m2-addr__field.required label::after { content: " *"; color: #dc2626; }
.m2-addr__field .form-control {
  height: 44px;
  border-radius: 10px;
  border-color: var(--m2-border);
  box-shadow: none;
}
.m2-addr__field .form-control:focus {
  border-color: var(--m2-cyan);
  box-shadow: 0 0 0 3px rgba(85, 200, 232, 0.22);
}
.m2-addr__field.has-error .form-control { border-color: #f87171; }
.m2-addr__section {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m2-muted);
}
.m2-addr__receiver {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m2-addr__receiver-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--m2-border);
  border-radius: var(--m2-radius);
  background: #fff;
  color: var(--m2-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1px 4px rgba(5, 20, 31, 0.04);
}
.m2-addr__receiver-summary .fa-pencil {
  color: var(--m2-muted);
  font-size: 14px;
  flex: 0 0 auto;
}
.m2-addr__receiver-summary:hover {
  border-color: var(--m2-cyan);
}
.m2-addr__receiver.is-open .m2-addr__receiver-summary {
  display: none;
}
.m2-addr__receiver-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m2-addr__receiver-fields[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.m2-addr__default label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
}
.m2-addr__sheet {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}
.m2-addr__sheet.is-open { display: flex; }
.m2-addr__sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 20, 31, 0.55);
}
.m2-addr__sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 92dvh;
  margin: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -12px 40px rgba(5, 20, 31, 0.25);
  transform: none;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}
.m2-addr__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--m2-border);
  background: rgba(85, 200, 232, 0.1);
}
.m2-addr__sheet-head strong { font-size: 15px; }
.m2-addr__sheet-x,
.m2-addr__sheet-ok {
  min-height: 40px;
  min-width: 40px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.m2-addr__sheet-x {
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--m2-ink);
}
.m2-addr__sheet-ok {
  padding: 0 14px;
  background: var(--m2-cyan);
  color: var(--m2-ink);
}
.m2-addr__sheet-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.m2-addr__sheet-body .m2-geo-picker { margin-top: 0; }
.m2-addr__sheet-body .m2-geo-picker__map {
  aspect-ratio: 3 / 2;
  max-height: 42dvh;
}

@media (min-width: 768px) {
  .m2-addr__sheet.is-open {
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
  }
  .m2-addr__sheet-panel {
    width: min(720px, 92vw);
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(5, 20, 31, 0.28);
    transform: none;
  }
  [dir="rtl"] .m2-addr__sheet-panel,
  [dir="ltr"] .m2-addr__sheet-panel {
    transform: none;
    inset: auto;
    left: auto;
    right: auto;
  }
}
@media (max-width: 575px) {
  .m2-addr__row--2 { grid-template-columns: 1fr; }
  .m2-addr__card { flex-wrap: wrap; }
  .m2-addr__card-btn { width: 100%; }
}

/* Address list chips */
.m2-acc__addr-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(85, 200, 232, 0.16);
  color: #0891b2;
  font-size: 11px;
  font-weight: 800;
}
.m2-acc__addr-map {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--m2-soft, #f5f8fa);
  border: 1px solid var(--m2-border, #e6ecef);
  flex: 0 0 56px;
}
.m2-acc__addr-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
