/* Order success modal — Balka-MSK (from approved mock, page chrome excluded) */
.balka-order-success-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 28, 25, 0.5);
  backdrop-filter: blur(1px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.balka-order-success-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.balka-order-success-modal {
  --osm-orange: #dd7a22;
  --osm-orange-hover: #c2681a;
  --osm-cream: #f1e9dd;
  --osm-dark: #2a2521;
  --osm-muted: #746b63;
  --osm-white: #ffffff;
  --osm-shadow: 0 26px 80px rgba(38, 29, 21, 0.23);
  position: fixed;
  z-index: 1210;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(660px, calc(100vw - 28px));
  max-height: calc(100dvh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--osm-white);
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: var(--osm-shadow);
  color: var(--osm-dark);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.balka-order-success-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.balka-order-success-modal .osm-close {
  position: absolute;
  right: 18px;
  top: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8b8178;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.balka-order-success-modal .osm-close:hover {
  background: #f5efe8;
  color: var(--osm-dark);
}

.balka-order-success-modal .osm-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #fff6eb;
  border: 10px solid #fff1e0;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
}
.balka-order-success-modal .osm-icon svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--osm-orange);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balka-order-success-modal > h2 {
  text-align: center;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.balka-order-success-modal .osm-order-number {
  text-align: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.balka-order-success-modal .osm-order-number strong {
  font-size: 25px;
  color: var(--osm-orange);
  margin-left: 4px;
}
.balka-order-success-modal .osm-lead {
  text-align: center;
  color: #5f5750;
  max-width: 520px;
  margin: 0 auto 22px;
  font-size: 14px;
}

.balka-order-success-modal .osm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.balka-order-success-modal .osm-card {
  border: 1px solid #e7d9cb;
  background: linear-gradient(135deg, #fff, #fbf6ef);
  border-radius: 13px;
  padding: 18px;
  min-height: 180px;
}
.balka-order-success-modal .osm-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.balka-order-success-modal .osm-card-title h3 {
  margin: 0;
  font-size: 18px;
}
.balka-order-success-modal .osm-ui-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--osm-orange);
  flex: none;
}
.balka-order-success-modal .osm-ui-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balka-order-success-modal .osm-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  color: #5d554e;
  font-size: 13px;
}
.balka-order-success-modal .osm-steps li {
  position: relative;
  padding-left: 18px;
}
.balka-order-success-modal .osm-steps li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--osm-orange);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.55em;
}

.balka-order-success-modal .osm-subhead {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.balka-order-success-modal .osm-pickup p,
.balka-order-success-modal .osm-delivery p,
.balka-order-success-modal .osm-contacts p {
  font-size: 13px;
  color: #544c45;
  line-height: 1.45;
  margin: 0;
}
.balka-order-success-modal .osm-pickup-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.balka-order-success-modal .osm-pickup-list li {
  font-size: 13px;
  color: #544c45;
  line-height: 1.45;
}
.balka-order-success-modal .osm-pickup-list b {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--osm-dark);
}
.balka-order-success-modal .osm-card small {
  font-size: 12px;
  color: var(--osm-muted);
  line-height: 1.4;
}
.balka-order-success-modal .osm-divider {
  height: 1px;
  background: #eadfd4;
  margin: 14px 0;
}

.balka-order-success-modal .osm-docs {
  display: flex;
  flex-direction: column;
}
.balka-order-success-modal .osm-docs .osm-card-title {
  margin-bottom: 12px;
}
.balka-order-success-modal .osm-btn {
  min-height: 48px;
  border-radius: 9px;
  border: 1px solid var(--osm-orange);
  padding: 0 20px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.balka-order-success-modal .osm-btn.is-primary {
  background: var(--osm-orange);
  color: #fff;
}
.balka-order-success-modal .osm-btn.is-primary:hover {
  background: var(--osm-orange-hover);
}
.balka-order-success-modal .osm-btn.is-secondary {
  background: #fff;
  color: var(--osm-orange);
}
.balka-order-success-modal .osm-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.balka-order-success-modal .osm-docs .osm-btn {
  width: 100%;
  margin-top: 9px;
  font-size: 13px;
}

.balka-order-success-modal .osm-phone {
  font-size: 19px;
  font-weight: 800;
  color: var(--osm-orange);
  display: block;
  margin: 4px 0 8px;
  text-decoration: none;
}
.balka-order-success-modal .osm-site {
  font-size: 13px;
  color: #5d554e;
  text-decoration: none;
}
.balka-order-success-modal .osm-site:hover,
.balka-order-success-modal .osm-phone:hover {
  text-decoration: underline;
}

.balka-order-success-modal .osm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.balka-order-success-modal .osm-actions .osm-btn {
  width: 100%;
}

/* Delivery keeps the same 2×2 grid; fulfillment card swaps Самовывоз → Доставка */
.balka-order-success-modal.is-delivery .osm-grid {
  grid-template-columns: 1fr 1fr;
}

body.has-order-success-modal {
  overflow: hidden;
}

.order-submitted-chip {
  display: none;
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid #c8e6c0;
  background: #f3faf1;
  color: #2f5d2a;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.order-submitted-chip.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 620px) {
  .balka-order-success-modal {
    padding: 23px 16px 16px;
    border-radius: 15px;
    max-height: calc(100dvh - 24px);
    width: min(660px, calc(100vw - 16px));
  }
  .balka-order-success-modal .osm-icon {
    width: 68px;
    height: 68px;
    border-width: 8px;
  }
  .balka-order-success-modal > h2 {
    font-size: 24px;
  }
  .balka-order-success-modal .osm-order-number {
    font-size: 15px;
  }
  .balka-order-success-modal .osm-order-number strong {
    font-size: 20px;
  }
  .balka-order-success-modal .osm-grid,
  .balka-order-success-modal.is-delivery .osm-grid {
    grid-template-columns: 1fr;
  }
  .balka-order-success-modal .osm-actions {
    grid-template-columns: 1fr;
  }
  .balka-order-success-modal .osm-card {
    min-height: auto;
    padding: 16px;
  }
}
