.position-delete-confirm {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: #25313d;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.position-delete-confirm::backdrop {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
}

.position-delete-confirm__body {
  padding: 30px 30px 22px;
  text-align: center;
}

.position-delete-confirm__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: #c9362b;
  background: #fff0ee;
  font-size: 27px;
}

.position-delete-confirm[data-deleting="true"] .position-delete-confirm__icon::after {
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(201, 54, 43, 0.16);
  border-top-color: #c9362b;
  border-radius: 50%;
  content: "";
  animation: position-delete-spinner 0.8s linear infinite;
}

.position-delete-confirm[data-deleting="true"] .position-delete-confirm__icon i {
  animation: position-delete-trash 0.8s ease-in-out infinite alternate;
}

.position-add-progress .position-delete-confirm__body {
  padding-bottom: 30px;
}

.position-add-progress .position-delete-confirm__icon {
  color: #2563eb;
  background: #eff6ff;
}

.position-add-progress[data-deleting="true"] .position-delete-confirm__icon::after {
  border-color: rgba(37, 99, 235, 0.16);
  border-top-color: #2563eb;
}

.position-add-progress[data-deleting="true"] .position-delete-confirm__icon i {
  animation-name: position-add-icon;
}

.position-delete-confirm__title {
  margin: 0 0 9px;
  color: #202b36;
  font-size: 22px;
  font-weight: 750;
}

.position-delete-confirm__text {
  margin: 0;
  color: #6b7785;
  font-size: 15px;
  line-height: 1.55;
}

.position-delete-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 30px 30px;
}

.position-delete-confirm[data-deleting="true"] .position-delete-confirm__actions {
  visibility: hidden;
  pointer-events: none;
}

@keyframes position-delete-spinner {
  to { transform: rotate(360deg); }
}

@keyframes position-delete-trash {
  from { transform: translateY(-2px) rotate(-5deg); }
  to { transform: translateY(2px) rotate(5deg); }
}

@keyframes position-add-icon {
  from { transform: scale(0.88); }
  to { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .position-delete-confirm[data-deleting="true"] .position-delete-confirm__icon::after,
  .position-delete-confirm[data-deleting="true"] .position-delete-confirm__icon i {
    animation-duration: 1.8s;
  }
}

.position-delete-confirm__button {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  font-weight: 700;
  outline: none;
}

.position-delete-confirm__button--cancel {
  color: #344250;
  background: #eef1f4;
}

.position-delete-confirm__button--cancel:hover,
.position-delete-confirm__button--cancel:focus-visible {
  background: #e2e7eb;
}

.position-delete-confirm__button--cancel:focus-visible {
  box-shadow: 0 0 0 3px rgba(52, 66, 80, 0.18);
}

.position-delete-confirm__button--delete {
  color: #fff;
  background: #cf3529;
  box-shadow: 0 9px 20px rgba(207, 53, 41, 0.24);
}

.position-delete-confirm__button--delete:hover,
.position-delete-confirm__button--delete:focus-visible {
  background: #b92e24;
}

.position-delete-confirm__button--delete:focus-visible {
  box-shadow: 0 0 0 3px rgba(207, 53, 41, 0.2), 0 9px 20px rgba(207, 53, 41, 0.24);
}

@media (max-width: 480px) {
  .position-delete-confirm__body {
    padding: 26px 22px 20px;
  }

  .position-delete-confirm__actions {
    grid-template-columns: 1fr;
    padding: 0 22px 24px;
  }
}

/* ========== Request Page (scoped) ========== */
.request-page {
  --rp-brand: #435ebe;
  --rp-brand-2: #6f87ff;
  --rp-muted: #6c757d;
  --rp-border: rgba(0,0,0,.08);
  --rp-shadow: 0 .75rem 1.5rem rgba(67,94,190,.08);
  --rp-radius: .75rem;

  /* Токены */
  --accent:     #F7B11F;
  --bg-dark:    #10101A;
  --bg-light:   #FCFCFD;
  --text-dark:  #222E3C;
  --text-light: #E9EAEC;
  --radius:     .5rem;
}

.request-page .position-calculation-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  color: #435ebe;
  background: linear-gradient(180deg, rgba(241, 245, 249, .96), rgba(226, 232, 240, .96));
}

