/* =========================================================
   products-quick-order.css – «Быстрая заявка» (Оформить сейчас)
   Тёмная/светлая тема через переменные, стеклянная панель.
   ========================================================= */

.qorder {
  --qo-accent: var(--accent, #3aa0ff);
  --qo-accent-2: var(--accent-2, #6bd5ff);
  --qo-surface: rgba(13, 22, 44, 0.94);
  --qo-surface-2: rgba(255, 255, 255, 0.05);
  --qo-line: rgba(255, 255, 255, 0.12);
  --qo-text: rgba(255, 255, 255, 0.95);
  --qo-muted: rgba(255, 255, 255, 0.62);
  position: fixed;
  inset: 0;
  /* выше товарной модалки (.prod-modal z-index:10000), чтобы открываться поверх неё */
  z-index: 10050;
  font-family: inherit;
}
:root[data-theme="light"] .qorder {
  --qo-surface: #ffffff;
  --qo-surface-2: rgba(10, 30, 60, 0.05);
  --qo-line: rgba(10, 30, 60, 0.12);
  --qo-text: #0b1a2e;
  --qo-muted: rgba(11, 26, 46, 0.62);
}
.qorder[hidden] { display: none; }
.qorder *, .qorder *::before, .qorder *::after { box-sizing: border-box; }
:root.qorder-lock { overflow: hidden; }

.qorder__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 7, 14, 0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.3s ease;
}
.qorder.is-open .qorder__backdrop { opacity: 1; }

.qorder__dialog {
  position: absolute; left: 50%; top: 50%;
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--qo-surface);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--qo-line);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(6, 14, 36, 0.6);
  color: var(--qo-text);
  overflow: hidden;
  transform: translate(-50%, -46%) scale(0.96);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.2, 0.86, 0.28, 1.08), opacity 0.3s ease;
}
.qorder.is-open .qorder__dialog { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.qorder__close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border: none; border-radius: 10px;
  background: var(--qo-surface-2); color: var(--qo-muted);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.qorder__close:hover { background: rgba(127, 150, 190, 0.18); color: var(--qo-text); }
.qorder__close:focus-visible { outline: 2px solid var(--qo-accent-2); outline-offset: 1px; }

.qorder__grid { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 0; overflow-y: auto; }

/* ----- блок товара ----- */
.qorder__product {
  padding: 26px 24px;
  background: linear-gradient(160deg, rgba(58, 160, 255, 0.14), rgba(31, 111, 208, 0.05));
  border-right: 1px solid var(--qo-line);
  transition: opacity 0.3s ease;
}
.qorder__product.is-done { opacity: 0.5; }
.qorder__product-badge {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--qo-accent-2);
  background: rgba(58, 160, 255, 0.12); border: 1px solid rgba(107, 213, 255, 0.3);
  padding: 4px 10px; border-radius: 20px; margin-bottom: 12px;
}
.qorder__product-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.qorder__service-summary {
  margin: -8px 0 14px;
  color: var(--qo-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
.qorder__rows { display: flex; flex-direction: column; gap: 9px; }
.qorder__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.qorder__row span { color: var(--qo-muted); }
.qorder__row b { font-weight: 700; text-align: right; }
.qorder__price { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--qo-line); }
.qorder__price-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.qorder__price-row b { font-weight: 700; }
.qorder__price-row--total b { font-size: 19px; color: var(--qo-accent-2); font-weight: 800; }
.qorder__req { font-size: 16px; font-weight: 800; color: var(--qo-accent-2); }
.qorder__note { margin-top: 14px; font-size: 12px; color: var(--qo-muted); line-height: 1.45; }

/* ----- панель формы ----- */
.qorder__panel { padding: 26px 24px; display: flex; flex-direction: column; }
.qorder__head { margin-bottom: 16px; padding-right: 28px; }
.qorder__title { font-size: 21px; font-weight: 800; margin: 0 0 6px; }
.qorder__sub { font-size: 13.5px; color: var(--qo-muted); line-height: 1.5; margin: 0; }
.qorder__form { display: flex; flex-direction: column; gap: 10px; }
.qorder__frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qorder__in, .qorder__ta {
  width: 100%; background: var(--qo-surface-2); border: 1px solid var(--qo-line);
  border-radius: 12px; color: var(--qo-text); font: inherit; font-size: 14px; padding: 12px 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qorder__ta { resize: vertical; min-height: 52px; }
.qorder__in::placeholder, .qorder__ta::placeholder { color: var(--qo-muted); }
.qorder__in:focus, .qorder__ta:focus { outline: none; border-color: var(--qo-accent); box-shadow: 0 0 0 3px rgba(58, 160, 255, 0.18); }
.qorder__in.is-invalid { border-color: #ff6b81; box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.18); }
.qorder__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--qo-muted); line-height: 1.4; cursor: pointer; }
.qorder__consent input { margin-top: 2px; accent-color: var(--qo-accent); flex: 0 0 auto; }
.qorder__consent a { color: var(--qo-accent-2); }
.qorder__err { font-size: 12.5px; color: #ff8298; min-height: 0; }

.qorder__submit, .qorder__secondary, .qorder__ghost {
  width: 100%; border-radius: 12px; font: inherit; font-weight: 800; font-size: 14px;
  padding: 13px 14px; cursor: pointer; transition: filter 0.2s ease, transform 0.15s ease, background 0.2s ease;
}
.qorder__submit { border: none; background: linear-gradient(135deg, var(--qo-accent), #2f86e0); color: #fff; }
.qorder__submit:hover { filter: brightness(1.07); }
.qorder__submit:active { transform: translateY(1px); }
.qorder__submit:disabled { opacity: 0.7; cursor: default; }
.qorder__secondary { border: 1px solid rgba(107, 213, 255, 0.4); background: rgba(58, 160, 255, 0.08); color: var(--qo-text); font-weight: 700; }
.qorder__secondary:hover { background: rgba(58, 160, 255, 0.18); }
.qorder__ghost { border: 1px solid transparent; background: transparent; color: var(--qo-muted); font-weight: 600; }
.qorder__ghost:hover { color: var(--qo-text); }
.qorder__spin {
  display: inline-block; width: 14px; height: 14px; margin-right: 7px; vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; border-radius: 50%;
  animation: qo-spin 0.7s linear infinite;
}

/* ----- success ----- */
.qorder__success { text-align: center; padding: 30px 10px 6px; }
.qorder__success-ico {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 28px;
  background: linear-gradient(150deg, #34d27b, #18a85e); box-shadow: 0 0 0 6px rgba(52, 210, 123, 0.16);
}
.qorder__success-t { font-size: 19px; font-weight: 800; }
.qorder__success-p { font-size: 13.5px; color: var(--qo-muted); margin-top: 6px; line-height: 1.5; }
.qorder__success-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }

/* ===== адаптив ===== */
@media (max-width: 720px) {
  .qorder__dialog {
    left: 0; top: auto; bottom: 0; transform: translateY(100%);
    width: 100vw; max-height: 92vh; border-radius: 20px 20px 0 0;
  }
  .qorder.is-open .qorder__dialog { transform: translateY(0); }
  .qorder__grid { grid-template-columns: 1fr; }
  .qorder__product { border-right: none; border-bottom: 1px solid var(--qo-line); padding: 20px 18px; }
  .qorder__panel { padding: 18px; }
  .qorder__frow { grid-template-columns: 1fr; }
}

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

@media (prefers-reduced-motion: reduce) {
  .qorder__backdrop, .qorder__dialog { transition-duration: 0.01ms !important; }
}
