/* static/shop/css/delivery-panel.css */
/* Инлайн-панель выбора доставки при покупке в 1 клик */

.pdp__buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
}

.pdp__buy-icon {
  flex-shrink: 0;
}

.pdp__buy-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgb(138, 133, 126);
  border-top-color: #e8dfd4;
  border-radius: 50%;
  animation: pdp-spin .6s linear infinite;
}

@keyframes pdp-spin {
  to { transform: rotate(360deg); }
}

.delivery-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
  margin-top: 12px;
}

.delivery-panel__inner {
  background: #e8dfd4;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: 16px;
}

.delivery-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 12px;
}

.delivery-panel__close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.delivery-panel__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.delivery-panel__tab {
  flex: 1;
  padding: 10px;
  border: 1px solid #e8dfd4;
  border-radius: 8px;
  background: #e8dfd4;
  cursor: pointer;
  min-height: 44px;
  transition: background .2s, color .2s;
}

.delivery-panel__tab.is-active {
  background: #8fa677;
  color: #e8dfd4;
  border-color: #8fa677;
}

.delivery-tab__row {
  margin-bottom: 12px;
  position: relative;
}

.delivery-tab__row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.delivery-suggest {
  position: absolute;
  z-index: 20;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 4px;
  width: 100%;
  list-style: none;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.delivery-suggest li {
  padding: 8px 12px;
  cursor: pointer;
}

.delivery-suggest li:hover {
  background: #f4f4f4;
}

.delivery-tab__pvz-btn {
  width: 100%;
  min-height: 44px;
}

.delivery-tab__map {
  height: 550px;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.delivery-tab__error {
  color: #c0392b;
  margin-top: 8px;
}

.delivery-panel__confirm {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
}

.delivery-panel__confirm:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .delivery-panel__inner { padding: 12px; }
  .delivery-tab__row--split { grid-template-columns: 1fr; }
  .delivery-tab__map { height: 350px; }
  .delivery-panel__tab,
  .delivery-panel__confirm,
  .pdp__buy {
    min-height: 44px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .delivery-panel {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
}