/* MOPEDOFF 2026: окно консультанта */
/* язычок у правого края: выезжает после загрузки */
.mpc-tab{position:fixed;right:0;top:50%;z-index:2900;display:flex;flex-direction:column;align-items:center;gap:10px;width:52px;padding:8px 0 16px;border:0;border-radius:16px 0 0 16px;background:#e0001b;box-shadow:-4px 6px 24px rgba(0,0,0,.22);cursor:pointer;transform:translate(100%,-50%);transition:transform .45s cubic-bezier(.2,.9,.3,1.2),width .2s,background .2s;}
.mpc-tab.is-in{transform:translate(0,-50%);}
.mpc-tab:hover{width:58px;background:#b80016;}
.mpc-tab.is-active{transform:translate(100%,-50%);}
.mpc-tab .mpc-ava{width:40px;height:40px;border:2px solid #fff;}
.mpc-tab__t{writing-mode:vertical-rl;transform:rotate(180deg);color:#fff;font-size:13px;font-weight:700;letter-spacing:.02em;white-space:nowrap;}
.mpc-tab:after{content:"";position:absolute;top:6px;left:6px;width:10px;height:10px;border-radius:50%;background:#fff;box-shadow:0 0 0 0 rgba(255,255,255,.7);animation:mpc-ping 2s infinite;}
@keyframes mpc-ping{0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)}70%,100%{box-shadow:0 0 0 8px rgba(255,255,255,0)}}
.mpc-ava{display:block;flex:none;width:44px;height:44px;border-radius:50%;overflow:hidden;background:#d9d9dc;box-sizing:border-box;}
.mpc-ava img{display:block;width:100%;height:100%;object-fit:cover;}


.mpc-shade{position:fixed;inset:0;z-index:2940;background:rgba(15,15,17,.45);opacity:0;visibility:hidden;transition:opacity .3s,visibility 0s .3s;}
.mpc-shade.is-open{opacity:1;visibility:visible;transition:opacity .3s;}
.mpc-box{position:fixed;top:0;right:0;bottom:0;z-index:2950;display:flex;flex-direction:column;width:420px;max-width:100%;background:#fff;box-shadow:-18px 0 60px rgba(0,0,0,.25);overflow:hidden;transform:translateX(100%);visibility:hidden;transition:transform .4s cubic-bezier(.2,.8,.2,1),visibility 0s .4s;font-family:inherit;}
.mpc-box.is-open{transform:none;visibility:visible;transition:transform .4s cubic-bezier(.2,.8,.2,1);}
.mpc-head{display:flex;align-items:center;gap:12px;padding:16px 12px 16px 18px;background:#1f1f1f;color:#fff;}
.mpc-head .mpc-ava{border:2px solid #e0001b;}
.mpc-head__t{flex:1;min-width:0;}
.mpc-head__t b{color:#fff!important;font-weight:700;display:block;font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mpc-head__t span{display:block;margin-top:3px;font-size:12px;color:#b9b9be;}
.mpc-ic{flex:none;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s;}
.mpc-ic:hover{background:rgba(255,255,255,.12);}
.mpc-ic svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
/* кнопки ботов в мессенджерах под шапкой */
.mpc-msgr{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid #e6e6e8;}
.mpc-msgr__t{font-size:12.5px;line-height:1.3;color:#6e6e73;}
.mpc-msgr__btns{display:flex;gap:6px;flex:none;}
.mpc-msgr__btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px 0 10px;border-radius:17px;color:#fff!important;font-size:13px;font-weight:700;text-decoration:none!important;white-space:nowrap;transition:transform .2s,box-shadow .2s,filter .2s;}
.mpc-msgr__btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,.18);filter:brightness(1.05);}
.mpc-msgr__btn svg{width:18px;height:18px;flex:none;}
.mpc-msgr__btn--tg{background:#2aabee;}
.mpc-msgr__btn--max{background:linear-gradient(135deg,#3f6bff,#8a3ffc);}
.mpc-body{flex:1;overflow-y:auto;padding:14px 14px 6px;background:#f1f1f3 radial-gradient(circle at 1px 1px,rgba(0,0,0,.05) 1px,transparent 0) 0 0/18px 18px;overscroll-behavior:contain;}
.mpc-day{width:max-content;margin:0 auto 12px;padding:3px 12px;border-radius:12px;background:rgba(0,0,0,.28);color:#fff;font-size:11.5px;font-weight:600;}
.mpc-msgs{display:flex;flex-direction:column;gap:8px;}
.mpc-msg{position:relative;max-width:84%;padding:9px 12px 17px;border-radius:16px;font-size:14px;line-height:1.4;word-wrap:break-word;}
.mpc-msg i{position:absolute;right:10px;bottom:4px;font-style:normal;font-size:10.5px;opacity:.55;}
.mpc-msg--bot{align-self:flex-start;background:#fff;color:#1d1d1f;border-bottom-left-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.06);}
.mpc-msg--user{align-self:flex-end;background:#e0001b;color:#fff;border-bottom-right-radius:4px;}
.mpc-msg.is-new{animation:mpc-in .25s ease-out;}
@keyframes mpc-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.mpc-typing{display:flex;gap:4px;padding:13px 14px;}
.mpc-typing span{width:7px;height:7px;border-radius:50%;background:#a0a0a6;animation:mpc-dot 1s infinite;}
.mpc-typing span:nth-child(2){animation-delay:.15s}.mpc-typing span:nth-child(3){animation-delay:.3s}
@keyframes mpc-dot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.mpc-opts{display:flex;flex-wrap:wrap;gap:6px;max-height:40%;overflow-y:auto;padding:10px 14px;background:#f1f1f3;border-top:1px solid #e6e6e8;}
.mpc-chip{padding:8px 13px;border:1.5px solid #e0001b;border-radius:18px;background:#fff;color:#e0001b;font:600 13px/1.2 inherit;font-family:inherit;cursor:pointer;transition:background .2s,color .2s;}
.mpc-chip:hover{background:#e0001b;color:#fff;}
.mpc-form{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;border-top:1px solid #e6e6e8;background:#fff;}
.mpc-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;}
.mpc-box .mpc-form .mpc-input{flex:1;min-width:0;height:44px!important;margin:0!important;padding:0 16px!important;border:1.5px solid #e6e6e8!important;border-radius:22px!important;background:#f6f6f7!important;box-shadow:none!important;font-size:15px!important;line-height:normal!important;color:#1d1d1f!important;outline:none;transition:border-color .2s,background .2s;}
.mpc-box .mpc-form .mpc-input:focus{border-color:#e0001b!important;background:#fff!important;}
.mpc-box .mpc-form.is-err .mpc-input{border-color:#e0001b!important;animation:mpc-shake .35s;}
@keyframes mpc-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.mpc-send{flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#e0001b;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s;}
.mpc-send:hover{background:#b80016;}
.mpc-send svg{width:20px;height:20px;fill:#fff;margin-left:-2px;}
.mpc-note{padding:0 16px 10px;background:#fff;font-size:11px;line-height:1.35;color:#8a8a90;}
.mpc-note a{color:#8a8a90;text-decoration:underline;}

@media (max-width:767px){
  .mpc-msgr{padding:9px 12px;}
  .mpc-msgr__t{font-size:12px;}
  .mpc-tab{top:auto;bottom:calc(150px + env(safe-area-inset-bottom));width:44px;gap:8px;padding:6px 0 12px;transform:translateX(100%);}
  .mpc-tab.is-in{transform:none;}
  .mpc-tab.is-active{transform:translateX(100%);}
  .mpc-tab:hover{width:44px;}
  .mpc-tab .mpc-ava{width:34px;height:34px;}
  .mpc-tab__t{font-size:12px;}
  /* в карточке товара над нижним меню висит панель «кол-во + В корзину» — поднимаемся над ней */
  html:has(.counter_wrapp.fixed) .mpc-tab{bottom:calc(210px + env(safe-area-inset-bottom));}
  .mpc-box{width:100%;box-shadow:none;}
    .mpc-form{padding-bottom:calc(10px + env(safe-area-inset-bottom));}
  .mpc-box .mpc-form .mpc-input{font-size:16px!important;}
}
