/* GoodGreet live chat widget. */
.gg-chat{position:fixed;right:20px;bottom:20px;z-index:80;font-family:'Hanken Grotesk',system-ui,sans-serif}
.gg-chat *{box-sizing:border-box}

/* Launcher bubble — contrast adapts to the section behind it (set by JS). */
.gg-launch{display:flex;align-items:center;gap:10px;border:none;cursor:pointer;
  background:var(--blue,#172a8e);color:#fff;border-radius:30px;padding:13px 18px 13px 15px;
  box-shadow:0 12px 30px rgba(14,28,94,.32);font-weight:700;font-size:15px;transition:transform .14s,box-shadow .14s,background .2s,color .2s}
.gg-launch.on-dark{background:#2cd17e;color:#06351f}
.gg-launch.on-dark svg{stroke:#06351f}
.gg-launch.on-light{background:var(--blue,#172a8e);color:#fff}
.gg-launch.on-light svg{stroke:#fff}
.gg-launch:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(14,28,94,.4)}
.gg-launch svg{width:22px;height:22px}
.gg-launch .gg-badge{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;border-radius:10px;
  background:#2cd17e;color:#06351f;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 5px}
.gg-launch[hidden]{display:none}

/* Panel */
.gg-panel{position:absolute;right:0;bottom:0;width:360px;max-width:calc(100vw - 32px);
  height:520px;max-height:calc(100vh - 40px);background:#fff;border-radius:16px;overflow:hidden;
  box-shadow:0 24px 60px rgba(10,16,50,.34);display:flex;flex-direction:column;
  transform:translateY(12px) scale(.98);opacity:0;pointer-events:none;transition:transform .18s,opacity .18s;transform-origin:bottom right}
.gg-panel.open{transform:none;opacity:1;pointer-events:auto}

.gg-head{background:var(--blue,#172a8e);color:#fff;padding:16px 18px;display:flex;align-items:center;gap:12px}
.gg-cluster{display:flex;align-items:center;flex:0 0 auto}
.gg-cluster .gg-th{width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid var(--blue,#172a8e);background:#dfe4f3;margin-left:-10px}
.gg-cluster .gg-th:first-child{margin-left:0}
.gg-head-txt{min-width:0}
.gg-head .gg-h-t{font-weight:800;font-size:16px;line-height:1.1}
.gg-head .gg-h-s{font-size:12px;color:#c5ccf0;margin-top:3px;display:flex;align-items:center;gap:6px}
.gg-head .gg-dot{width:8px;height:8px;border-radius:50%;background:#2cd17e}
.gg-head .gg-close{margin-left:auto;background:none;border:none;color:#c5ccf0;cursor:pointer;font-size:22px;line-height:1;padding:4px}
.gg-head .gg-close:hover{color:#fff}

.gg-body{flex:1;overflow-y:auto;padding:18px 16px;background:#f4f6fb;display:flex;flex-direction:column;gap:10px}
.gg-row{display:flex;align-items:flex-end;gap:7px;max-width:88%}
.gg-row.visitor{align-self:flex-end}
.gg-row.agent{align-self:flex-start}
.gg-msg-av{width:26px;height:26px;border-radius:50%;flex:0 0 auto;background:#dfe4f3}
.gg-msg{padding:10px 13px;border-radius:14px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.gg-msg.agent{background:#fff;color:#1a1d29;border:1px solid #e4e8f4;border-bottom-left-radius:5px}
.gg-msg.visitor{background:var(--blue,#172a8e);color:#fff;border-bottom-right-radius:5px}
.gg-msg .gg-at{display:block;font-size:10.5px;opacity:.6;margin-top:4px}
.gg-head .gg-av img{width:40px;height:40px;border-radius:50%;object-fit:cover;display:block}

.gg-foot{border-top:1px solid #e9ecf5;padding:10px;background:#fff;display:flex;gap:8px;align-items:flex-end}
.gg-foot textarea{flex:1;border:1px solid #d4d9ea;border-radius:12px;padding:10px 12px;font-family:inherit;font-size:14.5px;resize:none;max-height:110px;line-height:1.4}
.gg-foot textarea:focus{outline:none;border-color:var(--blue-bright,#2540c6);box-shadow:0 0 0 3px rgba(37,64,198,.14)}
.gg-foot .gg-send{border:none;background:var(--blue,#172a8e);color:#fff;border-radius:12px;width:42px;height:42px;flex:0 0 auto;cursor:pointer;display:flex;align-items:center;justify-content:center}
.gg-foot .gg-send:hover{background:var(--blue-bright,#2540c6)}
.gg-foot .gg-send:disabled{opacity:.5;cursor:default}
.gg-foot .gg-send svg{width:19px;height:19px}

@media (max-width:560px){
  .gg-chat{right:12px;bottom:12px;left:12px}
  .gg-launch{margin-left:auto}
  .gg-panel{position:fixed;right:12px;left:12px;bottom:12px;width:auto;max-width:none;
    height:80vh;height:80dvh;max-height:calc(100dvh - 24px)}
  .gg-launch span:not(.gg-badge){display:none}
  .gg-launch{padding:14px;border-radius:50%}
}
@media (prefers-reduced-motion: reduce){
  .gg-launch,.gg-panel{transition:none}
}
