/* ================== BASE ================== */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body { font-family: 'Sora', sans-serif; }

.hero-section {
  position: relative;
  width: 100vw;
  background-image:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url('http://whizz-experts.com/wp-content/uploads/2025/08/iStock-1281473933-couple-couch-laptop-dog-01-banner-2000w-0333-1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: black;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.form-overlay {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-right: 10vw;
  padding-left: 20px;
  margin-left: auto;
  width: fit-content;
  position: relative;
  z-index: 20;
}

/* ================== CHAT BOX ================== */
.chat-popup{
  background:#FAFAFA;
  border-radius:20px;

  /* ❗️ЄДИНЕ правило ширини */
  width: 465px !important;
  max-width: 465px !important;

  height:75vh;
  max-height:90vh;
  min-height:350px;
  margin-top:-8vh;
  margin-bottom:-5vh;
  margin-left:auto;
  margin-right:0;

  display:flex;
  flex-direction:column;
  font-family:'Sora',sans-serif;
  box-shadow:0 8px 24px rgba(0,0,0,0.4);
  justify-content:space-between;
  position:relative;
}

.chat-header{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  background:#1F4B99;
  color:#fff;
  border-top-left-radius:20px;
  border-top-right-radius:20px;
  height: 110px;
}
.chat-profile-wrapper{ position:relative; display:inline-block; }
.chat-profile-img{
  width:90px;height:90px;
  border-radius:50%;border:8px solid hsla(0,0%,100%,.1);object-fit:cover;flex-shrink:0;
}
.verified-icon{ position:absolute; bottom:2px; right:3px; height:27px; }
.chat-profile-info{ display:flex; flex-direction:column; font-size:14px; line-height:1.3; }
.chat-name{ font-size:16px; font-weight:600; }
.chat-role{ font-weight:500; opacity:.9; margin-top:3px; }
.chat-desc{ font-size:12px; opacity:.8; }
.chat-rating{ font-size:13px; margin-top:7px; color:#fff; }
.chat-stars{ opacity:.8; margin-left:6px; }

.chat-body{
  padding: 20px;
  flex-grow:1;
  display:flex;
  flex-direction:column;
  color:#1f2937;
  font-size:16px;
  overflow-y:auto;
  font-weight: 400;
}
.chat-body::-webkit-scrollbar{ width:6px; }
.chat-body::-webkit-scrollbar-thumb{ background-color: rgba(0,0,0,.2); border-radius:3px; }

.chat-message{ background:#ececec; padding:12px 14px; border-radius:12px; max-width:100%; line-height:1.5; font-weight: 400; }
.chat-meta{ font-size:13px; color:#959595; margin-bottom:4px; }

.chat-footer{
  background:#dbdbdb;
  flex-wrap:wrap;
  padding:14px 16px;
  display:flex;
  align-items:stretch;
  gap:12px;
  border-bottom-left-radius:20px;
  border-bottom-right-radius:20px;
  flex-shrink:0;
}
.chat-input-holder{ display:flex; flex-wrap:wrap; gap:10px; width:100%; align-items:center; flex:1 1 100%; }
.chat-footer input{
  flex:1; min-width:180px; background:#FAFAFA; border:none; padding:10px 12px; border-radius:12px;
  color:#1f2937; font-size:15px; font-family:'Sora',sans-serif;
}
.chat-footer input::placeholder{ color:#999; }
.chat-footer textarea{
  flex:1 1 100%;
  background:#FAFAFA; border:none; padding:12px 16px; border-radius:12px; color:#333; font-size:16px;
  font-family:'Sora',sans-serif; resize:none; min-height:40px; max-height:120px; line-height:22px;
  overflow-y:auto; box-sizing:border-box; transition:height .2s ease; width:100% !important; max-width:100% !important;
}
.chat-footer button{
  flex:1 1 100%; width:100%; background:#3cad5c; color:#fff; border:none; border-radius:7px;
  font-weight:bold; cursor:pointer; font-size:16px; padding:18px 20px;
}

.chat-row{ display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; }
.chat-avatar{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  max-width:40px;
  max-height:40px;
  flex-shrink:0;
  border-radius:50%;
  object-fit:cover;
}

.site-logo{ position:absolute; top:40px; left:140px; height:60px; z-index:10; }

/* ================== CONTENT SECTIONS (без змін по ширині) ================== */
.how-it-works{
  background:#fff; padding:70px 810px 70px 40px; font-family:'Sora',sans-serif;
  text-align:left; position:relative; z-index:1;
}
.how-it-works .container{ max-width:800px; margin:0 auto; }
.how-it-works h2{ font-size:42px; font-weight:700; margin-bottom:40px; text-align:center; }
.how-it-works .step{ display:flex; align-items:flex-start; gap:20px; margin-bottom:30px; }
.how-it-works .step img{ width:50px; height:47px; object-fit:contain; flex-shrink:0; margin-top:5px; }
.how-it-works .step h3{ font-size:26px; margin:0 0 8px; }
.how-it-works .step p{ margin:0; font-size:18px; color:#333; }

.testimonials{ background:#f7f7f7; padding:80px 810px 80px 40px; text-align:center; }
.testimonials h2{ font-size:32px; font-weight:700; margin-bottom:50px; color:#1f2937; }

.testimonial-carousel{ position:relative; max-width:900px; margin:0 auto; min-height:180px; }
.testimonial{ opacity:0; transition:opacity 1s ease; z-index:0; pointer-events:none; position:absolute; top:0; left:0; right:0; }
.testimonial.active{ opacity:1; z-index:1; pointer-events:auto; }
.testimonial-text{ font-size:18px; color:#333; margin-bottom:20px; line-height:1.6; }
.testimonial-footer{ font-size:16px; display:flex; justify-content:center; align-items:center; gap:10px; font-weight:600; color:#1f2937; }
.quote-icon{ font-size:60px; color:#1de9b6; display:block; }
.quote-icon.end{ margin-top:30px; }
.testimonial-dots{ margin-top:20px; }
.testimonial-dots .dot{
  height:12px; width:12px; margin:0 6px; background:#bbb; border-radius:50%; display:inline-block; cursor:pointer;
  transform:scale(1); transition:background-color .3s ease, transform .3s ease;
}
.testimonial-dots .dot.active{ background:#1fb6ff; }
.stars{ color:#1de9b6; font-size:20px; margin-right:8px; }

.conversion-text{
  position:absolute; top:64%; left:155px; transform:translateY(-50%);
  color:#fff; max-width:700px; z-index:10; font-family:'Sora',sans-serif; text-shadow:1px 1px 6px rgba(0,0,0,.7);
}
.conversion-text h1{ font-size:54px; font-weight:700; line-height:1.2; margin-bottom:12px; color:#fff; }
.conversion-text .subheadline{ font-size:22px; font-weight:400; margin-bottom:24px; line-height:1.5; max-width:90%; }
.conversion-text ul{ list-style:none; padding:0; font-size:22px; line-height:1.7; margin-bottom:20px; }
.conversion-text ul li{ margin-bottom:10px; position:relative; padding-left:28px; }
.conversion-text ul li::before{ content:"✔"; position:absolute; left:0; top:0; color:#1de9b6; font-size:18px; }
.conversion-text .disclaimer{ text-align:center; display:block; font-size:14px; opacity:.7; margin-top:10px; }

/* ================== BREAKPOINTS (ширина/позиція — узгоджені) ================== */

/* ноутбуки */
@media (max-width: 1440px){
  .form-overlay{ padding-right:5vw; }
  .how-it-works{ padding:70px 510px 70px 40px; }
  .testimonials{ padding:80px 510px 80px 40px; }
}

/* планшети */
@media (max-width: 1024px){
  .form-overlay{ padding-right:2vw; }
  .how-it-works{ padding:70px 530px 70px 40px; }
  .testimonials{ padding:80px 510px 80px 40px; }
}

/* мобільні налаштування контенту */
@media (max-width: 768px){
  .form-overlay{ padding-right:1vw; justify-content:center; }
  .how-it-works{ padding:50px 20px; text-align:center; }
  .how-it-works .step{ flex-direction:column; align-items:center; text-align:center; }
  .testimonial-carousel{ padding:0 20px; }
  .conversion-text{ display:none !important; }

  /* чат на мобільних: пришити праворуч і розтягнути з відступами */
  .sticky-chat-wrapper{
    left:auto !important;
    right:10px !important;
    top:10px !important;
  }
  .chat-popup{
    width: calc(100vw - 20px) !important;
    max-width: 100vw !important;
    height: calc(79vh - 20px);
    margin: 0 auto;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.4);
    margin-top:-11vh;
  }

  .site-logo{
    position:absolute !important; top:10px !important; left:20px !important; height:50px !important; z-index:10 !important;
  }

  .chat-profile-img{
    width:80px !important; height:80px !important; min-width:80px !important; min-height:80px !important; max-width:80px !important; max-height:80px !important;
  }
  .verified-icon{ height:24px !important; bottom:3px !important; right:3px !important; }
}

/* ================== МЕЛОЧІ — без змін по ширині ================== */
.loading-bubble{ background:#ececec; padding:10px 14px; border-radius:12px; display:flex; gap:6px; width:fit-content; }
.loading-bubble .dot{ width:8px; height:8px; background:#6c757d; border-radius:50%; animation:blink 1.4s infinite both; }
.loading-bubble .dot:nth-child(2){ animation-delay:.2s; }
.loading-bubble .dot:nth-child(3){ animation-delay:.4s; }
@keyframes blink{
  0%,80%,100%{ opacity:.2; transform:scale(.9); }
  40%{ opacity:1; transform:scale(1.2); }
}

.status-online{ font-size:18px; color:#34C759; font-weight:500; margin-left:0; }
.online-dot-chat{ position:absolute; bottom:0; right:0; width:12px; height:12px; background:#34C759; border-radius:50%; border:2px solid #fff; }
.chat-avatar-wrapper{ position:relative; display:inline-block; flex: 0 0 40px;}

.user-message{
  background:#1F4B99; color:#fff; padding:12px 16px; border-radius:16px; max-width:100%; line-height:1.5;
  margin-left:auto; display:inline-block; white-space:pre-wrap; word-break:break-word; overflow-wrap:break-word;
}
.user-row{ display:flex; justify-content:flex-end; margin-bottom:12px; }
.user-meta{ font-size:13px; color:#999; text-align:right; margin-bottom:4px; }

.chat-footer button:disabled{ background:#ababab; cursor:not-allowed; opacity:.7; }
.conversion-text p{ margin-bottom:.75em; font-size:20px; }
a.chat-cta-link{ color:#228c5f; font-weight:600; text-decoration:none; transition:.2s; border-bottom:1px solid rgba(34,140,95,.2); }
a.chat-cta-link:hover{ color:#186b44; border-bottom:1px solid rgba(24,107,68,.4); transform:translateX(1px); }

.hidden{ display:none !important; }
@keyframes slideFadeIn{ 0%{opacity:0; transform:translateY(12px);} 100%{opacity:1; transform:translateY(0);} }

.status-online{ font-size:16px; color:#34C759; font-weight:600; }
.reply-time{ font-size:14px; color:rgba(255,255,255,.8); font-weight:500; white-space:nowrap; }
@media(max-width:420px){ .reply-time{ font-size:13px; } }

@media (max-width: 1024px){
  .chat-footer button{ padding:18px 10px; }
  .chat-footer button.send-mode{ padding:17px 25px; }
  .chat-footer button.clicked{ padding:17px 15px !important; }
}
.chat-footer button.clicked, .chat-footer button.clicked:hover{
  background:#ababab !important; cursor:not-allowed !important; pointer-events:none !important; transition:none !important;
}

.chat-info-banner{
  background:#f0f4fb; border-left:4px solid #5A7FBF; border-radius:10px; padding:6px 12px;
  margin:8px 14px -4px; font-size:13.5px; color:#2A3F66; box-shadow:0 1px 3px rgba(0, 0, 0, 0.04); line-height:1.35;
}
.chat-info-banner strong{ display:block; font-size:16px; margin-bottom:3px; color:#1F3258; }
.chat-info-banner ul{ list-style:none; padding:0; margin:0; }
.chat-info-banner li{ margin-bottom:1px; }

.mobile-only{ display:none; }
@media (max-width:768px){ .mobile-only{ display:block; } }

.green-payment-button{ background:#0077cc; color:#fff; font-weight:bold; border:none; border-radius:12px; font-size:16px; padding:14px 24px; cursor:pointer; transition:.2s; }
.green-payment-button:hover{ background:#005fa3; }

.chat-footer button.send-mode{ padding:18px 30px; }

.simple-online-status{ font-weight:600; font-size:14px; display:flex; align-items:center; justify-content:center; gap:6px; }
.simple-online-status .green-dot{ width:10px; height:10px; background:#34C759; border-radius:50%; }

@keyframes btnPulse{
  0%{ transform:scale(1); box-shadow:0 0 0 0 rgba(60,173,92,.48); }
  70%{ transform:scale(1.04); box-shadow:0 0 0 14px rgba(60,173,92,0); }
  100%{ transform:scale(1); }
}
#go-to-chat.pulse{ animation:btnPulse 1.6s ease-out infinite !important; will-change:transform,box-shadow; }
@media (prefers-reduced-motion: reduce){ #go-to-chat.pulse{ animation:none !important; } }


/* ================== FIXED POSITIONER (єдине правило) ================== */

/* ================== SUPPORT LAYOUT (без змін по ширині) ================== */
#primary .support-layout{
  display:flex !important; justify-content:space-between; align-items:flex-start; gap:30px; max-width:1200px; margin:0 auto;
}
#primary .support-content{ flex:0 0 65% !important; }
#primary .support-chat{ flex:0 0 30%; position:sticky; top:20px; }

.wt-bubble{
  background:#1F4B99; color:#fff; padding:16px 16px 10px 20px; border-radius:14px; font:600 16px/1.3 'Sora',sans-serif; position:relative;
}
.wt-bubble::after{
  content:""; position:absolute; right:-8px; top:50%; transform:translateY(-50%);
  border-top:10px solid transparent; border-bottom:10px solid transparent; border-left:10px solid #1F4B99;
}
.wt-avatar{ position:relative; width:65px; height:65px; border-radius:50%; overflow:hidden; box-shadow:0 0 0 4px #9ed1f2; }
.wt-avatar img{ width:100%; height:100%; object-fit:cover; }
.wt-badge{
  position:absolute; top:-2px; right:-2px; width:20px; height:20px; background:#ff4d4f; color:#fff; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font:700 12px/1 'Sora',sans-serif; box-shadow:0 0 0 2px #fff;
}
@media (max-width:420px){ .wt-bubble{ display:none; } }


/* Desktop ≥1440px — базово 480px справа */
/* sticky chat */
.sticky-chat-wrapper{
  position: fixed !important;
  top: 21vh !important;
  left: auto !important;
  z-index: 9999;

  /* ПРОПОРЦІЙНИЙ ВІДСТУП БЕЗ transform */
  right: clamp(
    var(--right-min),
    calc( (var(--right-base) * 1vw) * (100 / var(--base-width)) ),
    calc(var(--right-base) * 1px)
  ) !important;

  transform: none !important;
}

/* 1024–1439px */
@media (min-width:1024px) and (max-width:1439px){
  .chat-popup{
    width: 450px !important;
    max-width: 450px !important;
  }
}

/* 768–1023px */
@media (min-width:768px) and (max-width:1023px){
  .chat-popup{
    width: 360px !important;
    max-width: 360px !important;
  }
}

/* <768px — мобільний */
@media (max-width:767px){
  .sticky-chat-wrapper{
    right: 10px !important;
    left: 10px !important;
    top: 10px !important;
    transform: none !important;
  }
  .chat-popup{
    width: calc(100vw - 40px) !important;
    max-width: none !important;
  }
}


:root{
  --right-base: 130;
  --start-width: 1920;
  --k: 3;
  --right-min: 10px;
}

/* позиціонування чату – без інших transform нижче! */
.sticky-chat-wrapper,
.heroContainer .chatContainer{
  position: fixed !important;
  top: 21vh !important;
  left: auto !important;
  z-index: 9999;

  right: clamp(
    var(--right-min),
    calc( (var(--k) * var(--right-base) / var(--start-width)) * 100vw
          - ((var(--k) - 1) * var(--right-base) * 1px) ),
    calc(var(--right-base) * 1px)
  ) !important;

  transform: none !important;
  margin-right: 0 !important;
}

@media (max-width:768px){
  .wt-launcher{ right:16px !important; left:auto !important; }
}

.wt-launcher{
  position: fixed;
  bottom: 24px;
  right: 11vw;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 2147483647;
}

.wt-launcher.wt-hidden{
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* Базово: чат прихований */
.whizz-chat-wrapper {
  position: fixed;
  top: 1vh;
  right: clamp(
    var(--right-min),
    calc((var(--k) * var(--right-base) / var(--start-width)) * 100vw
          - ((var(--k) - 1) * var(--right-base) * 1px)),
    calc(var(--right-base) * 1px)
  );
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease; /* ← фейд + рух */
  will-change: opacity, transform;
}

/* Активний стан */
.whizz-chat-wrapper.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* overlay фон */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

/* активний стан */
.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}


/* ====== ZOOM BEHAVIOR: DESKTOP ONLY ====== */
@media (min-width: 769px) {
  .chat-overlay.active ~ .whizz-chat-wrapper { transform: scale(1.08); }   /* легенький масштаб при оверлеї */
  .whizz-chat-wrapper.zoomed { transform: scale(1.2); transition: transform 0.25s ease; } /* ручний “зум” */
  .whizz-chat-wrapper.zoomed .chat-popup { transform: scale(1.04); }       /* легкий апскейл контенту */
}

/* ====== MOBILE: NO ZOOM AT ALL ====== */
@media (max-width: 768px) {
  .chat-overlay.active ~ .whizz-chat-wrapper,
  .whizz-chat-wrapper.zoomed,
  .whizz-chat-wrapper.zoomed .chat-popup {
    transform: none !important;
  }
}

/* Кнопка згортання у хедері */
.chat-exit-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-exit-btn img {
  width: 20px;
  height: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-exit-btn:hover img { opacity: 0.8; transform: translateY(2px); }

.chat-exit-btn,
.chat-exit-btn img {
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.chat-exit-btn:hover,
.chat-exit-btn:hover img {
  background: transparent !important;
  filter: none !important;
}

/* 📱 Мобільне — можливість згорнути */
@media (max-width:768px){
  .whizz-chat-wrapper.wt-collapsed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(20px) !important;
  }
  .chat-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9998;
                 opacity:0; visibility:hidden; transition:.2s ease; }
  .chat-overlay.active{ opacity:1; visibility:visible; }
}

/* Дуже маленькі екрани — дрібні текстові твіки */
@media (max-width: 420px) {
  .chat-name { font-size: 14px; }
  .chat-role, .chat-desc { font-size: 12px; }
  .chat-footer textarea { font-size: 14px; }
}


/* ==== WT launcher bubble: show on phones, fit screen ==== */
@media (max-width: 768px){
  .wt-launcher{
    right: 12px !important;
    bottom: 20px !important;
    gap: 10px;
  }
  .wt-bubble{
    display: block !important;       /* повертаємо відображення */
    max-width: 77vw;                  /* щоб не виходила за екран */
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;              /* перенос рядків */
    word-wrap: break-word;
    z-index: 1;                       /* поверх фону */
  }
  .wt-bubble::after{
    right: -8px;                      /* стрілка до аватарки */
  }
  .wt-avatar{
    width: 54px;
    height: 54px;
    box-shadow: 0 0 0 3px #9ed1f2;
  }
}

/* на дуже вузьких екранах теж не ховаємо */
@media (max-width: 420px){
  .wt-bubble{ display: block !important; }
}

/* 🔒 Заборонити будь-який зум чату на мобільних */
@media (max-width: 768px) {
  .wt-no-zoom,
  .wt-no-zoom .chat-popup,
  .chat-overlay.active ~ .whizz-chat-wrapper,
  .whizz-chat-wrapper.zoomed,
  .whizz-chat-wrapper.zoomed .chat-popup {
    transform: none !important;
  }
}

/* 🔒 Вимикаємо автозум інпутів/textarea на мобільних */
@media (max-width: 768px) {
  .chat-footer textarea,
  .chat-footer input {
    font-size: 16px !important;        /* мінімум 16px — інакше мобілки зумлять */
    -webkit-text-size-adjust: 100%;
    height: 58px;
    padding: 11px 16px;
  }
}

/* Якщо десь залишився наш "трансформ-зум", теж глушимо його на мобільних */
@media (max-width: 768px) {
  .chat-overlay.active ~ .whizz-chat-wrapper,
  .whizz-chat-wrapper.zoomed,
  .whizz-chat-wrapper.zoomed .chat-popup {
    transform: none !important;
  }
}

/* 📱 Показати кнопку закриття на мобільних без фокусу */
@media (max-width: 768px){
  .whizz-chat-wrapper.active #chat-exit-btn{
    display: flex !important;
  }
}

.entry-meta,
.posted-on,
.byline,
.comments-link {
  display: none !important;
}


/* ========= HOVER ДЛЯ СТАРТ-ЧАТ (ПК) ========= */
@media (hover:hover) and (pointer:fine) and (min-width: 769px){
  /* плавні переходи */
  .wt-launcher,
  .wt-launcher .wt-bubble,
  .wt-launcher .wt-avatar,
  #go-to-chat{
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, filter .18s ease;
  }

  /* коли навели на всю плашку лаунчера */
  .wt-launcher:hover{
    transform: translateY(-3px);
    filter: brightness(1.02);
  }
  .wt-launcher:hover .wt-bubble{
    background: #2F5BB3;                 /* трішки яскравіше за #103a57 */
    box-shadow: 0 10px 24px rgba(16,58,87,.28);
  }
  .wt-launcher:hover .wt-avatar{
    transform: translateY(-1px);
    box-shadow: 0 0 0 6px #b9def6;       /* підсвітити рамку */
  }

  /* якщо маєте окрему кнопку "Start chat" з id */
  #go-to-chat:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(60,173,92,.35);
    background: #349d56;                 /* трохи темніший за #3cad5c */
  }
  #go-to-chat:active{
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
  }
}

/* доступність: видимий фокус для клавіатури */
.wt-launcher:focus-visible,
#go-to-chat:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(33,150,243,.55), 0 10px 20px rgba(0,0,0,.18);
  border-radius: 999px;
}

/* БАЗА: колір кнопки */
#go-to-chat,
.green-payment-button{
  background: #e85c41;
  color: #fff;
  border: none;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* Тільки для пристроїв із мишею (ПК) */
@media (hover:hover) and (pointer:fine) and (min-width:769px){
  #go-to-chat:hover,
  .green-payment-button:hover{
    background: #d1533a;                /* ваш ховер */
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,.22);
  }
  #go-to-chat:active,
  .green-payment-button:active{
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0,0,0,.20);
    filter: saturate(0.98);
  }
}

/* Доступність: видимий фокус */
#go-to-chat:focus-visible,
.green-payment-button:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,92,65,.35), 0 8px 18px rgba(0,0,0,.18);
}

/* Disabled — лишаємо нейтральним */
#go-to-chat:disabled,
.green-payment-button:disabled{
  background: #ababab;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Опційно: вимкнути анімації для тих, хто просить менше руху */
@media (prefers-reduced-motion: reduce){
  #go-to-chat,
  .green-payment-button{
    transition: none;
  }
}

/* ==== Start chat: без анімацій на hover ==== */
#go-to-chat,
.green-payment-button{
  background: #e85c41 !important;
  color: #fff;
  border: none;
  transition: none !important;   /* вимкнути плавність */
}

/* ПК: лише зміна кольору без рухів/тіней */
@media (hover:hover) and (pointer:fine) and (min-width:769px){
  #go-to-chat:hover,
  .green-payment-button:hover{
    background: #d1533a !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }

  #go-to-chat:active,
  .green-payment-button:active{
    background: #d1533a !important; /* можна лишити той самий */
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
}

/* (опц.) якщо десь задавали окремі transition для цих кнопок */
#go-to-chat,
#go-to-chat:hover,
#go-to-chat:active,
.green-payment-button,
.green-payment-button:hover,
.green-payment-button:active{
  transition: none !important;
}


/* === Пульсація під колір кнопки (orange) === */
@keyframes btnPulse{
  0%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 92, 65, .48);   /* #e85c41 з прозорістю */
  }
  70%{
    transform: scale(1.04);
    box-shadow: 0 0 0 14px rgba(232, 92, 65, 0);  /* затухає кільце */
  }
  100%{
    transform: scale(1);
  }
}

/* лишаємо пульсацію увімкненою на мобільних, як і було */
#go-to-chat.pulse{
  animation: btnPulse 1.6s ease-out infinite !important;
  will-change: transform, box-shadow;
  /* базовий фон вже #e85c41 вище — нічого не чіпаємо */
}

/* якщо хочеш ще ближче до hover-відтінку — трохи темніший варіант: */
/*
@keyframes btnPulse{
  0%{ transform:scale(1); box-shadow:0 0 0 0 rgba(209, 83, 58, .48); }   #d1533a
  70%{ transform:scale(1.04); box-shadow:0 0 0 14px rgba(209, 83, 58, 0); }
  100%{ transform:scale(1); }
}
*/

/* повага до налаштувань користувача */
@media (prefers-reduced-motion: reduce){
  #go-to-chat.pulse{ animation: none !important; }
}


/* ===== Continue Payment Button (окремо від Start Chat) ===== */
.continue-payment-button {
  background: #0077cc;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background-color .2s ease;
}

.continue-payment-button:hover {
  background: #005fa3;
}


/* MOBILE FADE IN FIX */
@media (max-width: 768px) {
  .whizz-chat-wrapper {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease-in-out;
  }

  .whizz-chat-wrapper.wt-fade-in {
    opacity: 1;
    pointer-events: all;
  }
}

@keyframes shake-textarea {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-2px); }
}

@keyframes glow-in {
  0%   { box-shadow: 0 0 0 rgba(0,0,0,0); }
  100% { 
    box-shadow:
      0 0 0 1px rgba(59,130,246,0.5),
      0 0 6px rgba(59,130,246,0.55),
      0 0 12px rgba(59,130,246,0.35);
  }
}

/* автотригер при автофокусі */
textarea#user-message.focus-animate {
  animation:
    glow-in 0.8s ease forwards,
    shake-textarea 0.6s ease 0.7s; /* ← додаємо 0.3s затримку */
  border-color: #3b82f6 !important;
  outline: none;
}

/* постійна підсвітка при ручному фокусі */
textarea#user-message:focus {
  border-color: #3b82f6 !important;
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.5),
    0 0 6px rgba(59,130,246,0.55),
    0 0 12px rgba(59,130,246,0.35);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  outline: none;
}

@media (max-width: 768px) {
  .chat-body {
    font-size: 15px;
    padding: 15px 20px 10px;
  }

  .chat-message,
  .user-message {
    font-size: 15px;
  }

  .chat-meta,
  .user-meta {
    font-size: 12px;
  }
}


/* Загальний стиль для контейнера кнопок */
.quick-replies {
  display: flex; /* Горизонтальне вирівнювання */
  justify-content: center; /* Центруємо кнопки по горизонталі */
  gap: 12px; /* Відстань між кнопками */
  margin: 15px auto 13px;
  flex-wrap: wrap; /* Дозволяємо кнопкам переноситись на новий рядок на малих екранах */
  animation: slideFadeIn .4s ease-out;
}

/* Стилі для кнопок */
.quick-replies button {
  background: #ffffff;
  color: #0f172a; /* темний, читабельний */
  font-weight: 500;
  border: 1.5px solid #2563eb; /* бренд-синій */
  border-radius: 22px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

/* Hover */
.quick-replies button:hover {
  background: #eff6ff; /* легкий бренд-фон */
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

/* Active (клік) */
.quick-replies button:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* Медіа-запит для мобільних пристроїв: кнопки вертикальні */
@media (max-width: 768px) {
  .quick-replies {
    flex-direction: column; /* Вертикальне вирівнювання */
    align-items: center; /* Вирівнюємо кнопки по центру */
  }

  .quick-replies button {
    width: 100%; /* Розтягнути кнопки на всю ширину */
    font-size: 14px;
    padding: 12px 0; /* Відступи між кнопками */
    margin-bottom: 8px; /* Відстань між кнопками */
  }
}


/* ===== WT launcher loading state ===== */
.wt-bubble.wt-is-loading{
  width: 140px;
  height: 70px;
  padding: 0 !important;
  position: relative;
  display: grid !important;
  place-items: center !important;
}

.wt-bubble.wt-is-loading .wt-bubble-text,
.wt-bubble.wt-is-loading .quick-replies{
  display: none !important;
}

.wt-launcher-loader{
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  pointer-events: none !important;
  opacity: 0;
  animation: wtLoaderFadeIn 160ms ease-out forwards;
}

.wt-spinner{
  width: 30px;
  height: 30px;
  display: block;
  animation: wtSpin 0.85s linear infinite;
}

.wt-spinner-arc{
  fill: none;
  stroke: rgba(255,255,255,0.95);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 200;
  stroke-dashoffset: 0;
  animation: wtDash 1.05s ease-in-out infinite;
}

@keyframes wtSpin{ to { transform: rotate(360deg); } }

@keyframes wtDash{
  0%   { stroke-dasharray: 1 200;  stroke-dashoffset: 0;    opacity: .7; }
  50%  { stroke-dasharray: 70 200; stroke-dashoffset: -20;  opacity: 1; }
  100% { stroke-dasharray: 1 200;  stroke-dashoffset: -90;  opacity: .7; }
}

@keyframes wtLoaderFadeIn{ from {opacity:0;} to {opacity:1;} }


@media (max-width: 768px) {
  /* Центруємо контент у бульбашці по вертикалі */

  /* Щоб welcome-текст і кнопки не липли до верхнього краю */
  .wt-bubble.loaded .wt-bubble-text {
    margin: 0 0 10px 0;      /* трохи простору над кнопками */
    text-align: left;        /* якщо хочеш по центру — постав center */
    width: 100%;
  }

  /* Сам блок кнопок по центру */
  .wt-bubble.loaded .quick-replies {
    margin: 0;
    width: 100%;
    align-items: center;
  }

  .wt-bubble.loaded .quick-replies button {
    width: 100%;
    max-width: 260px;
  }
}

/* ===== Chat-body Quick Replies ===== */
.chat-body-quick-replies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  row-gap: 10px;
  column-gap: 2px;
  padding: 4px 16px 8px;
  flex-shrink: 0;
  animation: slideFadeIn .4s ease-out;
}

.chat-body-quick-replies.hidden {
  display: none !important;
}

/* Найдовша кнопка — займає весь перший рядок */
.cbqr-btn.cbqr-wide {
  grid-column: 1 / -1;
  grid-row: 1;
}

/* Решта кнопок — другий рядок */
.cbqr-btn:not(.cbqr-wide) {
  grid-row: 2;
}

.cbqr-btn {
  background: #7c8596;
  color: #fff;
  font-weight: 500;
  border: none;
  border-radius: 22px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  transition: background .2s, transform .15s;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  width: fit-content;
  max-width: 100%;
}

.cbqr-btn:empty {
  display: none;
}

.cbqr-btn:hover {
  background: #5c6575;
  transform: translateY(-1px);
}

.cbqr-btn:active {
  transform: scale(0.97);
}

/* Всі три в один рядок */
.chat-body-quick-replies.cbqr-single-row {
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  column-gap: 7px;
}
.chat-body-quick-replies.cbqr-single-row .cbqr-btn {
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Вертикальний режим */
.chat-body-quick-replies.cbqr-vertical {
  grid-template-columns: 1fr;
}
.chat-body-quick-replies.cbqr-vertical .cbqr-btn {
  grid-column: 1 !important;
  grid-row: auto !important;
  width: 100%;
  max-width: 300px;
}

/* Мобільні — тільки менший розмір, решту вирішує JS-логіка */
@media (max-width: 768px) {
  .chat-body-quick-replies {
    row-gap: 6px;
  }


  .chat-body-quick-replies .cbqr-btn {
    font-size: 13px;
    padding: 7px 11px;
  }

  .chat-footer {
    padding: 7px 16px 10px;
    gap: 6px;
  }

  .chat-footer button {
    padding: 14px 10px;
  }
  .chat-footer button.send-mode {
    padding: 14px 25px;
  }
  .chat-footer button.clicked {
    padding: 14px 15px !important;
  }
}

/* avatar має дозволяти "вилізти" бейджу назовні */
.wt-avatar{
  position: relative;
  overflow: visible !important; /* 🔥 головне */
}

/* щоб картинка залишалась круглою, навіть якщо overflow visible */
.wt-avatar img{
  border-radius: 50%;
}

/* 🔴 бейдж */
.wt-avatar::after{
  content: "1";
  position: absolute;
  top: -4px;
  right: -4px;

  width: 18px;
  height: 18px;

  background: #ff3b30;
  color: #fff;

  border-radius: 50%;
  font: 700 11px/18px 'Sora', sans-serif;
  text-align: center;

  box-shadow: 0 0 0 2px #fff;
  z-index: 9999;
  pointer-events: none;
}
