.tp-live-chat{position:fixed;right:18px;bottom:18px;z-index:9998;font-family:inherit;color:#17201b}.tp-chat-launcher{min-height:52px;border:0;border-radius:999px;background:#173b2b;color:#fff;padding:0 18px 0 14px;display:flex;align-items:center;gap:9px;box-shadow:0 16px 40px rgba(17,42,30,.25);cursor:pointer;font:inherit;font-weight:700}.tp-chat-launcher-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.14)}.tp-chat-unread{min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#e65050;color:#fff;display:grid;place-items:center;font-size:11px}.tp-chat-panel{position:absolute;right:0;bottom:64px;width:min(380px,calc(100vw - 28px));height:min(590px,calc(100vh - 110px));background:#fff;border:1px solid rgba(20,55,39,.12);border-radius:20px;box-shadow:0 24px 70px rgba(17,42,30,.26);overflow:hidden;grid-template-rows:auto 1fr auto auto}.tp-chat-panel:not([hidden]){display:grid}.tp-chat-header{padding:14px 15px;background:#173b2b;color:#fff;display:flex;align-items:center;gap:10px}.tp-chat-header>div:nth-child(2){min-width:0;display:grid;gap:2px}.tp-chat-header strong{font-size:14px}.tp-chat-avatar{width:36px;height:36px;border-radius:50%;background:#fff;color:#173b2b;display:grid;place-items:center;font-weight:900}.tp-chat-presence{display:flex;align-items:center;gap:6px;font-size:11px;opacity:.82}.tp-chat-presence i{width:7px;height:7px;border-radius:50%;background:#9aa6a0}.tp-chat-presence i.is-online{background:#63d993;box-shadow:0 0 0 3px rgba(99,217,147,.14)}.tp-chat-close{margin-left:auto;border:0;background:transparent;color:#fff;font-size:24px;cursor:pointer;width:34px;height:34px;border-radius:50%}.tp-chat-messages{overflow:auto;padding:16px;background:#f7faf8;display:flex;flex-direction:column;gap:10px}.tp-chat-welcome{align-self:center;text-align:center;color:#66736c;display:grid;gap:4px;padding:10px 18px;font-size:12px}.tp-chat-message{max-width:82%;display:grid;gap:3px}.tp-chat-message.is-visitor{align-self:flex-end}.tp-chat-message.is-admin{align-self:flex-start}.tp-chat-bubble{padding:10px 12px;border-radius:15px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.45}.tp-chat-message.is-visitor .tp-chat-bubble{background:#173b2b;color:#fff;border-bottom-right-radius:5px}.tp-chat-message.is-admin .tp-chat-bubble{background:#fff;border:1px solid #e1e8e4;color:#24342c;border-bottom-left-radius:5px}.tp-chat-meta{font-size:10px;color:#829087;padding:0 4px}.tp-chat-message.is-visitor .tp-chat-meta{text-align:right}.tp-chat-typing{padding:6px 16px 0;background:#f7faf8;color:#738078;font-size:11px;font-style:italic}.tp-chat-compose{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px;border-top:1px solid #edf1ef;background:#fff;align-items:end}.tp-chat-compose textarea{resize:none;max-height:100px;min-height:42px;border:1px solid #d8e1dc;border-radius:12px;padding:10px 11px;font:inherit;font-size:13px;line-height:1.35;outline:none}.tp-chat-compose button{height:42px;border:0;border-radius:11px;background:#173b2b;color:#fff;padding:0 14px;font:inherit;font-weight:700;cursor:pointer}.tp-chat-error{padding:0 12px 10px;background:#fff;color:#a33c3c;font-size:11px}.tp-chat-nudge{position:absolute;right:0;bottom:66px;width:285px;background:#fff;border:1px solid #e1e7e3;border-radius:14px;box-shadow:0 14px 40px rgba(20,48,34,.18);padding:13px 34px 13px 14px;cursor:pointer;display:grid;gap:3px}.tp-chat-nudge strong{font-size:12px;color:#173b2b}.tp-chat-nudge span{font-size:12px;color:#526158;line-height:1.4}.tp-chat-nudge button{position:absolute;right:8px;top:7px;border:0;background:transparent;font-size:18px;color:#87928c;cursor:pointer}@media(max-width:640px){
  .tp-live-chat{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}
  .tp-chat-launcher{min-height:50px;padding-right:14px}
  .tp-chat-launcher-label{display:none}
  .tp-chat-panel{
    position:fixed;
    left:auto;
    right:max(10px,env(safe-area-inset-right));
    bottom:var(--tp-chat-mobile-bottom,max(10px,env(safe-area-inset-bottom)));
    width:min(88vw,350px);
    height:min(600px,calc(100dvh - 28px));
    max-height:calc(100dvh - 28px);
    border-radius:17px;
    transition:height .18s ease,bottom .18s ease;
    overscroll-behavior:contain
  }
  .tp-chat-panel.is-keyboard-open{
    width:min(90vw,350px);
    height:var(--tp-chat-mobile-height,calc(100dvh - 16px));
    max-height:var(--tp-chat-mobile-height,calc(100dvh - 16px));
    bottom:var(--tp-chat-mobile-bottom,8px);
    transition:none
  }
  .tp-chat-messages{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .tp-chat-compose{position:relative;z-index:2;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .tp-chat-paste-hint{padding-bottom:max(9px,env(safe-area-inset-bottom))}
  .tp-chat-nudge{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:72px;width:min(280px,calc(100vw - 30px))}
}
@media(max-width:380px){
  .tp-chat-panel{width:min(86vw,320px)}
  .tp-chat-panel.is-keyboard-open{width:min(88vw,320px)}
}

.tp-chat-compose{grid-template-columns:auto 1fr auto}
.tp-chat-image-button{width:42px!important;padding:0!important;border:1px solid #d8e1dc!important;background:#f7faf8!important;color:#173b2b!important;font-size:17px!important}
.tp-chat-image-button:hover{background:#edf4f0!important}
.tp-chat-image-button:disabled{opacity:.5}
.tp-chat-image-preview{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 12px;background:#fff;border-top:1px solid #edf1ef}
.tp-chat-image-preview[hidden]{display:none!important}
.tp-chat-image-preview img{width:48px;height:48px;object-fit:cover;border-radius:9px;border:1px solid #e0e7e3}
.tp-chat-image-preview span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#5e6c64}
.tp-chat-image-preview button{border:0;background:transparent;color:#87928c;font-size:20px;cursor:pointer}
.tp-chat-image-message{display:block;max-width:250px;border-radius:14px;overflow:hidden;border:1px solid #dfe7e2;background:#fff}
.tp-chat-image-message img{display:block;width:auto;height:auto;max-width:100%;max-height:300px;object-fit:contain}
.tp-chat-message.is-visitor .tp-chat-image-message{margin-left:auto}
@media(max-width:640px){
  .tp-chat-image-message{max-width:min(250px,72vw)}
}

.tp-chat-paste-hint{padding:0 13px 9px;background:#fff;color:#849089;font-size:10px}
.tp-chat-paste-hint kbd{display:inline-block;min-width:18px;padding:1px 4px;border:1px solid #d9e0dc;border-bottom-width:2px;border-radius:4px;background:#f7f9f8;color:#526158;font:inherit;font-size:9px;text-align:center}




/* V1.8 — first Admin message visual alert.
   Runs only while .is-first-admin-alert is present; JS removes that class
   immediately when the visitor opens/sees the chat. */
@keyframes tp-first-admin-launcher-attention{
  0%,18%,100%{
    transform:translateX(0) scale(1);
    box-shadow:0 16px 40px rgba(17,42,30,.25);
  }
  4%{transform:translateX(-3px) scale(1.025)}
  8%{transform:translateX(3px) scale(1.04)}
  12%{transform:translateX(-2px) scale(1.025)}
  16%{transform:translateX(0) scale(1)}
  52%{
    transform:translateX(0) scale(1.035);
    box-shadow:0 0 0 7px rgba(50,170,105,.13),0 17px 42px rgba(17,42,30,.29);
  }
}

@keyframes tp-first-admin-nudge-attention{
  0%,100%{
    transform:translateY(0) scale(1);
    border-color:#e1e7e3;
    box-shadow:0 14px 40px rgba(20,48,34,.18);
    background:#fff;
  }
  50%{
    transform:translateY(-2px) scale(1.018);
    border-color:rgba(45,142,91,.48);
    box-shadow:0 0 0 5px rgba(50,170,105,.10),0 17px 46px rgba(20,48,34,.23);
    background:#fbfffc;
  }
}

@keyframes tp-first-admin-text-glow{
  0%,100%{opacity:1}
  50%{opacity:.68}
}

.tp-live-chat.is-first-admin-alert .tp-chat-launcher{
  animation:tp-first-admin-launcher-attention 2.4s ease-in-out infinite;
  transform-origin:center;
}

.tp-live-chat.is-first-admin-alert .tp-chat-nudge:not([hidden]){
  animation:tp-first-admin-nudge-attention 1.55s ease-in-out infinite;
}

.tp-live-chat.is-first-admin-alert .tp-chat-nudge:not([hidden]) [data-chat-nudge-text]{
  animation:tp-first-admin-text-glow 1.55s ease-in-out infinite;
}

.tp-live-chat.is-first-admin-alert .tp-chat-unread:not([hidden]){
  box-shadow:0 0 0 4px rgba(230,80,80,.12);
}

@media (prefers-reduced-motion: reduce){
  .tp-live-chat.is-first-admin-alert .tp-chat-launcher,
  .tp-live-chat.is-first-admin-alert .tp-chat-nudge:not([hidden]),
  .tp-live-chat.is-first-admin-alert .tp-chat-nudge:not([hidden]) [data-chat-nudge-text]{
    animation:none;
  }
  .tp-live-chat.is-first-admin-alert .tp-chat-launcher{
    box-shadow:0 0 0 7px rgba(50,170,105,.13),0 16px 40px rgba(17,42,30,.28);
  }
  .tp-live-chat.is-first-admin-alert .tp-chat-nudge:not([hidden]){
    border-color:rgba(45,142,91,.48);
    box-shadow:0 0 0 5px rgba(50,170,105,.10),0 17px 46px rgba(20,48,34,.23);
  }
}


/* V1.10 — reliable mobile close control */
.tp-chat-close{
  position:relative;
  z-index:5;
  flex:0 0 auto;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
@media(max-width:640px){
  .tp-chat-close{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    display:grid;
    place-items:center;
    font-size:26px;
  }
}


/* V1.11 — hard close state */
.tp-live-chat.tp-chat-force-closed .tp-chat-panel{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.tp-live-chat.tp-chat-force-closed .tp-chat-launcher{
  display:flex!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

.tp-chat-header{position:relative}
.tp-chat-close{
  position:absolute!important;
  top:4px!important;
  right:4px!important;
  z-index:2147483647!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
}
@media(max-width:640px){
  .tp-chat-close{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
  }
}


/* V1.12 — the small message/nudge card must obey hidden on all browsers. */
.tp-chat-nudge[hidden]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.tp-chat-nudge:not([hidden]){
  display:grid;
}
.tp-chat-nudge [data-chat-nudge-close]{
  z-index:10;
  pointer-events:auto!important;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
