/* ASBEK — мобільні виправлення (підключається останнім): переповнення, рекламні зони, фільтри, кнопка телефону */

/* ── Реклама: не розпирає сітку; доки AdSense не віддав оголошення — блок не займає місця ── */
body.hub .ad-wrap { min-width: 0; max-width: 100%; contain: inline-size; }
body.hub .ad-wrap > * { max-width: 100%; }
body.hub .ad-wrap--ads { min-height: 0; }
body.hub .ad-wrap--ads:not(:has(ins[data-ad-status="filled"])) { height: 0 !important; min-height: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; }
body.hub .hub-screen > .ad-wrap--ads:not(:has(ins[data-ad-status="filled"])) { margin-bottom: -16px !important; }
.google-auto-placed { max-width: 100%; overflow: hidden; }

@media (max-width: 1000px) {
    /* колонка «1fr» росте під найдовший нерозривний рядок і виштовхує сторінку за екран — обмежуємо */
    body.hub .svc-content-grid, body.hub .td-grid, body.hub .hd-layout, body.hub .co-layout, body.hub .pf-layout,
    body.hub .hp-layout, body.hub .mk-layout, body.hub .wz-page, body.hub .cab-shell, body.hub .cab-main,
    body.hub .hub-screen, body.hub .wz, body.hub .wz-done, body.hub .cab-mini { grid-template-columns: minmax(0, 1fr) !important; }
    body.hub .svc-content-grid > *, body.hub .td-grid > *, body.hub .hd-layout > *, body.hub .co-layout > *, body.hub .pf-layout > *,
    body.hub .hp-layout > *, body.hub .mk-layout > *, body.hub .wz-page > *, body.hub .cab-shell > *, body.hub .cab-main > *,
    body.hub .hub-screen > *, body.hub .wz > *, body.hub .wz-done > *, body.hub .cab-mini > * { min-width: 0; max-width: 100%; }
}

