/* N-WEB Купити в 1 клік — кнопка, ссылка, окно. Цвет — --nwq-accent (настройка модуля), иначе цвет темы Nova или синий. */
:root { --nwq-accent: var(--nw-primary, #2563eb); }
.nwq-has-line { flex-wrap: wrap; }
.nwq-line { flex-basis: 100%; width: 100%; margin-top: 10px; }
.nwq-has-line .nwq-line { order: 99; margin-top: 0; }
.nwq-line--cart { display: block; }
.nwq-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 10px 20px; border: 2px solid var(--nwq-accent); border-radius: 10px; background: transparent; color: var(--nwq-accent); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .15s, color .15s; }
.nwq-btn:hover, .nwq-btn:focus-visible { background: var(--nwq-accent); color: #fff; }
.nwq-btn[disabled] { opacity: .6; cursor: wait; }
.nwq-btn--inline { width: auto; min-height: 0; padding: 6px 12px; border-width: 1px; border-radius: 4px; font-size: inherit; line-height: 1.42857; vertical-align: middle; }
.nwq-option-error { margin-top: 6px; color: #dc2626; font-size: 14px; }

html.nwq-lock { overflow: hidden; }
.nwq-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(17, 24, 39, .5); font-size: 15px; line-height: 1.5; }
.nwq-modal[hidden], .nwq-modal [hidden] { display: none !important; }
.nwq-modal *, .nwq-modal *::before, .nwq-modal *::after { box-sizing: border-box; }
.nwq-box { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 14px; background: #fff; color: #111827; box-shadow: 0 20px 50px rgba(17, 24, 39, .25); }
.nwq-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #e5e7eb; }
.nwq-head__title { flex: 1 1 auto; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.nwq-close { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #111827; font-size: 26px; line-height: 1; cursor: pointer; }
.nwq-close:hover { background: #f3f4f6; }
.nwq-body, .nwq-done { padding: 20px; }
.nwq-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.nwq-item { display: flex; align-items: center; gap: 12px; }
.nwq-item img { flex: none; width: 60px; height: 60px; border-radius: 8px; object-fit: contain; background: #f6f7f9; }
.nwq-item__text { display: flex; flex-direction: column; min-width: 0; }
.nwq-item__text b { font-weight: 600; overflow-wrap: anywhere; }
.nwq-item__text small { color: #6b7280; font-size: 13px; }
.nwq-items__total { display: flex; justify-content: flex-end; font-size: 16px; }
.nwq-lead { margin: 0 0 14px; color: #6b7280; }
.nwq-field { margin-bottom: 12px; }
.nwq-field label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.nwq-req { color: #dc2626; }
.nwq-field input, .nwq-field textarea { display: block; width: 100%; height: 46px; padding: 10px 14px; border: 1px solid #e3e6ea; border-radius: 10px; background: #fff; color: #111827; font: inherit; font-size: 16px; box-shadow: none; }
.nwq-field textarea { height: auto; min-height: 80px; resize: vertical; }
.nwq-field input:focus, .nwq-field textarea:focus { border-color: var(--nwq-accent); outline: 2px solid color-mix(in srgb, var(--nwq-accent) 25%, transparent); outline-offset: 0; }
.nwq-field .is-invalid { border-color: #dc2626; }
.nwq-error { color: #dc2626; font-size: 14px; }
.nwq-error:empty { display: none; }
.nwq-field .nwq-error { margin-top: 4px; }
.nwq-submit { display: block; width: 100%; margin-top: 16px; padding: 13px 16px; border: 0; border-radius: 10px; background: var(--nwq-accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: filter .15s; }
.nwq-submit:hover { filter: brightness(.94); }
.nwq-submit[disabled] { opacity: .7; cursor: wait; }
.nwq-done { text-align: center; }
.nwq-done b { display: block; margin-bottom: 8px; font-size: 18px; }

/* Списки товаров: ссылка под блоком покупки карточки */
.nwq-link { display: block; margin-top: 8px; color: var(--nwq-accent); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
.nwq-link:hover, .nwq-link:focus-visible { text-decoration: underline; }
.button-group + .nwq-link { margin: 0; padding: 8px 0 10px; }

/* Опции и количество в окне */
.nwq-options { margin-bottom: 6px; }
.nwq-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.nwq-field select { display: block; width: 100%; height: 46px; padding: 10px 14px; border: 1px solid #e3e6ea; border-radius: 10px; background: #fff; color: #111827; font: inherit; font-size: 16px; }
.nwq-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.nwq-choice { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid #e3e6ea; border-radius: 10px; font-size: 15px; font-weight: 400; cursor: pointer; }
.nwq-choice input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--nwq-accent); }
.nwq-choice small { color: #6b7280; }
.nwq-choice:has(input:checked) { border-color: var(--nwq-accent); background: color-mix(in srgb, var(--nwq-accent) 8%, #fff); }
.nwq-stepper { display: inline-flex; align-items: center; border: 1px solid #e3e6ea; border-radius: 10px; overflow: hidden; }
.nwq-stepper button { width: 44px; height: 44px; border: 0; background: #f6f7f9; color: #111827; font-size: 20px; cursor: pointer; }
.nwq-stepper input { width: 64px; height: 44px; border: 0; border-radius: 0; text-align: center; font: inherit; font-size: 16px; -moz-appearance: textfield; }
.nwq-stepper input::-webkit-outer-spin-button, .nwq-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Ловушка для ботов: поле есть в форме, но человеку не видно */
.nwq-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
