/* Packet 4C Option B: complete reviewed TGPT block from css/style.css:680-1294.
   Source SHA-256: e73af7d4d4a8baec6a5087ec9d5c6d41891759a543e71742ad37317cae95358c
   Shared stylesheet and production widget are unchanged. Inline mic/intro styling stays widget-owned.
   Fonts use local fallbacks; no new font dependency is fetched. */
body.summer-index #tgpt-panel,body.summer-index #tgpt-launcher,body.summer-index #tgpt-idle-nudge,body.summer-index #tgpt-smart-intro-overlay {font-family:"Open Sans",system-ui,-apple-system,sans-serif;color:#fff;line-height:1.6;box-sizing:border-box;}
body.summer-index #tgpt-panel *,body.summer-index #tgpt-launcher *,body.summer-index #tgpt-idle-nudge *,body.summer-index #tgpt-smart-intro-overlay * {box-sizing:border-box;}
#tgpt-launcher{
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: auto;
  top: auto;

  width: auto;
  min-width: 60px;
  height: 60px;
  padding: 0 24px;

  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 188, 212, 0.26), transparent 52%),
    linear-gradient(145deg, rgba(4, 14, 20, 0.92), rgba(5, 11, 17, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(106, 215, 214, 0.38);

  box-shadow:
    0 10px 28px rgba(0,0,0,0.62),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 18px rgba(0, 188, 212, 0.18);
  cursor: pointer;
  z-index: 10000;

  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;

  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  color: rgba(255, 255, 255, 0.95);
  font-family: "Fjalla One", sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

#tgpt-launcher:hover{
  transform: scale(1.03) translateY(-2px);
  border-color: rgba(255, 195, 132, 0.68);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.7),
    0 0 24px rgba(0, 188, 212, 0.28);
}

/* launcher avatar */
#tgpt-logo-launcher,
#tgpt-launcher img{
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

#tgpt-launcher .tgpt-launcher-text{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

#tgpt-launcher .tgpt-launcher-text strong{
  font-family: "Fjalla One", sans-serif;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.04em;
}

#tgpt-launcher .tgpt-launcher-text span{
  font-family: "Open Sans", sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.78);
  text-transform: none;
  letter-spacing: 0.01em;
}

/* ---------- PANEL ---------- */
#tgpt-panel{
  position: fixed;
  bottom: 110px;
  right: 20px;

  width: 356px;
  height: 600px;
  max-height: 72vh;

  background:
    radial-gradient(130% 95% at 10% -8%, rgba(0, 188, 212, 0.19), transparent 58%),
    radial-gradient(120% 85% at 98% 0%, rgba(81, 164, 106, 0.10), transparent 62%),
    linear-gradient(160deg, rgba(6, 13, 20, 0.95), rgba(4, 10, 16, 0.93));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border-radius: 24px;
  border: 1px solid rgba(116, 219, 214, 0.20);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.95),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 34px rgba(0, 188, 212, 0.14);

  display: none;
  flex-direction: column;

  z-index: 10001;
  overflow: hidden;
  isolation: isolate;
  font-family: "Open Sans", sans-serif;

  transform-origin: bottom right;
  animation: siTGPTPanelPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#tgpt-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 0%, rgba(255, 177, 103, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 24%);
  z-index: 0;
}

/* force flex when JS opens panel with inline display:block */
#tgpt-panel[style*="display: block"]{
  display: flex !important;
}

@keyframes siTGPTPanelPop{
  0%{
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100%{
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---------- PANEL HEADER ---------- */
#tgpt-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 13px;
  background:
    linear-gradient(120deg, rgba(0, 188, 212, 0.18), rgba(80, 175, 115, 0.10) 46%, rgba(255, 149, 81, 0.14));
  border-bottom: 1px solid rgba(255,255,255,0.10);
  position: relative;
  z-index: 1;
}

#tgpt-header .left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* header avatar */
#tgpt-logo-header,
#tgpt-panel img#tgpt-logo-header{
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

#tgpt-header .title{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

#tgpt-header .title strong{
  font-family: "Fjalla One", sans-serif;
  font-size: 0.94rem;
  color: #ffffff;
  letter-spacing: 0.045em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.42);
}

