.ozon-btn {
  box-sizing: border-box;
  cursor: pointer;
}
.ozon-pvz-widget {
  margin: 0 0 18px 0;
  display: none;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.ozon-pvz-widget__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: end;
}
.ozon-pvz-widget__input {
  width: 100%;
  min-width: 0;
  height: 56px;
  min-height: 56px;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid currentColor !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: inherit;
  font: inherit;
  line-height: 56px;
}
.ozon-pvz-widget__input::placeholder {
  color: rgba(59, 71, 37, 0.45);
  opacity: 1;
}
.ozon-pvz-widget__map-btn {
  background: #005BFF;
  color: #fff;
  border: none;
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  line-height: 1;
}
.ozon-pvz-widget__map-btn:hover { background: #0048CC; }
.ozon-pvz-widget__map-btn:disabled {
  background: #c7d2e5;
  cursor: not-allowed;
}
.ozon-pvz-widget__map-icon {
  display: block;
  width: 24px;
  height: 24px;
}
.ozon-pvz-widget__dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid #d9e1ee;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.14);
  max-height: 260px;
  overflow: auto;
}
.ozon-pvz-widget__option {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: #111;
}
.ozon-pvz-widget__option:last-child { border-bottom: 0; }
.ozon-pvz-widget__option:hover,
.ozon-pvz-widget__option:focus {
  outline: none;
  background: #f5f8ff;
}
.ozon-pvz-widget__option-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
}
.ozon-pvz-widget__option-address {
  display: block;
  margin-top: 3px;
  color: #666;
  font-size: 13px;
  line-height: 1.3;
}
.ozon-pvz-widget__message,
.ozon-pvz-widget__selected {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}
.ozon-pvz-widget__message { color: #b42318; }
.ozon-pvz-widget__selected { color: #165d1f; }
.ozon-btn--checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.ozon-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 999999 !important;
  isolation: isolate !important;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ozon-popup-content{
  width: min(1240px, 96vw);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: auto;
}
.ozon-pvz-container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 20px;
  max-width: none;
  width: 100%;
  max-height: inherit;
  background: #fff;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.ozon-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 10px 0;
  text-align: center;
}
.ozon-subtitle {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin: 0 0 10px 0;
}
#ozon-map {
  width: 100%;
  height: 560px;
  min-height: 560px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  position: relative;
}
.ozon-main {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}
.ozon-map-wrap {
  min-height: 560px;
}
.ozon-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ozon-point-details {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 0;
  border: 1px solid #e9ecef;
  font-size: 14px;
  line-height: 1.5;
  flex: 1 1 auto;
  overflow: auto;
}
.ozon-point-details h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #005BFF;
}
.ozon-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.ozon-confirm-btn {
  background: #005BFF;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.ozon-confirm-btn:hover { background: #0048CC; }
.ozon-confirm-btn:disabled { background: #ccc; cursor: not-allowed; }

.ozon-close-btn {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.ozon-close-btn:hover { background: #e8e8e8; }

.ozon-warn {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 13px;
}

.ozon-debug {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
  text-align: center;
}
.ozon-map-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  z-index: 2;
  text-align: center;
  color: #333;
  font-size: 13px;
  gap: 10px;
  flex-direction: column;
}
.ozon-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #cbd5e1;
  border-top-color: #005BFF;
  border-radius: 50%;
  animation: ozon-spin 1s linear infinite;
}
@keyframes ozon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ozon-price-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.ozon-price-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  max-width: 420px;
  width: min(420px, 92vw);
  box-shadow: 0 14px 40px rgba(0,0,0,0.2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.ozon-price-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}
.ozon-price-text {
  font-size: 14px;
  color: #333;
  margin: 0 0 6px 0;
}
.ozon-price-hint {
  font-size: 12px;
  color: #666;
  margin: 0 0 12px 0;
}
.ozon-price-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ozon-price-actions button {
  border-radius: 10px;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ozon-price-cancel {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}
.ozon-price-confirm {
  background: #005BFF;
  color: #fff;
}
@media (max-width: 980px) {
  .ozon-popup-overlay {
    padding: 12px;
  }
  .ozon-popup-content {
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .ozon-pvz-container {
    width: 100%;
    padding: 14px;
  }
  .ozon-main {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #ozon-map,
  .ozon-map-wrap {
    min-height: 260px;
    height: 42vh;
    max-height: 360px;
  }
  .ozon-side {
    height: auto;
    min-height: 0;
  }
  .ozon-point-details {
    min-height: 160px;
    max-height: none;
  }
  .ozon-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0 -14px -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, #fff 82%, rgba(255,255,255,0.92) 100%);
    border-top: 1px solid #eef2f7;
  }
  .ozon-confirm-btn,
  .ozon-close-btn {
    flex: 1 1 180px;
  }
  .ozon-pvz-widget__row {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 8px;
  }
  .ozon-pvz-widget__map-btn {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
  }
}
