/* SellerStrat public homepage overlays: chat, consultation popup, and scroll access offer. */
.telegram-chat-widget{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:1100;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:8px 16px 8px 9px;
  border:1px solid #c9d8ec;
  border-radius:999px;
  background:#fff;
  color:var(--ss-final-ink);
  font:inherit;
  font-size:14px;
  font-weight:900;
  box-shadow:0 16px 34px rgba(24,47,84,.16);
  cursor:pointer;
  transition:opacity .22s ease,transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}

.telegram-chat-widget:hover{
  border-color:#b9cae3;
  box-shadow:0 22px 46px rgba(15,23,42,.18);
}

.telegram-chat-widget::after{
  content:"";
  position:absolute;
  right:12px;
  top:8px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:#20c784;
  box-shadow:0 0 0 5px rgba(32,199,132,.12);
}

.telegram-chat-widget__icon{
  width:36px;
  height:36px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,#386ff6,#245fff);
  box-shadow:0 12px 24px rgba(36,95,255,.22);
}

.telegram-chat-widget__icon svg{
  width:20px;
  height:20px;
  fill:currentColor;
}

.telegram-chat-widget__text{
  padding-right:4px;
  color:var(--ss-final-ink);
  font-size:14px;
  font-weight:900;
}

body.site-chat-open .telegram-chat-widget{
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
}

.site-chat-panel{
  position:fixed;
  right:20px;
  bottom:84px;
  z-index:1101;
  width:min(380px,calc(100vw - 32px));
  border:1px solid #c9d8ec;
  border-radius:22px;
  background:#fff;
  color:var(--ss-final-ink);
  box-shadow:0 28px 76px rgba(15,23,42,.24);
  overflow:hidden;
}

.site-chat-panel[hidden],
.site-chat-lead[hidden],
.access-trial-offer[hidden],
.consultation-popup[hidden]{
  display:none!important;
}

.site-chat-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 16px 14px;
  border-bottom:1px solid #e3eaf4;
  background:radial-gradient(180px 80px at 90% 0%,rgba(36,95,255,.18),transparent 74%),#f6f9fd;
}

.site-chat-panel__head strong{
  display:block;
  font-size:16px;
  line-height:1.1;
}

.site-chat-panel__head span{
  display:block;
  margin-top:4px;
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:750;
}

.site-chat-panel__close{
  width:34px;
  height:34px;
  border:1px solid #c9d8ec;
  border-radius:999px;
  background:#fff;
  color:var(--ss-final-muted);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.site-chat-panel__messages{
  height:270px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  overflow:auto;
  background:#f8fbff;
}

.site-chat-message{
  max-width:86%;
  padding:10px 12px;
  border-radius:15px;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
}

.site-chat-message--admin{
  align-self:flex-start;
  border:1px solid #dbe6f3;
  background:#fff;
}

.site-chat-message--visitor{
  align-self:flex-end;
  border:1px solid #bfd3f7;
  background:#eef5ff;
}

.site-chat-message--pending{
  opacity:.74;
}

.site-chat-message--failed{
  border-color:#ef8b9a;
  background:#fff1f3;
}

.site-chat-panel__form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:12px;
  border-top:1px solid #dbe6f3;
  background:#fff;
}

.site-chat-panel__form textarea{
  width:100%;
  min-height:44px;
  max-height:120px;
  resize:vertical;
  border:1px solid #c9d8ec;
  border-radius:13px;
  background:#fff;
  color:var(--ss-final-ink);
  font:inherit;
  font-size:14px;
  line-height:1.3;
  padding:11px 12px;
  outline:none;
}

.site-chat-panel__form textarea:focus,
.site-chat-lead input:focus,
.consultation-popup__field input:focus{
  border-color:#8eb6ff;
  box-shadow:0 0 0 4px rgba(47,102,232,.10);
}