#tgpt-header .title span{
  font-family: "Open Sans", sans-serif;
  font-size: 0.715rem;
  color: rgba(218, 245, 244, 0.80);
  letter-spacing: 0.01em;
}

#tgpt-close{
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.84;
  transition: opacity .16s ease, transform .16s ease;
}

#tgpt-close:hover{
  opacity: 1;
  transform: scale(1.06);
}

#tgpt-voice-btn{
  border: 1px solid rgba(150, 235, 229, 0.34);
  background: rgba(0, 188, 212, 0.14);
  color: #e9ffff;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.74rem;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

#tgpt-voice-btn:hover{
  background: rgba(0, 188, 212, 0.22);
  border-color: rgba(178, 244, 241, 0.54);
}

#tgpt-voice-btn:focus-visible{
  outline: 2px solid rgba(255, 195, 132, 0.64);
  outline-offset: 1px;
}

/* ---------- MESSAGES ---------- */
#tgpt-messages{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008) 28%, rgba(255,255,255,0.01));
  position: relative;
  z-index: 1;
}

#tgpt-messages::-webkit-scrollbar{
  width: 8px;
}

#tgpt-messages::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
}

.tgpt-msg{
  max-width: 88%;
  padding: 10px 12px 10px;
  border-radius: 15px;
  font-size: 0.92rem;
  line-height: 1.42;
  white-space: pre-line;
  word-break: break-word;
  box-shadow: 0 8px 18px rgba(0,0,0,0.20);
}

.tgpt-msg p{
  margin: 0 0 0.45rem;
}

.tgpt-msg p:last-child{
  margin-bottom: 0;
}

.tgpt-user{
  align-self: flex-end;
  background: linear-gradient(140deg, #42d3e8, #14b8d4 55%, #2aa3c4);
  color: #062028;
  font-weight: 600;
  border-bottom-right-radius: 6px;
}

.tgpt-bot{
  align-self: flex-start;
  background: linear-gradient(150deg, rgba(255,255,255,0.11), rgba(255,255,255,0.07));
  color: rgba(245,255,255,0.96);
  border: 1px solid rgba(152, 232, 227, 0.12);
  border-bottom-left-radius: 6px;
}

.tgpt-typing{
  opacity: 0.78;
  font-style: italic;
}

.tgpt-legal-note{
  font-size: 0.75rem;
  line-height: 1.34;
  opacity: 0.76;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 8px;
  margin-top: 4px;
}

.tgpt-smart-cta{
  align-self: stretch;
  max-width: 100%;
  padding: 12px 12px 11px;
  border-radius: 14px;
  background:
    linear-gradient(140deg, rgba(17, 115, 126, 0.26), rgba(29, 64, 84, 0.38) 52%, rgba(29, 60, 42, 0.32));
  border: 1px solid rgba(136, 228, 224, 0.26);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}

.tgpt-smart-cta-text{
  margin: 0 0 9px;
  font-size: 0.83rem;
  line-height: 1.35;
  color: rgba(240, 255, 255, 0.95);
}

.tgpt-smart-cta-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 223, 178, 0.55);
  background: linear-gradient(135deg, #ffc46e, #ff9f57);
  color: #1d1508;
  font-family: "Fjalla One", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.tgpt-smart-cta-btn:hover{
  filter: brightness(1.05);
}

/* ---------- INPUT ROW ---------- */
#tgpt-input-row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0.34));
  position: relative;
  z-index: 1;
}

#tgpt-input{
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(155, 231, 226, 0.20);
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  font-family: "Open Sans", sans-serif;
  font-size: 0.92rem;
  outline: none;
}

