/**
 * p55-apiship стили
 */
.p55-apiship-block {
  margin-top: 12px;
  margin-bottom: 12px;
}

.p55-apiship-body {
  padding: 12px;
  background: #f9f9f9;
  border-radius: 6px;
}

.p55-apiship-settings {
  margin-bottom: 12px;
}

.p55-apiship-btn-map {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #59473a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.p55-apiship-btn-map:hover {
  background: #db7d3d;
}

.p55-apiship-address-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.p55-apiship-info {
  list-style: none;
  margin: 0;
  padding: 0;
}

.p55-apiship-info li {
  margin-bottom: 6px;
  font-size: 14px;
}

.p55-apiship-info .loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ddd;
  border-top-color: #db7d3d;
  border-radius: 50%;
  animation: p55spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes p55spin {
  to { transform: rotate(360deg); }
}

.p55-apiship-error-msg {
  color: #c00;
  font-size: 12px;
  display: none;
}

.p55-apiship-empty {
  padding: 16px;
  color: #666;
}

/* Настройки админки */
.p55-apiship-settings .mg-box {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.p55-apiship-settings .mg-form-group {
  margin-bottom: 15px;
}

.p55-apiship-settings .mg-form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.p55-apiship-settings .mg-btn-primary {
  background: #007bff;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Модальное окно пунктов выдачи */
.p55-apiship-modal-map {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.p55-apiship-modal-wrap {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.p55-apiship-modal-top {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  display: flex;
  gap: 12px;
  align-items: center;
}

.p55-apiship-map-filter {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.p55-apiship-modal-close {
  padding: 6px 12px;
  background: #666;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.p55-apiship-modal-box {
  display: flex;
  overflow: hidden;
  min-height: 400px;
  flex: 1;
}

.p55-apiship-points-list {
  width: 45%;
  min-width: 0;
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid #eee;
}

.p55-point-item {
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.p55-point-item:hover {
  background: #f5f5f5;
  border-color: #db7d3d;
}

.p55-apiship-map-container {
  width: 55%;
  min-height: 350px;
  height: 350px;
  background: #e8e8e8;
}

.p55-apiship-map-container .leaflet-container {
  height: 100% !important;
  min-height: 350px;
}

.p55-map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 350px;
  color: #999;
  font-size: 14px;
}

.p55-points-loading {
  padding: 24px;
  text-align: center;
  color: #666;
  font-size: 14px;
}


/* 3. Принудительное сжатие input (radio) */
.p55-delivery-card__options .p55-delivery-option input[type="radio"] {
    height: 10px !important;
    width: 10px !important;
}



/* Группированные карточки доставки
   === РЕГУЛИРОВКА ВЫСОТЫ: mg-plugins/p55-apiship/css/style.css, .p55-delivery-grouped ===
   Переменные для эксперимента:
   --p55-card-padding    — внутренний отступ карточки (по умолч. 12px)
   --p55-header-margin   — отступ под шапкой с логотипом (8px)
   --p55-option-padding-y — вертикальный padding кнопок «До ПВЗ», «До двери» (4=компактно, 8 или 10=выше)
   --p55-option-padding-x — горизонтальный padding кнопок (10px)
   --p55-option-gap      — расстояние между кнопками (6px)
   --p55-icon-size       — размер иконки логотипа (36px) */
.p55-delivery-grouped {
  --p55-card-padding: 12px;
  --p55-header-margin: 8px;
  --p55-option-padding-y: 4px;
  --p55-option-padding-x: 10px;
  --p55-option-gap: 6px;
  --p55-icon-size: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p55-delivery-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: var(--p55-card-padding);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
}

.p55-delivery-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--p55-header-margin);
  width: 100%;
}

.c-order .c-form .p55-delivery-card__options label {
  height: auto;
  
}

.p55-delivery-card__icon {
  width: var(--p55-icon-size);
  height: var(--p55-icon-size);
  object-fit: contain;
}

.p55-delivery-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.p55-delivery-card__options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--p55-option-gap);
}

.p55-delivery-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--p55-option-padding-y) var(--p55-option-padding-x);
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  min-height: 0;
  transition: border-color 0.2s, background 0.2s;
}

.p55-delivery-option span {
  line-height: 1;
  display: flex;
  margin: 0;
  padding: 0 25px 0 0;
}

.p55-delivery-option:hover {
  border-color: #db7d3d;
  background: #fff9f5;
}

.p55-delivery-option.active {
  border-color: #59473a;
  background: #59473a;
  color: #fff;
}

.p55-delivery-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.p55-delivery-card__body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  width: 100%;
}

.p55-delivery-cost-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.p55-delivery-cost-time .p55-price,
.p55-delivery-cost-time .p55-time {
  font-weight: 600;
}

.p55-delivery-cost-time .p55-price-value,
.p55-delivery-cost-time .p55-time-value,
.p55-delivery-cost-time .p55-price span:not(.loader),
.p55-delivery-cost-time .p55-time span:not(.loader) {
  font-weight: 600;
  color: #59473a;
}

.p55-delivery-cost-time .loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ddd;
  border-top-color: #db7d3d;
  border-radius: 50%;
  animation: p55spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.p55-apiship-address {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

.p55-apiship-point-trigger {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: #59473a;
  text-decoration: underline;
  cursor: pointer;
}

.p55-apiship-point-trigger:hover {
  color: #db7d3d;
}

/* Автозаполнение города DaData */
.p55-dadata-suggest {
  position: absolute;
  z-index: 10001;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 280px;
  overflow-y: auto;
  font-size: 14px;
}

.p55-dadata-suggest-hint {
  padding: 8px 12px;
  color: #888;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.p55-dadata-suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.p55-dadata-suggest-item:last-child {
  border-bottom: none;
}

.p55-dadata-suggest-item:hover {
  background: #f9f9f9;
}

.p55-dadata-highlight {
  color: #2563eb;
  font-weight: 600;
  background: transparent;
}
