.mg-delivery-picker { min-width: 0; container-type: inline-size; }
.mg-delivery-layout { display: grid; gap: 12px; }
.mg-delivery-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mg-delivery-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  padding-bottom: 10px;
  border: 2px solid #b5cadd;
  border-radius: 14px;
  overflow: hidden;
  background: #f0f6fc;
  color: #142c43;
  cursor: pointer;
}
.mg-delivery-card:has(input:checked) { border-color: #ff7400; background: var(--mg-selection-bg, rgb(255 116 0 / 50%)); }
.mg-delivery-card:has(input:focus-visible) { outline: 2px solid #19569a; outline-offset: 3px; }
.mg-delivery-card > img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.mg-delivery-card > strong { margin: 8px 10px 0; font-size: 15px; }
.mg-delivery-card > small { margin: 2px 10px 0; color: #395976; }
.mg-delivery-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  background: #19569a;
  color: white;
  font-weight: 800;
  place-items: center;
}
.mg-delivery-card:has(input:checked) .mg-delivery-check { display: grid; }
.mg-delivery-destination {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #b5cadd;
  border-radius: 14px;
  background: #edf5fc;
  overflow-wrap: anywhere;
}
.mg-delivery-destination span { color: #304e69; }
@container (min-width: 555px) {
  .mg-delivery-layout { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); }
}
#form-address:has(#address-ozon-courier:checked) :is(.mg-ozon-point-controls, .mg-ozon-pickup-marker, .leaflet-tooltip-pane, .leaflet-popup-pane) {
  display: none;
}

#ozon-delivery-choice .mg-delivery-layout { grid-template-columns: minmax(0, 1fr); }
#ozon-delivery-choice .mg-delivery-destination { padding: 10px 14px; gap: 4px; }
#ozon-delivery-choice #shipping-existing { margin-block: 0 !important; }
#ozon-delivery-choice [data-checkout-saved-address] { margin-top: 4px; }
#ozon-delivery-choice [data-checkout-saved-address] > summary { cursor: pointer; color: #19569a; }
#ozon-delivery-choice [data-checkout-saved-address][open] #shipping-existing { margin-top: 6px !important; }
#ozon-delivery-choice:not(:has(#ozon-delivery-courier:checked)) [data-checkout-saved-address] { display: none; }