#tgpt-input::placeholder{
  color: rgba(255,255,255,0.52);
}

#tgpt-input:focus{
  border-color: rgba(114, 216, 216, 0.54);
  box-shadow: 0 0 0 1px rgba(74, 181, 196, 0.20);
}

#tgpt-send{
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,149,81,0.28);
  background: linear-gradient(135deg, #ff9f5a, #ffd28a);
  color: #1a1307;
  font-family: "Fjalla One", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  flex: 0 0 auto;
}

#tgpt-send:hover{
  filter: brightness(1.05);
}

#tgpt-idle-nudge{
  position: fixed;
  right: 18px;
  bottom: 176px;
  width: min(340px, calc(100vw - 28px));
  z-index: 10000;
  border-radius: 16px;
  border: 1px solid rgba(134, 226, 222, 0.32);
  background:
    radial-gradient(120% 110% at 5% -12%, rgba(0, 188, 212, 0.18), transparent 58%),
    linear-gradient(165deg, rgba(7, 16, 23, 0.97), rgba(4, 11, 17, 0.95));
  box-shadow:
    0 18px 34px rgba(0,0,0,0.62),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 12px 44px 12px 12px;
  color: rgba(240, 255, 255, 0.94);
}

.tgpt-idle-nudge-text{
  font-size: 0.84rem;
  line-height: 1.38;
}

.tgpt-idle-nudge-actions{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tgpt-idle-nudge-actions button,
.tgpt-idle-nudge-actions a{
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #f4ffff;
  padding: 0 11px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tgpt-idle-nudge-actions button:hover,
.tgpt-idle-nudge-actions a:hover{
  background: rgba(255,255,255,0.14);
}

#tgpt-idle-full-btn{
  border-color: rgba(255, 196, 110, 0.55);
  background: linear-gradient(135deg, #ffc36d, #ffa35a);
  color: #1f1307;
  font-family: "Fjalla One", sans-serif;
  letter-spacing: 0.03em;
}

#tgpt-idle-close-btn{
  position: absolute;
  top: 8px;
  right: 9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #eafcff;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#tgpt-idle-close-btn:hover{
  background: rgba(255,255,255,0.16);
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px){
  #tgpt-launcher{
    position: fixed;
    z-index: 9999;

    width: 50px;
    height: 50px;
    min-width: 50px;
    padding: 0;

    border-radius: 50%;

    bottom: 120px;
    right: 16px;

    gap: 0;
    overflow: hidden;

    background: rgba(4, 8, 16, 0.95);
    border: 1px solid rgba(0, 188, 212, 0.4);
    box-shadow:
      0 10px 24px rgba(0,0,0,0.65),
      0 0 12px rgba(0, 188, 212, 0.2);
  }

  #tgpt-launcher .tgpt-launcher-text,
  #tgpt-launcher span{
    display: none;
  }

  #tgpt-logo-launcher,
  #tgpt-launcher img{
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    object-fit: cover;
  }
}

/* ---------- PANEL MOBILE ---------- */
@media (max-width: 600px){
  #tgpt-panel{
    width: auto;
    right: 10px;
    left: 10px;
    bottom: 104px;
    height: auto;
    max-height: 64vh;
    border-radius: 20px;
  }

  #tgpt-header{
    padding: 10px 12px;
  }

  #tgpt-messages{
    padding: 10px;
    gap: 8px;
  }

  .tgpt-msg{
    max-width: 94%;
    padding: 9px 10px;
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .tgpt-smart-cta{
    padding: 10px 10px 10px;
  }

  .tgpt-smart-cta-text{
    font-size: 0.8rem;
  }

  .tgpt-smart-cta-btn{
    width: 100%;
    font-size: 0.72rem;
    padding: 9px 10px;
  }

  #tgpt-input-row{
    padding: 10px;
    gap: 6px;
  }

  #tgpt-input{
    height: 40px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  #tgpt-send{
    height: 40px;
    padding: 0 14px;
    font-size: 0.78rem;
  }

  #tgpt-voice-btn{
    height: 28px;
    padding: 0 9px;
    font-size: 0.7rem;
  }

  #tgpt-idle-nudge{
    left: 10px;
    right: 10px;
    bottom: 168px;
    width: auto;
    padding-right: 36px;
  }

  .tgpt-idle-nudge-actions{
    gap: 6px;
  }

  .tgpt-idle-nudge-actions button,
  .tgpt-idle-nudge-actions a{
    flex: 1 1 100%;
    width: 100%;
    min-height: 34px;
    font-size: 0.74rem;
  }
}

