html.bf-modal-open {
  overflow: hidden;
}

.bf-dialog {
  --bf-ink: #f4f6f7;
  --bf-muted: #a7adb7;
  --bf-line: #383d47;
  --bf-surface: #1b2028;
  --bf-accent: var(--yellow, #ffe136);
  direction: rtl;
  color-scheme: dark;
  color: var(--bf-ink);
  background: #14171c;
  border: 1px solid #444a55;
  border-radius: 17px;
  box-shadow: 0 25px 100px #0009;
  width: min(590px, calc(100vw - 32px));
  max-width: none;
  max-height: min(92dvh, 880px);
  height: auto;
  padding: 0;
  margin: auto;
  overflow: hidden;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  text-align: right;
  overscroll-behavior: contain;
}
.bf-dialog:has(.bf-retail-amounts) {
  height: fit-content;
}
.bf-dialog::backdrop {
  background: rgb(3 5 10 / 80%);
  backdrop-filter: blur(7px);
}
.bf-dialog *,
.bf-dialog *::before,
.bf-dialog *::after {
  box-sizing: border-box;
}
.bf-dialog [hidden] {
  display: none !important;
}
.bf-dialog svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.bf-dialog button,
.bf-dialog input,
.bf-dialog select,
.bf-dialog textarea {
  font: inherit;
  letter-spacing: normal;
}
.bf-dialog button {
  cursor: pointer;
}
.bf-dialog button:focus-visible,
.bf-dialog a:focus-visible {
  outline: 2px solid var(--bf-accent);
  outline-offset: 3px;
}
.bf-dialog button:disabled {
  cursor: wait;
  opacity: 0.73;
}
.bf-shell {
  display: flex;
  flex-direction: column;
  max-height: min(calc(92dvh - 2px), 878px);
}
.bf-head {
  flex: none;
  display: block;
  position: relative;
  color: var(--bf-ink);
  background: #181c23;
  padding: 23px 31px 17px;
  border-bottom: 1px solid var(--bf-line);
  z-index: auto;
  width: auto;
  height: auto;
}
.bf-brandline {
  display: flex;
  flex-direction: row;
  gap: 3px;
  direction: ltr;
  justify-content: flex-end;
  height: 7px;
  padding-inline: 1px;
  margin-bottom: 8px;
}
.bf-brandline i {
  width: 7px;
  height: 7px;
  background: var(--bf-accent);
  transform: skew(-25deg);
}
.bf-titlerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.bf-dialog .bf-titlerow h2 {
  color: var(--bf-ink);
  font-family: inherit;
  font-size: clamp(24px, 3.8vw, 32px);
  line-height: 1.55;
  font-weight: 850;
  letter-spacing: -0.045em;
  outline: none;
  margin: 0;
}
.bf-close,
.bf-copy,
.bf-link {
  background: transparent;
  color: inherit;
}
.bf-close {
  border: 1px solid #454c58;
  border-radius: 50%;
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.bf-close:hover {
  background: #2c333d;
}
.bf-close svg {
  height: 17px;
  width: 17px;
}
.bf-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 31px 28px;
  scrollbar-color: #505763 #171a20;
  min-height: 0;
}
.bf-intro,
.bf-confirm > p {
  font-size: 14px;
  color: #c3c8d0;
  line-height: 1.9;
  margin: 0 0 20px;
}
.bf-pack {
  margin: 0 0 21px;
  padding: 15px 17px;
  border: 1px solid #3b4652;
  border-radius: 8px;
  background: linear-gradient(130deg, #1d2730, #181d24 72%);
}
.bf-pack-head, .bf-box-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bf-pack-head > svg { color: #83d6ff; }
.bf-dialog .bf-pack h3, .bf-dialog .bf-contact-tip h3 {
  margin: 0;
  font: inherit;
  font-weight: 750;
  font-size: 15px;
  color: var(--bf-ink);
}
.bf-pack-head > span, .bf-box-row > small {
  color: #bac5d2;
  font-size: 12px;
}
.bf-pack-head > span { margin-inline-start: auto; }
.bf-box-field {
  border: 0;
  min-width: 0;
  padding: 0;
  margin: 14px 0 0;
}
.bf-box-field legend { font-weight: 650; font-size: 13px; margin-bottom: 5px; padding: 0; }
.bf-stepper {
  direction: ltr;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #525e6b;
  border-radius: 6px;
  background: #10161c;
}
.bf-stepper > button, .bf-stepper > input {
  min-height: 40px;
  padding: 0;
  text-align: center;
  border: 0;
  border-radius: 4px;
  color: var(--bf-ink);
}
.bf-stepper > input {
  width: 76px;
  min-width: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}
.bf-stepper > input:focus-visible { outline: 2px solid #83d6ff; outline-offset: -2px; }
.bf-stepper > input[aria-invalid="true"] { outline: 1px solid #ff9a8f; }
.bf-stepper > button { width: 40px; background: #2f3943; font-size: 18px; }
.bf-stepper > button:hover:enabled { color: var(--bf-accent); background: #3a4653; }
.bf-stepper > button:disabled { opacity: .43; cursor: default; }
.bf-pack-total, .bf-receipt-quantity {
  color: #d3dae2;
  font-size: 14px;
  line-height: 1.8;
  margin: 12px 0 0;
  font-variant-numeric: tabular-nums;
}
.bf-pack-total:empty { display: none; }
.bf-retail-count { max-width: 154px; margin-top: 14px; }
.bf-retail-amounts { font-size: 14px; margin: 12px 0 0; }
.bf-retail-amounts > div, .bf-order-status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.bf-retail-amounts dt, .bf-order-status { color: #c2cad4; }
.bf-retail-amounts dd { margin: 0; font-variant-numeric: tabular-nums; }
.bf-retail-amounts > div + div { border-top: 1px solid #3b4652; margin-top: 7px; padding-top: 8px; }
.bf-retail-amounts [data-order-total], .bf-order-status strong { color: var(--bf-accent); font-weight: 750; }
.bf-order-status { margin-bottom: 10px; font-size: 14px; }
.bf-contact-tip {
  margin-bottom: 15px;
  padding: 13px 15px;
  border-inline-start: 3px solid var(--bf-accent);
  border-radius: 5px;
  background: #23261f;
}
.bf-contact-tip p { margin: 4px 0 0; color: #d2d6cb; font-size: 13px; line-height: 1.85; }
.bf-factory-phones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bf-factory-phones a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  color: #a7deff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bf-factory-phones svg { width: 14px; height: 14px; }
.bf-guide-link {
  display: inline-block;
  margin-top: 6px;
  color: #a1dcff;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.bf-guide-link:hover { color: #ddf2ff; }
.bf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 14px;
}
.bf-wide {
  grid-column: 1 / -1;
}
.bf-field {
  min-width: 0;
}
.bf-field label {
  display: block;
  color: #e7eaef;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.7;
  margin: 0 0 6px;
}
.bf-field label small {
  color: var(--bf-muted);
  font-weight: 400;
  font-size: 12px;
}
.bf-dialog .bf-field :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  appearance: none;
  outline: none;
  box-shadow: none;
  text-align: start;
  border: 1px solid #414854;
  border-radius: 7px;
  padding: 8px 11px;
  background: #1d222b;
  color: var(--bf-ink);
  line-height: 1.5;
  font-size: 15px;
  margin: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.bf-field textarea {
  resize: vertical;
  max-height: 200px;
}
.bf-field input::placeholder {
  color: #858f9e;
  opacity: 1;
}
.bf-dialog .bf-field :is(input, select, textarea):focus-visible {
  border-color: #96b6ff;
  box-shadow: 0 0 0 2px #709bff2c;
}
.bf-dialog .bf-field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: #ff9a8f;
}
.bf-field-error {
  color: #ffb6a8;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.bf-field-error:empty {
  display: none;
}
.bf-select,
.bf-search {
  position: relative;
}
.bf-select > svg {
  width: 15px;
  height: 15px;
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #bac3d1;
}
.bf-dialog .bf-select select {
  padding-inline-end: 34px;
}
.bf-actions {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.bf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  line-height: 1.6;
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--bf-accent);
  color: #171907;
  font-weight: 800 !important;
}
.bf-button:hover {
  background: #f9ff76;
}
.bf-button svg {
  width: 17px;
  height: 17px;
}
.bf-link {
  border: 0;
  border-radius: 4px;
  padding: 6px 0;
  color: #d7dce4;
  font-weight: 600;
}
.bf-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.bf-message,
.bf-no-results {
  font-size: 13px;
  margin: 16px 0 0;
  padding: 10px 13px;
  background: #362526;
  color: #ffbfaf;
  border: 1px solid #634046;
  border-radius: 7px;
}
.bf-loading {
  margin: 0;
  color: var(--bf-muted);
}
.bf-empty {
  padding-block: 4px 8px;
}
.bf-empty-icon,
.bf-success-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #3d506d;
  border-radius: 12px;
  background: #1d2b3d;
  color: #8bb9ff;
  margin-bottom: 16px;
}
.bf-empty-icon svg,
.bf-success-icon svg {
  width: 25px;
  height: 25px;
}
.bf-dialog .bf-empty h3,
.bf-dialog .bf-dealer h3 {
  font-family: inherit;
  font-size: 20px;
  line-height: 1.7;
  margin: 0 0 5px;
  color: var(--bf-ink);
  letter-spacing: -0.02em;
}
.bf-empty p,
.bf-dealer p {
  color: var(--bf-muted);
  font-size: 14px;
  line-height: 1.85;
  margin: 0;
}
.bf-success-icon {
  background: #2a301d;
  border-color: #434d2a;
  color: var(--bf-accent);
}
.bf-code {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  padding: 14px;
  background: var(--bf-surface);
  border: 1px solid var(--bf-line);
  border-radius: 9px;
}
.bf-code > span {
  color: var(--bf-muted);
  font-size: 13px;
}
.bf-code > strong {
  user-select: all;
  color: #fff;
  font:
    650 clamp(15px, 3vw, 20px) / 1.5 ui-monospace,
    Consolas,
    monospace;
  letter-spacing: 0.025em;
}
.bf-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a6c5ff;
  border: 0;
  border-radius: 3px;
  padding: 5px;
  margin-inline-start: auto;
  font-size: 13px !important;
}
.bf-copy svg {
  width: 15px;
  height: 15px;
}
.bf-feedback {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: #c1e49a;
}
.bf-feedback:empty {
  display: none;
}
.bf-tracking {
  background: var(--bf-surface);
  border: 1px solid var(--bf-line);
  border-radius: 9px;
  padding: 15px 17px;
  margin-top: 21px;
  font-size: 14px;
}
.bf-status {
  display: flex;
  align-items: center;
  gap: 9px;
}
.bf-status svg,
.bf-status strong {
  color: var(--bf-accent);
}
.bf-status strong {
  margin-inline-start: auto;
}
.bf-tracking dl {
  margin: 14px 0 0;
  border-top: 1px solid var(--bf-line);
  padding-top: 8px;
}
.bf-tracking dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 5px;
}
.bf-tracking dt {
  color: var(--bf-muted);
}
.bf-tracking dd {
  margin: 0;
}
.bf-search > svg {
  position: absolute;
  inset-inline-start: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bf-muted);
  width: 17px;
  height: 17px;
}
.bf-dialog .bf-search input {
  padding-inline-start: 37px;
}
.bf-dealer {
  padding: 13px 15px;
  background: var(--bf-surface);
  border: 1px solid var(--bf-line);
  border-radius: 8px;
  margin-top: 12px;
}
.bf-dialog .bf-dealer h3 {
  font-size: 17px;
}
.bf-dealer > span,
.bf-dealer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.bf-dealer svg {
  width: 15px;
  height: 15px;
}
.bf-dealer > span {
  color: #c2c9d4;
}
.bf-dealer a {
  color: #a4c6ff;
  text-decoration: none;
  margin-top: 5px;
}
.bf-dealer a:hover {
  text-decoration: underline;
}
.bf-no-results {
  color: var(--bf-muted);
  background: var(--bf-surface);
  border-color: var(--bf-line);
}

@media (max-width: 520px) {
  .bf-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .bf-shell {
    max-height: calc(100dvh - 18px);
  }
  .bf-head {
    padding: 15px 17px 12px;
  }
  .bf-content {
    padding: 16px 17px 21px;
  }
  .bf-intro {
    margin-bottom: 14px;
  }
  .bf-grid {
    gap: 12px 10px;
  }
  .bf-pack { padding: 12px; }
  .bf-pack-head { flex-wrap: wrap; gap: 6px 8px; }
  .bf-box-row { flex-wrap: wrap; gap: 6px 10px; }
  .bf-actions {
    gap: 10px 15px;
    margin-top: 18px;
  }
  .bf-button {
    width: 100%;
  }
  .bf-link {
    width: 100%;
  }
  .bf-dialog .bf-field :is(input, select, textarea) {
    font-size: 16px;
  }
  .bf-form .bf-button {
    justify-content: space-between;
  }
  .bf-code {
    gap: 8px;
  }
}
@media (max-width: 350px) {
  .bf-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .bf-dialog[open] {
    animation: bf-enter 0.19s ease-out;
  }
  @keyframes bf-enter {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
