/* Nova Poshta checkout block — matches .order_placement form styles in style.css */
.order_placement .np-delivery { width: 100%; max-width: 100%; box-sizing: border-box; }
.order_placement .np-tariff-note { flex-basis: 100%; margin-top: 0; }
.order_placement .np-combo { position: relative; width: 100%; }
.order_placement .np-combo .input input { padding-right: 12px; text-overflow: ellipsis; }

.np-list {
  display: none;
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px);
  max-height: min(300px, 45vh); max-width: 100%;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff; border: 1px solid #cecece; border-radius: 5px;
  box-shadow: 0 8px 24px rgba(19, 20, 20, 0.12);
  box-sizing: border-box;
}
.np-list.open { display: block; }
.np-list .np-item {
  padding: 10px 12px; font-size: 14px; line-height: 1.35; color: #131414; cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  overflow-wrap: anywhere; word-break: break-word;
}
.np-list .np-item:last-child { border-bottom: 0; }
.np-list .np-item:hover, .np-list .np-item.active { background: rgba(0, 197, 149, 0.1); }
.np-list .np-item b { font-weight: 500; }
.np-list .np-sub { display: block; font-size: 12px; color: rgba(74, 87, 89, 0.7); margin-top: 2px; }
.np-list .np-kg { font-weight: 400; color: rgba(74, 87, 89, 0.7); }
.np-list .np-status { padding: 10px 12px; font-size: 14px; color: rgba(74, 87, 89, 0.8); }
.np-list .np-status-error { color: #d93025; }
.np-list .np-status-loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid #cecece; border-top-color: #00c595; border-radius: 50%; animation: np-spin .7s linear infinite;
}
@keyframes np-spin { to { transform: rotate(360deg); } }

.np-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.np-quick-city {
  border: 1px solid #cecece; background: #fff; color: #131414; border-radius: 100px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; line-height: 1.2;
}
.np-quick-city:hover, .np-quick-city:focus { border-color: #00c595; outline: none; }

.np-types { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.np-type {
  flex: 1 1 0; min-width: 0; border: 1px solid #cecece; background: #fff; color: #131414;
  border-radius: 5px; padding: 9px 10px; font-size: 14px; font-weight: 500; cursor: pointer; line-height: 1.2;
  overflow-wrap: anywhere; word-break: break-word;
}
.np-type.active { border-color: #00c595; background: rgba(0, 197, 149, 0.1); }
.np-type.disabled { opacity: .45; cursor: not-allowed; }
.np-type:focus-visible { outline: 2px solid #00c595; outline-offset: 1px; }
.order_placement .np-postomat-note { margin-top: 8px; }

.np-courier-fields { display: none; }
.np-error { display: none; color: #d93025; font-size: 13px; margin-top: 5px; }
.np-error.show { display: block; }
.order_placement .np-invalid .input { border-color: #d93025; }

.np-form-errors {
  margin: 20px 0 0; padding: 12px 14px; border-radius: 5px; font-size: 14px; line-height: 1.4;
  background: #fdecea; color: #a50e0e; border: 1px solid #f5c2bd;
}
.order_placement .np-pay-notes .checkbox_row__footnote { margin-top: 10px; }

/* dark theme */
.dark .np-list { background: #1e1f20; border-color: #3a3a3a; }
.dark .np-list .np-item { color: #fff; border-bottom-color: #2c2c2c; }
.dark .np-quick-city, .dark .np-type { background: transparent; color: #fff; border-color: #4a4a4a; }

@media (max-width: 680px) {
  .order_placement .np-delivery .form_row.two_inputs { gap: 10px; }
  .np-types { gap: 6px; }
  .np-type { padding: 8px 4px; font-size: 13px; }
  .np-list { max-height: min(260px, 42vh); }
  .np-list .np-item { padding: 12px; }      /* bigger touch targets */
  .np-quick-city { padding: 7px 12px; min-height: 32px; }
  .order_placement .np-combo .input input { font-size: 16px; } /* no iOS zoom on focus */
}
@media (max-width: 360px) {
  .np-types { gap: 4px; }
  .np-type { padding: 8px 3px; font-size: 12px; }
}

/* Pre-existing .cart columns can be wider than a 320px screen (min-content + flex-shrink:0).
   Scope: checkout page only. */
@media (max-width: 359px) {
  .page_checkout .cart,
  .page_checkout .cart__left,
  .page_checkout .cart__right,
  .page_checkout .order_placement {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}
