/* Store assistant chat window (assets/js/chat.js). Colours follow the theme tokens. */
.pg-chat { position: fixed; right: 22px; bottom: 94px; z-index: 120; display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 130px)); height: min(600px, calc(100dvh - 130px)); overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--bg); box-shadow: 0 30px 70px -24px rgba(1, 40, 18, .45); opacity: 0; transform: translateY(14px) scale(.98); transform-origin: 100% 100%; transition: opacity .25s var(--ease), transform .3s var(--ease); }
.pg-chat[hidden] { display: none; }
.pg-chat.pg-is-open { opacity: 1; transform: none; }

.pg-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, #032b14, #0b4a26); color: #fff; }
.pg-chat-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 255, 255, .14); }
.pg-chat-avatar .elementor-wp-gems-icon { stroke: #ffc2d1; }
.pg-chat-title { flex: 1; min-width: 0; display: grid; }
.pg-chat-title strong { font: 600 15.5px var(--head); }
.pg-chat-title span { font-size: 12px; color: rgba(255, 255, 255, .75); }
.pg-chat-wa, .pg-chat-close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s; }
.pg-chat-wa { background: #25d366; }
.pg-chat-wa:hover { background: #1fb457; }
.pg-chat-close:hover { background: rgba(255, 255, 255, .24); }
.pg-chat-wa .elementor-wp-gems-icon, .pg-chat-close .elementor-wp-gems-icon { stroke: currentColor; }

.pg-chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.pg-chat-msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.pg-chat-me { align-self: flex-end; align-items: flex-end; }
.pg-chat-bubble { padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; }
.pg-chat-bubble p { margin: 0; }
.pg-chat-bubble p + p { margin-top: 6px; }
.pg-chat-bot .pg-chat-bubble { border: 1px solid var(--line); border-bottom-left-radius: 6px; background: #fff; color: var(--text); }
.pg-chat-me .pg-chat-bubble { border-bottom-right-radius: 6px; background: var(--emerald); color: #fff; }

.pg-chat-products { display: grid; gap: 8px; }
.pg-chat-product { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s, transform .2s; }
.pg-chat-product:hover { border-color: var(--gold); transform: translateX(2px); }
.pg-chat-product img { flex: none; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.pg-chat-product-text { min-width: 0; display: grid; font-size: 13px; }
.pg-chat-product-text strong { overflow: hidden; color: var(--emerald); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pg-chat-product-text span { color: var(--gold-text); font-weight: 600; }

.pg-chat-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chat-link { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--emerald); font-size: 13px; font-weight: 600; }
.pg-chat-link:hover { border-color: var(--emerald); }
.pg-chat-link-wa { border-color: #25d366; background: #25d366; color: #fff; }
.pg-chat-link-wa:hover { border-color: #1fb457; background: #1fb457; color: #fff; }

.pg-chat-typing .pg-chat-bubble { display: flex; gap: 4px; padding: 14px 16px; }
.pg-chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pgChatDot 1s infinite ease-in-out; }
.pg-chat-typing i:nth-child(2) { animation-delay: .15s; }
.pg-chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pgChatDot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.pg-chat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.pg-chat-chips::-webkit-scrollbar { display: none; }
.pg-chat-chips:empty { display: none; }
.pg-chat-chips button { flex: none; padding: 7px 12px; border: 1px solid var(--gold); border-radius: 999px; background: #fff; color: var(--gold-text); font: 600 12.5px var(--body); cursor: pointer; transition: background .2s, color .2s; }
.pg-chat-chips button:hover { background: var(--gold); color: #fff; }

.pg-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.pg-chat-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 14.5px; }
.pg-chat-form input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214, 51, 108, .14); }
.pg-chat-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--emerald); color: #fff; cursor: pointer; }
.pg-chat-send .elementor-wp-gems-icon { stroke: currentColor; }
.pg-chat-note { margin: 0; padding: 0 16px 10px; background: #fff; font-size: 11.5px; color: var(--muted); text-align: center; }

/* The launcher turns into a close button while the chat is open. */
.elementor-wp-gems-whatsapp-float.pg-chat-launcher-open { background: var(--emerald); box-shadow: 0 14px 34px -8px rgba(1, 65, 28, .55); }

@media (max-width: 599px) {
	.pg-chat { right: 8px; left: 8px; bottom: 86px; width: auto; height: calc(100dvh - 160px); border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.pg-chat { transition: none; }
	.pg-chat-typing i { animation: none; }
}

/* Greeting next to the chat button (shown once per visit) */
.pg-chat-hint { position: fixed; right: 92px; bottom: 30px; z-index: 91; display: grid; gap: 2px; max-width: 230px; padding: 12px 34px 12px 16px; border: 1px solid var(--line); border-radius: 18px 18px 4px 18px; background: #fff; box-shadow: 0 18px 40px -18px rgba(1, 40, 18, .45); color: var(--text); font: 500 13px/1.4 var(--body); text-align: left; cursor: pointer; opacity: 0; transform: translateX(10px); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.pg-chat-hint[hidden] { display: none; }
.pg-chat-hint.pg-is-open { opacity: 1; transform: none; }
.pg-chat-hint strong { font: 600 14px var(--head); color: var(--emerald); }
.pg-chat-hint span { color: var(--muted); }
.pg-chat-hint .pg-chat-hint-x { position: absolute; top: 6px; right: 10px; font-size: 18px; line-height: 1; color: var(--muted); }
@media (max-width: 599px) { .pg-chat-hint { right: 86px; bottom: 26px; max-width: calc(100vw - 110px); } }
@media (prefers-reduced-motion: reduce) { .pg-chat-hint { transition: none; } }
