/* «Поделиться» в статьях блога (2026-10-20). Шаблон: templates/addons/my_changes/pz_share.tpl, логика: pz-share.js.
   Мобайл: одна кнопка → системное меню или нижний лист. Десктоп: ряд кнопок (вверху — круглые иконки, внизу — с подписями). */
.pzsh{--pzsh-pink:#F058A8;--pzsh-link:#B01468;--pzsh-soft:#FDE6F1;--pzsh-soft-h:#FBD3E7;font-size:16px;line-height:1.3}
.pzsh--top{margin:4px 0 16px}
.pzsh--bottom{margin:32px 0 8px;padding:20px;border:1px solid #E9DCE5;border-radius:20px;background:#F7F4F8}
.pzsh__label{margin:0 0 14px;font-size:17px;font-weight:600;color:#1D1D1F}
.pzsh__ic,.pzsh__i svg{width:22px;height:22px;fill:currentColor;flex:none}

/* Главная кнопка (мобайл) */
.pzsh__main{display:none;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:0;border-radius:999px;
  background:var(--pzsh-soft);color:var(--pzsh-link);font:inherit;font-size:16px;font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pzsh__main:active{background:var(--pzsh-soft-h)}
.pzsh--bottom .pzsh__main{width:100%;min-height:52px;background:var(--pzsh-pink);color:#fff;font-size:17px}
.pzsh--bottom .pzsh__main:active{background:#E64D9F}

/* Ряд кнопок */
.pzsh__row{display:flex;flex-wrap:wrap;gap:10px}
.pzsh__btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px 0 6px;border:1px solid #E9DCE5;border-radius:999px;background:#fff;
  color:#1D1D1F;font:inherit;font-size:16px;font-weight:600;text-decoration:none!important;cursor:pointer;transition:background .15s,border-color .15s}
.pzsh__btn:hover{background:var(--pzsh-soft);border-color:#F8C2E0;color:#1D1D1F}
.pzsh__btn:focus-visible,.pzsh__main:focus-visible,.pzsh-sheet__close:focus-visible{outline:3px solid var(--pzsh-link);outline-offset:2px}
.pzsh__i{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#F2F2F7;color:#1D1D1F;flex:none}
.pzsh__i svg{width:18px;height:18px}
.pzsh__btn--tg .pzsh__i{background:#2481CC;color:#fff}
.pzsh__btn--max .pzsh__i{background:#5B3FD9;color:#fff}
.pzsh__btn--vk .pzsh__i{background:#0072E5;color:#fff}
.pzsh__btn--wa .pzsh__i{background:#128C3E;color:#fff}

/* Десктоп вверху — компактные круглые иконки без подписей */
.pzsh--top .pzsh__row{gap:8px}
.pzsh--top .pzsh__btn{padding:0;border:0;min-height:0;background:none}
.pzsh--top .pzsh__i{width:40px;height:40px}
.pzsh--top .pzsh__i svg{width:20px;height:20px}
.pzsh--top .pzsh__btn:hover .pzsh__i{filter:brightness(.92)}
.pzsh--top .pzsh__t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* MAX share работает только в мобильном приложении/вебе — на десктопе прячем */

/* С JS на телефоне/планшете — одна кнопка вместо ряда */
@media (hover:none),(pointer:coarse){
  .pzsh-js .pzsh__main{display:inline-flex}
  .pzsh-js .pzsh__row{display:none}
  .pzsh--bottom{padding:16px}
}

/* Нижний лист */
.pzsh-sheet{position:fixed;inset:0;z-index:100100;display:flex;align-items:flex-end;justify-content:center;visibility:hidden}
.pzsh-sheet.is-open{visibility:visible}
.pzsh-sheet__bg{position:absolute;inset:0;background:rgba(29,29,31,.45);opacity:0;transition:opacity .2s}
.pzsh-sheet.is-open .pzsh-sheet__bg{opacity:1}
.pzsh-sheet__box{position:relative;width:100%;max-width:560px;padding:8px 16px calc(16px + env(safe-area-inset-bottom));background:#fff;border-radius:20px 20px 0 0;
  transform:translateY(100%);transition:transform .25s ease;touch-action:pan-x;box-shadow:0 -8px 30px rgba(0,0,0,.12)}
.pzsh-sheet.is-open .pzsh-sheet__box{transform:translateY(0)}
.pzsh-sheet__grab{width:40px;height:5px;margin:0 auto 12px;border-radius:3px;background:#D1D1D6}
.pzsh-sheet__title{margin:0 0 16px;text-align:center;font-size:18px;font-weight:700;color:#1D1D1F}
.pzsh-sheet__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px 8px;margin-bottom:20px}
.pzsh-sheet__grid .pzsh__btn{flex-direction:column;gap:8px;padding:6px 2px;border:0;border-radius:14px;background:none;font-size:16px;font-weight:400;text-align:center}
.pzsh-sheet__grid .pzsh__btn:active{background:#F7F4F8}
.pzsh-sheet__grid .pzsh__btn--max{display:inline-flex}
.pzsh-sheet__grid .pzsh__i{width:56px;height:56px}
.pzsh-sheet__grid .pzsh__i svg{width:26px;height:26px}
.pzsh-sheet__grid .pzsh__btn--copy .pzsh__t{font-size:0}
.pzsh-sheet__grid .pzsh__btn--copy .pzsh__t::after{content:"Скопировать";font-size:16px}
.pzsh-sheet__close{display:block;width:100%;min-height:52px;border:0;border-radius:14px;background:#F2F2F7;color:#1D1D1F;font:inherit;font-size:17px;font-weight:700;cursor:pointer}
html.pzsh-lock,html.pzsh-lock body{overflow:hidden}

/* Тост */
.pzsh-toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));z-index:100200;transform:translate(-50%,12px);opacity:0;pointer-events:none;
  padding:12px 20px;border-radius:999px;background:#1D1D1F;color:#fff;font-size:16px;font-weight:600;white-space:nowrap;transition:opacity .2s,transform .2s}
.pzsh-toast.is-on{opacity:1;transform:translate(-50%,0)}
@media (min-width:768px){.pzsh-toast{bottom:32px}}
@media (prefers-reduced-motion:reduce){.pzsh-sheet__box,.pzsh-sheet__bg,.pzsh-toast{transition:none}}

/* ТЗ-5 UX/UI (25.10): значки «Поделиться» вверху статьи — 44 r12 (§0.4); WhatsApp убран из pz_share.tpl (у магазина его нет).
   🖥 дата и значки — одной строкой под H1, отступы 4/12 (H1 → текст было 111 px, стало ≤64). Откат — удалить блок. */
.pzsh--top .pzsh__i{width:44px;height:44px;border-radius:12px}
@media (min-width:768px){
  .ty-mainbox-container:has(.pzsh--top) > h1.ty-mainbox-title{margin-bottom:4px!important}
  html:not(#sh1):not(#sh2):not(#sh3):not(#sh4):not(#sh5) body .ut2-blog__date:has(~ .pzsh--top){display:inline-block!important;vertical-align:middle;margin:0 16px 0 0!important}
  html:not(#sh1):not(#sh2):not(#sh3):not(#sh4):not(#sh5) body .ut2-blog__date ~ .pzsh--top{display:inline-flex!important;vertical-align:middle;width:auto!important;margin:0 0 12px!important}
}