/* Reviewed index-only compatibility adjustments. Geometry exceptions override
   the unchanged widget's inline writes; scope is this candidate document. */
body.summer-index #tgpt-header {flex-wrap:wrap;gap:8px;}
body.summer-index #tgpt-header .right {margin-left:auto;flex-wrap:wrap;}
body.summer-index #tgpt-close {width:44px;min-width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;}
body.summer-index #tgpt-voice-btn,body.summer-index #tgpt-smart-intro-reopen {min-height:40px;}
body.summer-index #tgpt-input {font-size:16px;}
body.summer-index #tgpt-send {min-height:44px;}
body.summer-index #tgpt-mic-btn {flex:0 0 44px;cursor:pointer;}
body.summer-index #tgpt-panel button:focus-visible,body.summer-index #tgpt-launcher:focus-visible,body.summer-index #tgpt-smart-intro-overlay button:focus-visible {outline:3px solid #F5D21F;outline-offset:2px;}
body.summer-index #tgpt-input::placeholder {color:rgba(255,255,255,.72);}
body.summer-index #tgpt-panel .tgpt-legal-note {opacity:1;color:#e5dfcf;}
body.summer-index.summer-guide-open #tgpt-launcher {visibility:hidden;pointer-events:none;}
body.summer-index:has(#summerAppShell dialog[open]) #tgpt-panel,body.summer-index:has(#summerAppShell dialog[open]) #tgpt-launcher,body.summer-index:has(#summerAppShell dialog[open]) #tgpt-idle-nudge,body.summer-index:has(#summerAppShell dialog[open]) #tgpt-smart-intro-overlay {visibility:hidden;pointer-events:none;}
@media(max-width:920px) {
 body.summer-index #tgpt-panel {top:calc(var(--si-viewport-top,0px) + 8px)!important;bottom:auto!important;height:min(640px,calc(var(--si-viewport-height,100dvh) - 16px));max-height:calc(var(--si-viewport-height,100dvh) - 16px)!important;border-radius:20px;animation:none;}
 body.summer-index #tgpt-header {padding:8px 10px;}
 body.summer-index #tgpt-input-row {padding:8px;}
 body.summer-index #tgpt-messages {padding:10px;}
}
@media(max-width:820px) {
 body.summer-index #tgpt-launcher {bottom:calc(94px + env(safe-area-inset-bottom))!important;}
 body.summer-index #tgpt-idle-nudge {bottom:calc(162px + env(safe-area-inset-bottom));}
}
@media(prefers-reduced-motion:reduce) {
 body.summer-index #tgpt-panel,body.summer-index #tgpt-launcher,body.summer-index #tgpt-panel * {animation:none!important;transition:none!important;}
 body.summer-index #tgpt-launcher:hover {transform:none;}
}
body.summer-index:has(#summerAppShell.motion-reduced) #tgpt-panel,body.summer-index:has(#summerAppShell.motion-reduced) #tgpt-launcher {animation:none!important;transition:none!important;}

/* R1.1 — internal response CTA; palette and existing controls stay unchanged. */
body.summer-index #tgpt-panel .tgpt-response-cta { display:block; margin-top:10px; max-width:100%; box-sizing:border-box; white-space:normal; text-align:center; }