.request-page .position-calculation-loader .calculation-cube {
  font-size: 42px;
}

.request-page .position-item.is-calculation-pending {
  border-color: rgba(100, 116, 139, .12) !important;
  background: #eef1f4 !important;
  box-shadow: 0 .35rem 1rem rgba(15, 23, 42, .04) !important;
}

.request-page .position-item.is-calculation-pending .position-calculation-loader {
  display: flex;
}

.request-page .position-item.is-calculation-pending .position-preview > img,
.request-page .position-item.is-calculation-pending .position-preview-placeholder {
  display: none !important;
}

.request-page .position-item.is-calculation-pending .card-body,
.request-page .position-item.is-calculation-pending .count-badge {
  opacity: .24;
  filter: grayscale(1);
}

.request-page .position-item.is-calculation-pending .position-price-row,
.request-page .position-item.is-calculation-pending .position-actions {
  display: none !important;
}

.request-page .position-item.is-price-unresolved .position-action-buttons {
  display: none !important;
}

[data-bs-theme="dark"] .request-page .position-calculation-loader {
  color: #91a4ff;
  background: linear-gradient(180deg, rgba(30, 41, 59, .97), rgba(15, 23, 42, .97));
}

.request-page .request-page-shell {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: clamp(1rem, 1.4vw, 1.75rem);
  padding-right: clamp(1rem, 1.4vw, 1.75rem);
}

/* Общий “карточный” стиль */
.request-page .rp-card {
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  overflow: hidden;
}

/* Лёгкий тюнинг иконок */
.request-page .bi { vertical-align: -0.125em; }

/* ========= Блок “добавить в заказ” ========= */
.request-page .add-choice-card {
  cursor: pointer;
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  background: var(--bs-card-bg, var(--bs-body-bg, #fff));
  color: var(--bs-body-color);
  overflow: hidden;
}
.request-page .add-choice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rp-shadow);
  border-color: rgba(67,94,190,.24);
}

/* Изображение с соотношением сторон */
.request-page .img-aspect {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bs-tertiary-bg, #fafbff);
}
.request-page .img-aspect--wide { aspect-ratio: 16 / 9; }
.request-page .img-aspect > img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

[data-bs-theme="dark"] .request-page .add-choice-card {
  background: var(--bs-secondary-bg);
  border-color: rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .request-page .add-choice-card .card-body {
  background: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .request-page .add-choice-card .img-aspect {
  background: linear-gradient(135deg, #1a2230 0%, #151b26 100%);
}

/* ========= Позиции заказа ========= */
.request-page .position-item {
  transition: transform .16s ease, box-shadow .16s ease;
}
.request-page .position-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08);
}

.request-page .position-sync-progress {
  display: block;
  height: 4px;
  margin-top: .75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(67, 94, 190, .12);
}

.request-page .position-sync-progress__bar {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(67, 94, 190, .45), rgba(67, 94, 190, .9));
  animation: rp-sync-progress 1.15s ease-in-out infinite;
}

@keyframes rp-sync-progress {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(245%); }
}

/* Бейдж количества — акцентный, с тёмным текстом (как просили) */
.request-page .count-badge {
  position: absolute;
  top: .5rem;
  left: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 .5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--bg-dark);
  background: var(--accent);
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: none;
}

/* Компактный список характеристик */
.request-page .rp-kv li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  padding: .15rem 0;
  border-bottom: 1px dashed rgba(0,0,0,.06);
}
.request-page .rp-kv li:last-child { border-bottom: 0; }
.request-page .rp-kv li > span { color: var(--rp-muted); }
.request-page .rp-kv li > strong { white-space: nowrap; }

/* Цветовые кружки */
.request-page .color-circle {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.35);
  vertical-align: middle;
  margin-right: 4px;
}

