/* LM TEK — режим «Запрос КП»: список запроса, форма, sticky-панели. Подключается mu-plugin lmtek-quote-mode.php */

.lmtek-price-request { font-weight: 600; color: var(--lmtek-accent, #0f4c81); }
.lmtek-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

/* ---------- кнопки в карточке и на товаре ---------- */
.lmtek-quote-actions { display: flex; flex-direction: column; gap: 8px; }
.lmtek-quote-actions--loop .lmtek-quote-btn--loop { display: block; text-align: center; }
.lmtek-quote-add {
    appearance: none; -webkit-appearance: none; cursor: pointer; width: 100%;
    background: #fff; border: 1.5px solid var(--lmtek-line, #e2e8f0); color: var(--lmtek-ink, #0f172a);
    border-radius: 2px; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
    transition: border-color .15s, background .15s, color .15s;
}
.lmtek-quote-add:hover { border-color: var(--lmtek-accent, #2563eb); color: var(--lmtek-accent, #2563eb); }
.lmtek-quote-add .lmtek-quote-add__on { display: none; }
.lmtek-quote-add.is-added { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.lmtek-quote-add.is-added .lmtek-quote-add__on { display: inline; }
.lmtek-quote-add.is-added .lmtek-quote-add__off { display: none; }
.lmtek-quote-add.is-bump { animation: lmtek-bump .35s ease; }
@keyframes lmtek-bump { 30% { transform: scale(1.04); } }
.lmtek-quote-single { margin: 16px 0; }
.lmtek-quote-hint { font-size: .9em; opacity: .75; margin: 8px 0 0; }

/* счётчик в шапке и на панелях */
.lmtek-quote-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
    margin-left: 8px; border-radius: 999px; background: #fff; color: var(--lmtek-accent, #2563eb);
    font-size: 12px; font-weight: 700; line-height: 1; vertical-align: middle;
}
.lmtek-quote-badge[hidden] { display: none; }
.header-html-1 .lmtek-quote-btn { position: relative; }

/* ---------- модалка ---------- */
.lmtek-modal { position: fixed; inset: 0; z-index: 100000; display: none; }
.lmtek-modal.is-open { display: block; }
.lmtek-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 20, 30, .6); }
.lmtek-modal__dialog {
    position: relative; max-width: 680px; margin: 4vh auto; background: #fff; border-radius: 2px;
    padding: 28px 28px 20px; max-height: 92vh; overflow: auto;
}
.lmtek-modal__close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #64748b; }

/* ---------- форма ---------- */
.lmtek-quote-form__title { margin: 0 0 6px; }
.lmtek-quote-form__lead { margin: 0 0 18px; color: #64748b; font-size: 14px; }
.lmtek-quote-form label { display: block; font-size: .92em; margin-bottom: 12px; }
.lmtek-quote-form__opt { color: #94a3b8; font-weight: 400; }
.lmtek-quote-form input:not([type=checkbox]):not([type=radio]):not([type=file]), .lmtek-quote-form select, .lmtek-quote-form textarea { width: 100%; margin-top: 4px; }
.lmtek-quote-form input[type=file] { display: block; margin-top: 6px; font-size: 13px; }
.lmtek-quote-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.lmtek-quote-form__contact { border: 1px solid var(--lmtek-line, #e2e8f0); border-radius: 2px; padding: 10px 14px 4px; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.lmtek-quote-form__contact legend { font-size: .92em; padding: 0 6px; }
.lmtek-quote-form__radio { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 0 8px !important; }
.lmtek-quote-form__radio input { margin: 0; }
.lmtek-quote-form__filelist { list-style: none; padding: 0; margin: -6px 0 12px; font-size: 13px; color: #475569; }
.lmtek-quote-form__filelist li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--lmtek-line, #e2e8f0); }
.lmtek-quote-form__filelist li.is-bad { color: #b00020; }
.lmtek-quote-form__filelist:empty { display: none; }
.lmtek-quote-form__consent { font-size: .85em; }
.lmtek-quote-form__consent input { margin-right: 6px; }
.lmtek-quote-form__submit { min-width: 220px; }
.lmtek-quote-form__status:empty { display: none; }
.lmtek-quote-form__status { margin: 12px 0 0; }
.lmtek-quote-form__status.is-error { color: #b00020; }
.lmtek-quote-form__status.is-ok { color: #1b7a3a; font-weight: 600; }
.lmtek-quote-form.is-sending { opacity: .6; pointer-events: none; }

/* список позиций внутри формы */
.lmtek-quote-list { border: 1px solid var(--lmtek-line, #e2e8f0); border-radius: 2px; padding: 12px 14px; margin: 0 0 18px; background: var(--lmtek-tint, #f8fafc); }
.lmtek-quote-list__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lmtek-quote-list__title { font-weight: 600; font-size: 14px; }
.lmtek-quote-list__title b { font-weight: 500; color: #64748b; }
.lmtek-quote-list__more { font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lmtek-quote-list__empty { margin: 8px 0 0; font-size: 13px; color: #64748b; }
.lmtek-quote-items { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 13.5px; }
.lmtek-quote-items th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; font-weight: 600; padding: 4px 6px 4px 0; }
.lmtek-quote-items td { padding: 7px 6px 7px 0; border-top: 1px solid var(--lmtek-line, #e2e8f0); vertical-align: middle; }
.lmtek-quote-items td:nth-child(2) { width: 84px; }
.lmtek-quote-items td:nth-child(3) { width: 32px; text-align: right; }
.lmtek-quote-items small { color: #64748b; display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.lmtek-quote-items input[type=number] { width: 72px !important; margin: 0 !important; padding: 5px 6px; text-align: center; }
.lmtek-quote-items button { border: 0; background: none; cursor: pointer; font-size: 20px; line-height: 1; color: #94a3b8; padding: 2px 4px; }
.lmtek-quote-items button:hover { color: #b00020; }
.lmtek-quote-items a { color: inherit; text-decoration: none; }
.lmtek-quote-items a:hover { text-decoration: underline; }

/* экран успеха */
.lmtek-quote-done { text-align: left; padding: 8px 0 4px; }
.lmtek-quote-done__icon { width: 48px; height: 48px; border-radius: 50%; background: #dcfce7; color: #166534; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.lmtek-quote-done__title { margin: 0 0 8px; }
.lmtek-quote-done__text { margin: 0 0 14px; color: #334155; }
.lmtek-quote-done__steps { margin: 0 0 20px; padding-left: 20px; color: #475569; font-size: 14px; }
.lmtek-quote-done__steps li { margin: 0 0 6px; }
.lmtek-quote-done__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- sticky-панель товара ---------- */
.lmtek-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; background: #fff;
    border-top: 1px solid var(--lmtek-line, #e2e8f0);
    transform: translateY(0); transition: transform .2s ease, opacity .2s ease;
}
.lmtek-sticky[hidden] { display: block; transform: translateY(110%); opacity: 0; pointer-events: none; }
.lmtek-sticky__inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lmtek-sticky__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lmtek-sticky__name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmtek-sticky__sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: #64748b; letter-spacing: .06em; }
.lmtek-sticky__actions { display: flex; gap: 8px; flex-shrink: 0; }
.lmtek-sticky__actions .lmtek-quote-add { width: auto; padding: 10px 14px; }
.lmtek-sticky__actions .lmtek-quote-btn--sticky { white-space: nowrap; }
/* панель товара закреплена снизу на всех экранах (десктопный переброс наверх убран) */
@media (max-width: 600px) {
    .lmtek-sticky__meta { display: none; }
    .lmtek-sticky__actions { width: 100%; }
    .lmtek-sticky__actions > * { flex: 1; text-align: center; }
}
body.lmtek-has-sticky { padding-bottom: 72px; }
@media (min-width: 1024px) { body.lmtek-has-sticky { padding-bottom: 0; } }

/* ---------- мобильная нижняя панель каталога ---------- */
.lmtek-mobilebar { display: none; }
@media (max-width: 1023px) {
    .lmtek-mobilebar {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; padding: 10px 16px;
        background: #fff; border-top: 1px solid var(--lmtek-line, #e2e8f0);
        transition: transform .2s ease;
    }
    .lmtek-mobilebar[hidden] { display: block; transform: translateY(110%); pointer-events: none; }
    .lmtek-mobilebar .lmtek-quote-btn { display: block; width: 100%; text-align: center; }
    body.lmtek-has-mobilebar { padding-bottom: 72px; }
}

/* ---------- пустой поиск / 404 ---------- */
.lmtek-empty { max-width: 720px; padding: 8px 0 24px; }
.lmtek-empty h2 { margin: 0 0 10px; font-size: 24px; }
.lmtek-empty p { color: #475569; }
.lmtek-empty .lmtek-quote-btn { margin-top: 8px; }
.lmtek-quickpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.lmtek-quickpick__label { width: 100%; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; font-family: ui-monospace, Menlo, Consolas, monospace; }
.lmtek-quickpick a { display: inline-block; padding: 7px 12px; border: 1px solid var(--lmtek-line, #e2e8f0); border-radius: 999px; background: #fff; color: var(--lmtek-ink, #0f172a); text-decoration: none; font-size: 13px; font-weight: 600; }
.lmtek-quickpick a:hover { border-color: var(--lmtek-accent, #2563eb); color: var(--lmtek-accent, #2563eb); }
.lmtek-404 { margin-top: 28px; }
.lmtek-404__families { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 14px 0 22px; }
.lmtek-404__families a { display: block; padding: 12px 14px; border: 1px solid var(--lmtek-line, #e2e8f0); border-radius: 2px; text-decoration: none; color: var(--lmtek-ink, #0f172a); font-weight: 600; font-size: 14px; }
.lmtek-404__families a small { display: block; color: #94a3b8; font-weight: 400; font-size: 12px; margin-top: 2px; }
.lmtek-404__families a:hover { border-color: var(--lmtek-accent, #2563eb); }
.error-404 .lmtek-404 { text-align: left; }

.woocommerce-ordering { display: none; }

@media (max-width: 600px) {
    .lmtek-quote-form__row { grid-template-columns: 1fr; }
    .lmtek-modal__dialog { margin: 0; max-height: 100vh; border-radius: 0; padding: 22px 16px 16px; }
    .lmtek-quote-form__submit { width: 100%; }
}
