
/* --- ANIMAATIOT --- */
@keyframes gtPulse{
  0%{ transform:scale(1); box-shadow:0 0 0 0 rgba(255,204,0,0.6);}
  70%{ transform:scale(1.05); box-shadow:0 0 0 16px rgba(255,204,0,0);}
  100%{ transform:scale(1); box-shadow:0 0 0 0 rgba(255,204,0,0);}
}
@keyframes gtSlideUp{
  from{ transform:translateY(20px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}
@keyframes gtFadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

/* --- KELLUVA NAPPI (Groweo-tyyli) --- */
.gt-toggle{
  position:fixed;
  bottom:24px; right:24px;
  width:64px; height:64px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:999999;
}
.gt-toggle-inner{
  width:100%; height:100%;
  border-radius:50%;
  background:#ffcc00;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 12px 26px rgba(0,0,0,.35);
  transition:transform .15s ease, box-shadow .15s ease;
}
.gt-toggle-svg{
  width:26px; height:26px;
}
.gt-toggle:hover .gt-toggle-inner{
  transform:translateY(-2px);
  box-shadow:0 16px 32px rgba(0,0,0,.4);
}
.gt-pulse .gt-toggle-inner{
  animation: gtPulse 1.4s ease-in-out infinite;
}

/* Hover tooltip */
.gt-toggle-tooltip{
  position:absolute;
  right:80px;
  bottom:18px;
  background:#000;
  color:#ffcc00;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
  box-shadow:0 8px 20px rgba(0,0,0,.35);
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.gt-toggle:hover .gt-toggle-tooltip{
  opacity:1;
  transform:translateY(0);
}

/* --- PROMO PANEELI --- */
.gt-promo{
  position:fixed;
  right:40px;
  bottom:120px;
  max-width:360px;
  background:transparent;
  z-index:999997;
  display:flex;
  align-items:flex-start;
  gap:10px;
  transition:opacity .3s ease, transform .3s ease;
}
.gt-animate-in{
  animation: gtSlideUp .35s ease-out;
}
.gt-promo-hide{
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
}
.gt-promo-avatar{
  width:48px; height:48px;
  border-radius:50%;
  background:#ffcc00;
  background-size:cover;
  background-position:center;
}
.gt-promo-content{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.gt-promo-bubble{
  background:#ffffff;
  border-radius:14px;
  padding:8px 12px;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  font-size:14px;
}
.gt-promo-buttons{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.gt-promo-buttons button{
  border:none;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  cursor:pointer;
  background:#ffcc00;
  color:#000;
  text-align:left;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.gt-promo-close{
  border:none;
  background:#000;
  color:#ffcc00;
  border-radius:50%;
  width:24px; height:24px;
  font-size:16px;
  cursor:pointer;
}

/* --- CHAT-IKKUNA --- */
.gt-widget{
  position:fixed;
  bottom:90px; right:24px;
  width:420px; height:620px;
  background:#ffffff;
  border-radius:24px;
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  z-index:999998;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  transform:translateY(20px);
  opacity:0;
  pointer-events:none;
  transition:transform .25s ease-out, opacity .25s ease-out;
}
.gt-widget.gt-open{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}
.gt-widget.gt-hidden{
  transform:translateY(10px);
  opacity:0;
  pointer-events:none;
}

/* --- HEADER --- */
.gt-header{
  background:#000;
  color:#ffcc00;
  padding:10px 14px;
  font-size:15px;
  font-weight:500;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.gt-header-left{
  display:flex;
  align-items:center;
  gap:8px;
}
.gt-logo{
  height:26px; width:auto;
}
.gt-header-text{ display:flex; flex-direction:column; }
.gt-header-title{ font-size:15px; font-weight:600; }
.gt-header-subtitle{ font-size:11px; color:#ffd84d; }
.gt-header-actions{ display:flex; align-items:center; gap:6px; }
.gt-header-back{
  display:none;
  border:none;
  background:transparent;
  color:#ffcc00;
  font-size:12px;
  cursor:pointer;
  align-items:center;
}
.gt-header-close{
  background:transparent;
  border:none;
  color:#ffcc00;
  font-size:22px;
  cursor:pointer;
  line-height:1;
}

/* --- HERO KUVA --- */
.gt-hero{
  width:100%;
  border-radius:16px;
  overflow:hidden;
  margin-bottom:10px;
}
.gt-hero-image{
  display:block;
  width:100%;
  height:auto;
}

/* --- BODY & VIEWS --- */
.gt-body{
  flex:1 1 auto;
  background:#f8f8f8;
  display:flex;
  flex-direction:column;
  position:relative;
}
.gt-view{
  flex:1 1 auto;
  display:none;
  flex-direction:column;
  padding:12px 14px;
  overflow-y:auto;
  -webkit-overflow-scrolling: touch;
}

/* HOME */
.gt-view-home{ display:flex; gap:12px; flex-direction:column; }
.gt-home-avatar{
  width:48px; height:48px;
  border-radius:50%;
  background:#ffcc00;
}
.gt-home-bubble{
  background:#ffffff;
  border-radius:18px;
  padding:10px 12px;
  box-shadow:0 6px 18px rgba(0,0,0,.15);
  font-size:14px;
  margin-bottom:4px;
}
.gt-home-buttons{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.gt-home-buttons button{
  border:none;
  border-radius:999px;
  padding:10px 16px;
  font-size:14px;
  cursor:pointer;
  background:#ffcc00;
  color:#000;
  text-align:left;
  box-shadow:0 6px 18px rgba(0,0,0,.2);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.gt-home-buttons button span{
  flex:1;
}

/* CHAT */
.gt-view-chat{ display:flex; flex-direction:column; }
.gt-price-panel{
  padding:6px 0 2px;
  background:#f8f8f8;
  border-bottom:1px solid #ececec;
}
.gt-price-step{ margin-bottom:6px; }
.gt-price-step span{ display:block; font-size:12px; margin-bottom:4px; }
.gt-pill-row{ display:flex; flex-wrap:wrap; gap:6px; }
.gt-pill-row button{
  border:none;
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  cursor:pointer;
  background:#ffffff;
  color:#000;
  box-shadow:0 0 0 1px #ccc;
  transition:background .15s ease, transform .15s ease;
}
.gt-pill-row button:hover{
  background:#ffcc00;
  transform:translateY(-1px);
}
.gt-dims-row{
  display:flex;
  gap:6px;
  margin-bottom:6px;
}
.gt-dims-row input{
  flex:1;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid #d0d0d0;
  font-size:13px;
}
.gt-thickness-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  font-size:13px;
  margin-bottom:6px;
}
.gt-thickness-row label{
  display:flex;
  align-items:center;
  gap:4px;
}
#gt-calc{
  border:none;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  cursor:pointer;
  background:#000;
  color:#ffcc00;
}

.gt-messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:8px 0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.gt-bubble{
  padding:8px 12px;
  border-radius:16px;
  max-width:80%;
  font-size:14px;
  line-height:1.4;
  margin:0 4px;
  animation: gtFadeIn .2s ease-out;
}
.gt-bubble.bot{ background:#ffffff; color:#000; align-self:flex-start; }
.gt-bubble.user{ background:#000; color:#ffcc00; align-self:flex-end; }

.gt-input{
  display:flex;
  padding:8px 4px 4px;
  border-top:1px solid #e0e0e0;
  background:#fdfdfd;
}
.gt-input input{
  flex:1;
  padding:8px 10px;
  border-radius:16px;
  border:1px solid #ccc;
  font-size:14px;
}
.gt-input button{
  margin-left:8px;
  padding:0 16px;
  background:#000;
  color:#ffcc00;
  border-radius:16px;
  border:none;
  cursor:pointer;
}

/* FORMS */
.gt-form-header{ display:flex; gap:10px; margin-bottom:10px; }
.gt-form-text{ display:flex; flex-direction:column; gap:4px; }
.gt-form-title{ font-weight:600; font-size:16px; }
.gt-form-subtitle{ font-size:13px; }
.gt-form-fields{ display:flex; flex-direction:column; gap:8px; }
.gt-form-fields input,
.gt-form-fields textarea{
  border-radius:14px;
  border:1px solid #e0e0e0;
  padding:10px 12px;
  font-size:14px;
  resize:vertical;
}
.gt-form-fields button{
  margin-top:4px;
  padding:10px;
  background:#ffcc00;
  color:#000;
  font-weight:600;
  border-radius:18px;
  border:none;
  cursor:pointer;
}

/* TABBAR */
.gt-tabbar{
  display:flex;
  justify-content:space-around;
  padding:6px 8px;
  background:#262626;
}
.gt-tabbar button{
  flex:1;
  margin:0 3px;
  border:none;
  border-radius:999px;
  padding:6px 0;
  font-size:12px;
  cursor:pointer;
  background:transparent;
  color:#ffffff;
}
.gt-tabbar button.active{
  background:#ffffff;
  color:#000;
}

/* --- RESPONSIVE --- */
@media (max-width:768px){
  .gt-widget{
    width:100vw;
    height:100vh;
    bottom:0;
    right:0;
    border-radius:0;
  }
  .gt-toggle{
    bottom:16px;
    right:16px;
    width:52px;
    height:52px;
  }
  .gt-toggle-tooltip{
    display:none;
  }
  .gt-promo{ display:none; }
}