/* Контрол количества */
.request-page .qty-control {
  gap: .35rem;
}
.request-page .qty-control .btn {
  border-radius: .5rem;
  min-width: 32px;
  padding: .25rem .5rem;
  line-height: 1;
}
.request-page .qty-control .qty-input {
  width: 56px;
  text-align: center;
  border-radius: .5rem;
  padding: .25rem .25rem;
}

/* Плавное исчезновение при удалении */
.request-page .fade-out {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity .3s ease, transform .3s ease;
}

/* Тосты — поверх всего */
.toast-container { z-index: 2050; }

/* Широкие модалки проекта */
.modal-custom-fixed { max-width: 1470px !important; }

/* ========== Адаптив ========== */
@media (max-width: 576px) {
  .request-page .request-page-shell {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .request-page .add-choice-card .card-body { padding: .75rem .5rem; }
  .request-page .img-aspect--wide { aspect-ratio: 3 / 2; }
  .request-page .qty-control .qty-input { width: 48px; }
}

/* Subtle request-page refresh aligned with the configurator modals. */
html:not([data-bs-theme="dark"]) .request-page{
  --rp-page-ink:#17212b;
  --rp-page-muted:#667281;
  --rp-page-border:rgba(23,33,43,.1);
  --rp-page-accent:#ea9216;
  --rp-page-soft:#fff3e3;
  --rp-page-panel:rgba(255,255,255,.9);
  --rp-page-shadow:0 12px 30px rgba(23,33,43,.065);
}
html:not([data-bs-theme="dark"]) .request-page .request-page-shell{
  color:var(--rp-page-ink);
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>div:first-child{
  margin-bottom:1rem!important;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>div:first-child h1{
  color:var(--rp-page-ink);
  font-size:1.42rem;
  font-weight:800;
  letter-spacing:-.015em;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>div:first-child .text-muted{
  color:var(--rp-page-muted)!important;
}
html:not([data-bs-theme="dark"]) .request-page .breadcrumb-header .breadcrumb{
  font-size:.82rem;
}
html:not([data-bs-theme="dark"]) .request-page .breadcrumb-header a{
  color:#344250;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card{
  border:1px solid var(--rp-page-border)!important;
  border-radius:14px;
  background:var(--rp-page-panel);
  box-shadow:var(--rp-page-shadow)!important;
  backdrop-filter:blur(10px);
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card>.card-body{
  min-height:5.7rem;
  padding:1rem 1.25rem;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card .text-muted{
  color:var(--rp-page-muted)!important;
  font-size:.72rem;
  font-weight:600;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card .fw-semibold{
  color:var(--rp-page-ink);
}
html:not([data-bs-theme="dark"]) .request-page .toolbar-stats .badge{
  padding:.38rem .62rem;
  border:1px solid rgba(255,255,255,.45);
  font-size:.68rem;
  font-weight:700;
  box-shadow:none;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card .btn-outline-secondary{
  min-height:2.05rem;
  padding:.38rem .72rem;
  border-color:rgba(23,33,43,.14);
  border-radius:999px;
  background:#fff;
  color:#52606d;
}
html:not([data-bs-theme="dark"]) .request-page #request-config-real>.rp-card .btn-outline-secondary:hover{
  border-color:rgba(234,146,22,.45);
  background:var(--rp-page-soft);
  color:#553915;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper{
  --bs-gutter-x:1rem;
  --bs-gutter-y:1rem;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .add-choice-card{
  border:1px solid var(--rp-page-border)!important;
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 22px rgba(23,33,43,.055)!important;
  transform:none;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .add-choice-card:hover,
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .add-choice-card:focus-visible{
  border-color:rgba(234,146,22,.58)!important;
  box-shadow:0 0 0 3px rgba(234,146,22,.1),0 14px 30px rgba(23,33,43,.09)!important;
  transform:translateY(-2px);
  outline:0;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .img-aspect{
  background:linear-gradient(180deg,#f6f7f7 0%,#eef0f1 100%);
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .img-aspect>img{
  padding:1rem;
  object-fit:contain;
  transition:transform .2s ease;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .img-aspect>img.product-cutout{
  mix-blend-mode:darken;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .add-choice-card:hover .img-aspect>img{
  transform:scale(1.018);
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .card-body{
  min-height:3.4rem;
  padding:.82rem .85rem .88rem;
  border-top:1px solid rgba(23,33,43,.07);
  background:#fff;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper h6{
  color:var(--rp-page-ink);
  font-size:.9rem;
  font-weight:800;
}
html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper small{
  color:var(--rp-page-muted)!important;
  font-size:.74rem;
}
html:not([data-bs-theme="dark"]) .request-page .positions-toolbar{
  margin-top:.2rem;
  margin-bottom:.9rem!important;
  padding:.72rem .82rem;
  border:1px solid var(--rp-page-border);
  border-radius:12px;
  background:rgba(255,255,255,.82);
  box-shadow:0 8px 22px rgba(23,33,43,.045);
}
html:not([data-bs-theme="dark"]) .request-page .positions-toolbar #positionsTitle{
  color:var(--rp-page-ink)!important;
  font-size:.88rem;
  font-weight:800;
}
html:not([data-bs-theme="dark"]) .request-page .positions-view-toggle{
  padding:.12rem;
  border:1px solid rgba(23,33,43,.13);
  border-radius:999px;
  background:#fff;
}
html:not([data-bs-theme="dark"]) .request-page .positions-view-toggle .btn{
  min-height:1.85rem;
  padding:.3rem .68rem;
  border:0!important;
  border-radius:999px!important;
  background:transparent;
  color:#586574;
  font-size:.74rem;
  box-shadow:none!important;
}
html:not([data-bs-theme="dark"]) .request-page .positions-view-toggle .btn.active{
  background:#17212b!important;
  color:#fff;
}
html:not([data-bs-theme="dark"]) .request-page #positions-sort-select{
  min-width:10.5rem;
  min-height:2.08rem;
  border:1px solid rgba(23,33,43,.14);
  border-radius:8px;
  background-color:#fff;
  color:#33404d;
  font-size:.76rem;
  box-shadow:none;
}
html:not([data-bs-theme="dark"]) .request-page #positions-sort-select:focus{
  border-color:rgba(234,146,22,.75);
  box-shadow:0 0 0 3px rgba(234,146,22,.12);
}
html:not([data-bs-theme="dark"]) .request-page .detail-preview-switch{
  margin:0;
  padding-left:2.55rem;
}
html:not([data-bs-theme="dark"]) .request-page #save-draft-btn{
  min-height:2.35rem;
  padding:.48rem .85rem;
  border-color:rgba(23,33,43,.14);
  border-radius:9px;
  background:#fff;
  color:#536170;
  font-size:.8rem;
}
html:not([data-bs-theme="dark"]) .request-page #save-draft-btn:hover{
  border-color:rgba(234,146,22,.48);
  background:var(--rp-page-soft);
  color:#553915;
}
html:not([data-bs-theme="dark"]) .request-page #positions-container>.col-12 .alert-light{
  padding:1rem 1.2rem;
  border:1px solid var(--rp-page-border)!important;
  border-radius:12px;
  background:rgba(255,255,255,.76);
  color:#586574;
  box-shadow:0 8px 22px rgba(23,33,43,.035);
}
@media(max-width:767.98px){
  html:not([data-bs-theme="dark"]) .request-page .positions-toolbar{padding:.65rem}
  html:not([data-bs-theme="dark"]) .request-page #add-options-wrapper .card-body{min-height:auto}
}
html.app-modal-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.app-modal-scroll-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.modal.show {
  overscroll-behavior: contain;
}
/* Keep order pages on native browser scrolling. Hope UI enables smooth scrolling
   on :root, which makes repeated mouse-wheel input feel delayed and sluggish. */
html:has(.request-page),
html:has(.request-page) body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scroll-behavior: auto !important;
  scrollbar-gutter: auto;
}