@media (max-width: 768px) {
    @supports (overflow-x: clip) { html, body.hub { overflow-x: clip; } }

    /* рівні краї та без великих порожнин між блоками */
    body.hub .page-hero > .container { width: calc(100% - 20px); }
    body.hub .page-hero--sm { padding: 10px 0 0 !important; }
    body.hub .section-pad { padding: 16px 0 !important; }
    body.hub .hub-screen > .rq-own, body.hub .hub-screen > .wz-convert, body.hub .hub-screen > .rq-verify { margin: 0; }
    /* сторінка запиту: без порожнини між плитками «Місто / Бюджет» і текстом */
    body.hub .td-main { padding: 18px 16px; }
    body.hub .td-auto { margin-top: 0; padding-top: 0 !important; }
    body.hub .td-auto > .content-h2:first-child { margin-top: 4px; }

    /* чипи розділів — у межах картки, переносяться на новий рядок */
    body.hub .sh-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
    body.hub .sh-chips > a { white-space: normal; max-width: 100%; }
    body.hub .sh-chips:has(.sh-more-btn):not(.is-open) > a:nth-of-type(n+13) { display: none; }
    body.hub .sh-chips:not(.is-open) .sh-more-btn { display: inline-block; }

    /* каталог послуг: стрічка напрямів у межах сторінки з плавним краєм (видно, що гортається) */
    body.hub .cat-jump { max-width: 100%; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
    body.hub .cat-jump > :last-child { margin-right: 28px; }

    /* картки запитів і виконавців: довгі категорії та адреси не обрізаються краєм картки */
    body.hub .tk-body, body.hub .pr-main { min-width: 0; }
    body.hub .tk-row .tk-cat { display: block !important; flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.hub .tk-row .tk-cat svg { display: inline-block; vertical-align: -2px; }
    body.hub .pr-meta { min-width: 0; }
    body.hub .pr-meta > span { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
    body.hub .pr-meta > span > svg { flex-shrink: 0; }

    body.hub .cab-item-actions { flex-wrap: wrap; }
}

/* ── Кнопка «Показати контакти» на сторінці виконавця (лише телефон і планшет) ── */
body.hub .m-phone-cta { display: none; }
@media (max-width: 992px) {
    body.hub .m-phone-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 14px; padding: 11px 16px; border-radius: 12px; background: var(--accent); color: #fff !important; font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: none; }
    body.hub .m-phone-cta svg { width: 17px; height: 17px; flex: none; }
}

/* ── Після публікації: підтвердження номера на сторінці свого запиту ── */
body.hub .rq-verify b { display: block; }

/* ── Фільтри: на комп'ютері — рядок, на телефоні — кнопка і панель знизу ── */
.flt-bar, .flt-head, .flt-foot, .flt-l { display: none; }
.flt-f { display: contents; }
body.hub .pf-filters .pf-x, body.hub .tk-filters .tk-reset { display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 12px; background: #f3f3f1; color: #55554f; }
body.hub .pf-filters .pf-x svg, body.hub .tk-filters .tk-reset svg { width: 18px; height: 18px; }
@media (hover: hover) { body.hub .tk-filters .tk-reset:hover { background: #111315; color: #fff; } }

@media (max-width: 768px) {
    html.flt-js body.hub .flt-bar { display: flex; gap: 8px; margin-bottom: 14px; }
    body.hub .flt-open { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid rgba(17,19,21,.08); border-radius: 14px; background: #fff; color: #111315; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-card); }
    body.hub .flt-open svg { width: 18px; height: 18px; color: var(--accent); }
    body.hub .flt-open b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; }
    body.hub .flt-reset { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; min-height: 48px; border-radius: 14px; background: #fff; border: 1px solid rgba(17,19,21,.08); color: #55554f; }
    body.hub .flt-reset svg { width: 19px; height: 19px; }

    html.flt-js body.hub .flt-panel { display: none !important; }
    html.flt-js body.hub .flt-panel.is-open { display: flex !important; flex-direction: column; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 2500; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; margin: 0 !important; padding: 0 16px !important; border: 0; border-radius: 22px 22px 0 0 !important; background: #fff; box-shadow: 0 0 0 100vmax rgba(17,19,21,.5); animation: fltIn .25s ease-out; }
    body.hub .flt-panel > * { flex: 0 0 auto; }
    html.flt-js body.hub .flt-panel.is-open .flt-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 70; margin: 0 -16px; padding: 14px 16px 10px; background: #fff; border-bottom: 1px solid rgba(17,19,21,.06); }
    body.hub .flt-head strong { font-size: 18px; }
    body.hub .flt-x { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: #f3f3f1; color: #111315; cursor: pointer; }
    body.hub .flt-x svg { width: 19px; height: 19px; }
    html.flt-js body.hub .flt-panel.is-open .flt-f { display: block; }
    html.flt-js body.hub .flt-panel.is-open .flt-l { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #55554f; }
    body.hub .flt-panel .form-input, body.hub .flt-panel .dd, body.hub .flt-panel .dd-btn { width: 100%; }
    body.hub .flt-panel .dd-btn { min-height: 48px; background: var(--bg-light); }
    /* список відкривається всередині панелі, під полем */
    body.hub .flt-panel .dd-pop { position: static; display: none; margin-top: 6px; min-width: 0; transform: none; box-shadow: none; }
    body.hub .flt-panel .dd.is-open .dd-pop { display: block; }
    body.hub .flt-panel .dd-list { max-height: 38vh; }
    html.flt-js body.hub .flt-panel.is-open .flt-foot { display: flex; gap: 10px; position: sticky; bottom: 0; z-index: 65; margin: auto -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid rgba(17,19,21,.06); }
    body.hub .flt-foot .btn { flex: 1; min-height: 48px; justify-content: center; gap: 8px; font-size: 15px; }
    body.hub .flt-foot .flt-reset { background: #f3f3f1; border: 0; }
    body.hub .flt-panel > .pf-x, body.hub .flt-panel > .tk-reset { display: none !important; }
    html.flt-lock, html.flt-lock body { overflow: hidden !important; }
}
@keyframes fltIn { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ── Перша реклама під заголовком ── */
body.hub .ad-wrap--first { margin-top: 0; margin-bottom: 16px; }

/* ── Сторінка чату на телефоні: поля з боків, кімнати рівними рядами, чат карткою ── */
@media (max-width: 768px) {
    body.hub .chat-page .chat-rooms { gap: 8px; margin: 0; padding: 10px; }
    body.hub .chat-page .chat-rooms a { flex: 1 1 auto; justify-content: center; min-height: 40px; min-width: 0; }
    body.hub .chat-page .chat-city-pick { flex: 1 0 100%; min-width: 0; }
    body.hub .chat-page .chat-city-pick .dd, body.hub .chat-page .chat-city-pick select { width: 100%; max-width: none; }
    body.hub .chat-page .chat-room-empty { margin: 0 10px 10px; }
    body.hub .chat-page .chat-page-main { min-width: 0; }
    body.hub .chat-page .chat-box--page { margin: 0 10px; border: 1px solid rgba(17,19,21,.08); border-radius: 18px; overflow: hidden; }
}
