/* Формы подписки (ТЗ 67 п. 2.2.1): поле и кнопка не ниже 44 px, на смартфоне — столбиком, без анимации.
   Цвета — нейтральные, кнопка берёт стиль темы (класс button); тонкая подстройка под тему — в CSS темы сайта. */
.emailsub { box-sizing: border-box; margin: 0; }
.emailsub *, .emailsub *::before, .emailsub *::after { box-sizing: border-box; }
.emailsub__trap { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.emailsub__title { font-size: 1.3em; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.emailsub__text { margin: 0 0 12px; line-height: 1.45; opacity: .9; }
.emailsub__row { display: flex; gap: 10px; flex-wrap: wrap; }
.emailsub__input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; line-height: 22px;
    border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; color: #222; }
.emailsub__btn { flex: 0 0 auto; min-height: 44px; padding: 0 22px !important; white-space: nowrap; cursor: pointer;
    display: inline-flex !important; align-items: center; justify-content: center; line-height: 1.2 !important; }
.emailsub__btn[disabled], .emailsub__btn--off { opacity: .55; cursor: not-allowed; }
/* галочка не отмечена, а подписаться пытаются: подсветка рамкой вокруг галочки (цвет — от текста, виден на тёмном и светлом) */
.emailsub__consents--need .emailsub__consent input { color: inherit; outline: 2px solid currentColor; outline-offset: 2px; }
.emailsub__consents--need .emailsub__consent { font-weight: 600; }
.emailsub__consents { margin-top: 10px; }
.emailsub__consent { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; font-size: 13px; line-height: 1.4; cursor: pointer; font-weight: 400; }
.emailsub__consent input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; }
/* ссылки в согласии подчёркнуты всегда (п. 2.2.1): тема на «Спасибо» снимает подчёркивание у всех ссылок (.checkout-result a) */
.emailsub__consent a, .emailsub-optin__label a { text-decoration: underline !important; color: inherit; }
.emailsub__msg { margin-top: 8px; font-size: 14px; min-height: 0; }
.emailsub__msg:empty { display: none; }
.emailsub__msg--bad { color: #c62828; }
/* блок (статья, главная, посадочная, «Спасибо»): на ПК — заголовок слева, поле и кнопка справа */
.emailsub--block { padding: 20px 22px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fafafa; color: #222; }
@media (min-width: 900px) {
    .emailsub--block.emailsub--wide { display: flex; gap: 28px; align-items: flex-start; }
    .emailsub--block.emailsub--wide .emailsub__head { flex: 1 1 45%; }
    .emailsub--block.emailsub--wide .emailsub__body { flex: 1 1 55%; }
}
/* строка (подвал): цвета наследуются от подвала темы; плашка отделяет форму от контактов и ссылок подвала (18.09) —
   полупрозрачный серый, чтобы работала и на тёмном подвале (ООО), и на светлом */
.emailsub--line { margin: 24px 0; padding: 20px 24px; border: 1px solid rgba(128,128,128,.35); border-radius: 8px;
    background: rgba(128,128,128,.12); }
.emailsub--line .emailsub__title { font-size: 1.05em; text-transform: uppercase; letter-spacing: .04em; }
.emailsub--line .emailsub__text { font-size: 13px; }
.emailsub--line .emailsub__consent a { color: inherit; }
.emailsub--line .emailsub__msg--bad { color: inherit; font-weight: 600; }
@media (min-width: 900px) {
    .emailsub--line { display: flex; gap: 32px; align-items: center; }
    .emailsub--line .emailsub__head { flex: 0 1 34%; }
    .emailsub--line .emailsub__body { flex: 1 1 66%; }
    .emailsub--line .emailsub__text { margin-bottom: 0; }
}
@media (max-width: 650px) {
    .emailsub__row { flex-direction: column; }
    .emailsub__input, .emailsub__btn { flex: 0 0 auto; width: 100%; }
    .emailsub--block, .emailsub--line { padding: 16px; }
}

/* Всплывающее окно (этап 2, п. 2.2): по центру, без анимации; на телефоне — по ширине экрана с отступами, прокрутка внутри */
.emailsub-popup[hidden] { display: none !important; }
.emailsub-popup { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.emailsub-popup__back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.emailsub-popup__box { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
    border-radius: 10px; background: #fff; color: #222; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.emailsub-popup .emailsub--block { border: 0; background: transparent; padding: 28px 24px 20px; }
.emailsub-popup .emailsub__title { padding-right: 28px; }
.emailsub-popup__x { position: absolute; top: 6px; right: 6px; z-index: 1; width: 44px; height: 44px; border: 0; background: transparent;
    font-size: 30px; line-height: 44px; color: #666; cursor: pointer; padding: 0; }
.emailsub-popup__x:hover { color: #000; }
.emailsub__dismiss { display: block; margin: 10px auto 0; min-height: 44px; padding: 0 12px; border: 0; background: transparent;
    color: #666; font-size: 14px; text-decoration: underline; cursor: pointer; }
html.emailsub-popup-open { overflow: hidden; }

/* Галочка в оформлении заказа и «1 клик» (п. 2.9) */
.emailsub-optin { margin: 10px 0 12px; text-align: left; }
.emailsub-optin__label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; cursor: pointer; font-weight: 400; margin: 0; }
/* галочка — родная браузера, а в «1 клик» — подменённая Formstyler (как соседняя галочка ПДн): размеры не навязываем */
/* только input: Formstyler копирует классы галочки на свою обёртку, а у неё вид — от темы, как у соседней галочки */
input.emailsub-optin__box { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; }
.emailsub-optin .jq-checkbox { flex: 0 0 auto; margin-top: 1px; }
.emailsub-optin__email[hidden] { display: none !important; }
.emailsub-optin__email { margin: 8px 0 0 26px; }
.emailsub-optin__email input { width: 100%; max-width: 360px; min-height: 44px; padding: 10px 12px; font-size: 16px;
    border: 1px solid #c9c9c9; border-radius: 4px; box-sizing: border-box; }
.emailsub-optin__hint { margin: 6px 0 0 26px; font-size: 13px; color: #b25500; }
.emailsub-optin__hint:empty { display: none; }

/* «Спасибо за заказ» (п. 2.2): блок под составом заказа, по ширине текста страницы */
.emailsub-thanks { max-width: 640px; margin: 30px auto 0; text-align: left; }
.emailsub-thanks-note { max-width: 640px; margin: 24px auto 0; font-size: 15px; }

/* Вид галочек — как у галочек темы (Formstyler mastershop: квадрат 14 px + рамка 1 px #dbdada, скругление 2 px, белый фон,
   отметка цвета темы), чтобы на одной странице квадратики не различались (заказчик 18.09: в «1 клик» — один «не такой яркий»;
   на оформлении — рядом с галочками услуг корзины). Рисуем своим CSS, не Formstyler: тот сообщает об отметке только jQuery.
   Цвет отметки — у ООО #63533a (rgb 99,83,58, как ::before темы); у ИП (тема seller) — сверить при переносе. */
.emailsub__consent input[type=checkbox], input.emailsub-optin__box {
    -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 16px; height: 16px; padding: 0;
    border: 1px solid #dbdada; border-radius: 2px; background: #fff no-repeat center / 10px 10px; cursor: pointer; vertical-align: middle; }
.emailsub__consent input[type=checkbox]:checked, input.emailsub-optin__box:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2l2.6 2.6L9 2.3' fill='none' stroke='%2363533a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.emailsub__consent input[type=checkbox]:focus-visible, input.emailsub-optin__box:focus-visible { outline: 2px solid #63533a; outline-offset: 1px; }
