/* MS Quick Order — модалки и виджет. Использует токены темы (var(--color-*)). */

.ms-qo-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(16, 24, 40, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: msqoFade .2s ease;
}
.ms-qo-overlay[hidden] { display: none; }
@keyframes msqoFade { from { opacity: 0; } to { opacity: 1; } }

.ms-qo-modal {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--radius, 12px);
  padding: 28px; box-shadow: 0 20px 60px rgba(16, 24, 40, .25);
  animation: msqoUp .25s cubic-bezier(.4, 0, .2, 1);
}
@keyframes msqoUp { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }

.ms-qo-close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px; border: none; background: none;
  font-size: 26px; line-height: 1; color: #9AA3AE; cursor: pointer; border-radius: 50%;
}
.ms-qo-close:hover { background: var(--color-bg-soft, #f4f6f8); color: var(--color-text, #1e232b); }

.ms-qo-title { font-size: 20px; font-weight: 700; margin: 0 0 16px; padding-right: 24px; }

.ms-qo-field { display: block; margin-bottom: 12px; }
.ms-qo-field span { display: block; font-size: 13px; color: var(--color-text-muted, #6b7280); margin-bottom: 5px; }
.ms-qo-field input, .ms-qo-field textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--color-border, #e3e7ec);
  border-radius: var(--radius-sm, 8px); padding: 11px 12px; font: inherit; outline: none;
  transition: border-color .2s;
}
.ms-qo-field input:focus, .ms-qo-field textarea:focus { border-color: var(--color-accent, #e30613); }
.ms-qo-field textarea { resize: vertical; min-height: 72px; }

.ms-qo-product { background: var(--color-bg-soft, #f4f6f8); border-radius: var(--radius-sm, 8px); padding: 10px 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }

.ms-qo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.ms-qo-submit { width: 100%; margin-top: 6px; }
.ms-qo-submit.is-loading { opacity: .7; pointer-events: none; }

.ms-qo-result { margin-top: 12px; font-size: 14px; text-align: center; }
.ms-qo-result.is-ok { color: var(--color-success, #1e9e5a); font-weight: 600; }
.ms-qo-result.is-err { color: var(--color-accent, #e30613); }

.ms-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--color-text-muted, #6b7280); margin: 6px 0 12px; }
.ms-consent input { margin-top: 2px; flex: none; }
.ms-consent a { color: var(--color-accent, #e30613); text-decoration: underline; }

/* Плавающий виджет звонка */
.ms-qo-widget {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--color-accent, #e30613); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(227, 6, 19, .4);
  animation: msqoPulse 2.4s infinite;
}
.ms-qo-widget:hover { background: var(--color-accent-hover, #c20510); }
@keyframes msqoPulse {
  0% { box-shadow: 0 10px 24px rgba(227, 6, 19, .4), 0 0 0 0 rgba(227, 6, 19, .35); }
  70% { box-shadow: 0 10px 24px rgba(227, 6, 19, .4), 0 0 0 14px rgba(227, 6, 19, 0); }
  100% { box-shadow: 0 10px 24px rgba(227, 6, 19, .4), 0 0 0 0 rgba(227, 6, 19, 0); }
}
@media (prefers-reduced-motion: reduce) { .ms-qo-widget { animation: none; } }
@media (max-width: 680px) { .ms-qo-widget { right: 14px; bottom: 14px; width: 50px; height: 50px; } }