.site-chat-panel__form button,
.site-chat-lead button{
  min-height:44px;
  border:0;
  border-radius:13px;
  background:linear-gradient(135deg,#346deb,#1f56d8);
  color:#fff;
  font:inherit;
  font-size:14px;
  font-weight:950;
  padding:0 14px;
  cursor:pointer;
}

.site-chat-panel__form button:disabled{
  opacity:.62;
  cursor:default;
}

.site-chat-panel__status{
  min-height:22px;
  padding:0 14px 12px;
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:750;
}

.site-chat-panel__status.error,
.consultation-popup__status.error{
  color:#dc354c;
}

.site-chat-lead{
  display:grid;
  gap:9px;
  margin:12px 14px 0;
  padding:12px;
  border:1px solid #c9d8ec;
  border-radius:15px;
  background:#f8fbff;
}

.site-chat-lead__title{
  font-size:15px;
  font-weight:950;
  line-height:1.15;
}

.site-chat-lead__text{
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:700;
  line-height:1.35;
}

.site-chat-lead__grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.site-chat-lead input{
  width:100%;
  height:40px;
  border:1px solid #c9d8ec;
  border-radius:12px;
  background:#fff;
  color:var(--ss-final-ink);
  font:inherit;
  font-size:13px;
  font-weight:750;
  padding:0 11px;
  outline:none;
}

.access-trial-offer{
  --access-offer-bottom:28px;
  position:fixed;
  left:50%;
  bottom:var(--access-offer-bottom);
  z-index:1098;
  display:flex;
  align-items:center;
  gap:14px;
  width:min(600px,calc(100vw - 32px));
  min-height:64px;
  padding:10px 14px 10px 12px;
  border:1px solid #d7e4f8;
  border-radius:999px;
  background:rgba(255,255,255,.96);
  color:var(--ss-final-ink);
  box-shadow:0 22px 56px rgba(15,23,42,.20);
  transform:translate(-50%,18px);
  opacity:0;
  pointer-events:none;
  transition:opacity .32s ease,transform .32s ease;
}

.access-trial-offer--visible{
  opacity:1;
  transform:translate(-50%,0);
  pointer-events:auto;
}

.access-trial-offer__icon{
  flex:0 0 auto;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef4ff;
  color:var(--ss-final-blue);
}

.access-trial-offer__icon svg,
.consultation-popup__close svg{
  width:21px;
  height:21px;
}

.access-trial-offer__icon path{
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.access-trial-offer strong{
  flex:1 1 auto;
  min-width:0;
  font-size:18px;
  line-height:1.1;
  font-weight:950;
}

.access-trial-offer__button{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:140px;
  min-height:44px;
  padding:0 24px;
  border-radius:999px;
  background:linear-gradient(135deg,#386ff6,#245fff);
  color:#fff;
  font-size:14px;
  font-weight:950;
  text-decoration:none;
  box-shadow:0 14px 30px rgba(36,95,255,.24);
}

.access-trial-offer__badge{
  flex:0 0 auto;
  padding:7px 12px;
  border-radius:999px;
  background:#fff4d6;
  color:#87610c;
  font-size:13px;
  font-weight:950;
}

.access-trial-offer__close{
  flex:0 0 auto;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#eef3fb;
  color:#64748b;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}

.consultation-popup{
  position:fixed;
  inset:0;
  z-index:1120;
  display:grid;
  place-items:center;
  padding:24px;
  opacity:0;
  pointer-events:none;
  transition:opacity .28s ease;
}

.consultation-popup--visible{
  opacity:1;
  pointer-events:auto;
}

.consultation-popup__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(5px);
}

.consultation-popup__card{
  position:relative;
  z-index:1;
  width:min(440px,100%);
  display:grid;
  gap:12px;
  padding:26px;
  border:1px solid #d7e4f8;
  border-radius:26px;
  background:#fff;
  color:var(--ss-final-ink);
  box-shadow:0 32px 90px rgba(15,23,42,.28);
  transform:translateY(18px) scale(.98);
  transition:transform .32s ease;
}

.consultation-popup--visible .consultation-popup__card{
  transform:translateY(0) scale(1);
}

.consultation-popup__close{
  position:absolute;
  top:14px;
  right:14px;
  width:38px;
  height:38px;
  border:1px solid #dbe6f3;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}

.consultation-popup__eyebrow{
  width:max-content;
  max-width:100%;
  padding:7px 12px;
  border:1px solid #d7e5ff;
  border-radius:999px;
  background:#eef4ff;
  color:var(--ss-final-blue);
  font-size:12px;
  font-weight:950;
}

.consultation-popup h2{
  margin:0;
  padding-right:32px;
  font-size:28px;
  line-height:1.06;
  font-weight:950;
  letter-spacing:0;
}

.consultation-popup p{
  margin:0;
  color:var(--ss-final-muted);
  font-size:15px;
  line-height:1.45;
  font-weight:700;
}

.consultation-popup__field{
  display:grid;
  gap:6px;
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:850;
}

.consultation-popup__field input{
  height:44px;
  border:1px solid #c9d8ec;
  border-radius:13px;
  background:#fff;
  color:var(--ss-final-ink);
  font:inherit;
  font-size:14px;
  font-weight:750;
  padding:0 12px;
  outline:none;
}

.consultation-popup__check{
  display:flex;
  align-items:flex-start;
  gap:9px;
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:750;
  line-height:1.35;
}

.consultation-popup__check input{
  margin-top:1px;
  width:16px;
  height:16px;
  accent-color:var(--ss-final-blue);
}

.consultation-popup__submit{
  min-height:46px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,#386ff6,#245fff);
  color:#fff;
  font:inherit;
  font-size:14px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 16px 34px rgba(36,95,255,.22);
}

.consultation-popup__submit:disabled{
  opacity:.62;
  cursor:default;
}

.consultation-popup__status{
  min-height:18px;
  color:var(--ss-final-muted);
  font-size:12px;
  font-weight:750;
}

.site-chat-msg{
  color:var(--ss-final-ink);
  background:#f3f6fb;
  border:1px solid #dfe8f5;
}

.site-chat-msg--user{
  background:#eef4ff;
  border-color:#d2e1ff;
}

@media (max-width: 640px){
  .telegram-chat-widget{
    right:14px;
    bottom:14px;
    width:56px;
    height:56px;
    min-height:56px;
    padding:0;
    justify-content:center;
  }

  .telegram-chat-widget__text,
  .telegram-chat-widget::after{
    display:none;
  }

  .telegram-chat-widget__icon{
    width:56px;
    height:56px;
  }

  .site-chat-panel{
    right:12px;
    bottom:82px;
    width:calc(100vw - 24px);
    border-radius:18px;
  }

  .site-chat-panel__messages{
    height:240px;
  }

  .site-chat-panel__form,
  .site-chat-lead__grid{
    grid-template-columns:1fr;
  }

  .access-trial-offer{
    left:12px;
    right:12px;
    bottom:calc(var(--access-offer-bottom, 18px));
    width:auto;
    min-height:0;
    border-radius:22px;
    flex-wrap:wrap;
    justify-content:center;
    transform:translateY(18px);
  }

  .access-trial-offer--visible{
    transform:translateY(0);
  }

  .access-trial-offer strong{
    flex:1 1 calc(100% - 64px);
    font-size:16px;
  }

  .access-trial-offer__button{
    min-width:136px;
  }

  .consultation-popup{
    padding:14px;
  }

  .consultation-popup__card{
    padding:22px 18px 18px;
    border-radius:22px;
  }

  .consultation-popup h2{
    font-size:24px;
  }
}
