/* GreenTrack floating widget — chat + GitHub activity + Notion workspace.
   Reuses the site's design tokens (see index.html <style> for the source). */

#gt-widget{
  --w-forest:#1C3829;
  --w-moss:#294B37;
  --w-sprout:#B07E23;
  --w-sprout-light:#DCB765;
  --w-clay:#8C6318;
  --w-cream:#F6F1E4;
  --w-ink:#221F1A;
  --w-ink-soft:#5B564D;
  --w-line:#CDC2A2;
  font-family:'Inter', sans-serif;
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999;
}

#gt-widget .gt-launcher{
  width:58px; height:58px; border-radius:50%;
  background:linear-gradient(155deg, var(--w-sprout), var(--w-moss));
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 16px 32px -12px rgba(23,50,38,0.55);
  transition:transform .2s;
}
#gt-widget .gt-launcher:hover{transform:translateY(-3px) scale(1.03);}
#gt-widget .gt-launcher svg{width:26px; height:26px; color:#12210E;}
#gt-widget .gt-badge{
  position:absolute; top:-4px; right:-4px; background:var(--w-clay); color:#fff;
  font-family:'IBM Plex Mono', monospace; font-size:10px; min-width:18px; height:18px;
  border-radius:9px; display:flex; align-items:center; justify-content:center; padding:0 4px;
  border:2px solid var(--w-cream);
}

#gt-widget .gt-panel{
  position:absolute; bottom:74px; right:0;
  width:360px; max-width:calc(100vw - 44px);
  height:520px; max-height:70vh;
  background:var(--w-cream);
  border-radius:18px;
  box-shadow:0 30px 60px -20px rgba(9,20,13,0.5);
  border:1px solid var(--w-line);
  display:flex; flex-direction:column;
  overflow:hidden;
  opacity:0; transform:translateY(14px) scale(0.98); pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
#gt-widget.open .gt-panel{opacity:1; transform:translateY(0) scale(1); pointer-events:auto;}

#gt-widget .gt-head{
  background:var(--w-forest); color:var(--w-cream);
  padding:16px 18px; display:flex; align-items:center; justify-content:space-between;
}
#gt-widget .gt-head-title{display:flex; align-items:center; gap:10px;}
#gt-widget .gt-head-title .dot{width:8px; height:8px; border-radius:50%; background:var(--w-sprout-light);}
#gt-widget .gt-head-title b{font-family:'Playfair Display', serif; font-size:15.5px; font-weight:600;}
#gt-widget .gt-head-title span{display:block; font-size:11px; color:rgba(246,242,231,0.65);}
#gt-widget .gt-close{background:none; border:none; color:var(--w-cream); font-size:18px; cursor:pointer; opacity:0.75;}
#gt-widget .gt-close:hover{opacity:1;}

#gt-widget .gt-tabs{
  display:flex; background:#EFE9D8; border-bottom:1px solid var(--w-line);
}
#gt-widget .gt-tab{
  flex:1; padding:11px 6px; border:none; background:none; cursor:pointer;
  font-family:'IBM Plex Mono', monospace; font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--w-ink-soft); border-bottom:2px solid transparent;
}
#gt-widget .gt-tab.active{color:var(--w-moss); border-bottom-color:var(--w-sprout);}

#gt-widget .gt-view{flex:1; display:none; flex-direction:column; overflow:hidden;}
#gt-widget .gt-view.active{display:flex;}

/* --- Chat view --- */
#gt-widget .gt-messages{flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px;}
#gt-widget .gt-msg{max-width:82%; padding:9px 12px; border-radius:12px; font-size:13.3px; line-height:1.5;}
#gt-widget .gt-msg.user{align-self:flex-end; background:var(--w-sprout); color:#12210E; border-bottom-right-radius:3px;}
#gt-widget .gt-msg.team{align-self:flex-start; background:#fff; border:1px solid var(--w-line); color:var(--w-ink); border-bottom-left-radius:3px;}
#gt-widget .gt-msg-meta{font-family:'IBM Plex Mono', monospace; font-size:9.5px; opacity:0.6; margin-top:4px; display:block;}
#gt-widget .gt-empty{color:var(--w-ink-soft); font-size:12.5px; text-align:center; margin:auto; padding:20px;}

#gt-widget .gt-composer{border-top:1px solid var(--w-line); padding:10px; display:flex; gap:8px; background:#fff;}
#gt-widget .gt-composer input[type=text]{
  flex:1; border:1px solid var(--w-line); border-radius:10px; padding:10px 12px;
  font-family:'Inter', sans-serif; font-size:13px; background:var(--w-cream); color:var(--w-ink);
}
#gt-widget .gt-composer button{
  background:var(--w-sprout); border:none; border-radius:10px; width:38px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
#gt-widget .gt-composer button svg{width:16px; height:16px; color:#12210E;}
#gt-widget .gt-precontact{padding:14px 16px; display:flex; flex-direction:column; gap:8px; background:#fff; border-top:1px solid var(--w-line);}
#gt-widget .gt-precontact input{
  border:1px solid var(--w-line); border-radius:9px; padding:9px 11px; font-size:12.5px;
  font-family:'Inter', sans-serif; background:var(--w-cream); color:var(--w-ink);
}
#gt-widget .gt-precontact small{color:var(--w-ink-soft); font-size:11px;}

/* --- Activity view --- */
#gt-widget .gt-activity-list{flex:1; overflow-y:auto; padding:14px 16px; display:flex; flex-direction:column; gap:12px;}
#gt-widget .gt-event{border-left:2px solid var(--w-sprout); padding-left:10px;}
#gt-widget .gt-event a{font-size:13px; color:var(--w-ink); font-weight:500; line-height:1.4;}
#gt-widget .gt-event a:hover{color:var(--w-moss);}
#gt-widget .gt-event .gt-event-meta{
  font-family:'IBM Plex Mono', monospace; font-size:10px; color:var(--w-ink-soft); margin-top:3px; display:block;
}

/* --- Workspace (Notion) view --- */
#gt-widget .gt-workspace{flex:1; overflow-y:auto; padding:14px 16px; display:flex; flex-direction:column; gap:10px;}
#gt-widget .gt-item{
  background:#fff; border:1px solid var(--w-line); border-radius:10px; padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
#gt-widget .gt-item a{font-size:13px; color:var(--w-ink); font-weight:500;}
#gt-widget .gt-item-status{
  font-family:'IBM Plex Mono', monospace; font-size:9.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--w-clay); border:1px solid var(--w-clay); border-radius:999px; padding:2px 8px; white-space:nowrap;
}
#gt-widget .gt-new-item{display:flex; gap:6px; padding:12px 16px; border-top:1px solid var(--w-line); background:#fff;}
#gt-widget .gt-new-item input{
  flex:1; border:1px solid var(--w-line); border-radius:9px; padding:9px 11px; font-size:12.5px;
  font-family:'Inter', sans-serif; background:var(--w-cream); color:var(--w-ink);
}
#gt-widget .gt-new-item button{
  background:var(--w-clay); color:#fff; border:none; border-radius:9px; padding:0 14px;
  font-size:12px; font-weight:600; cursor:pointer;
}

#gt-widget .gt-loading, #gt-widget .gt-offline{
  color:var(--w-ink-soft); font-size:12px; text-align:center; padding:20px; margin:auto;
}

@media (max-width:480px){
  #gt-widget{right:14px; bottom:14px;}
  #gt-widget .gt-panel{width:calc(100vw - 28px); height:66vh;}
}
