/* Phayre's Woods Concierge · the website chat, inside the site's own chat panel (.pws-chat).
   Same colours and type as the panel: forest header, ivory body, white bubbles, brand green. */

.pws-chat .pwc-go { width: 100%; font: inherit; text-align: left; cursor: pointer; border-color: var(--brand, #2C6553); }
.pws-chat .pwc-go .pwc-i { background: var(--brand, #2C6553); }
body .pws-chat .pwc-go:hover, body .pws-chat .pwc-go:focus { background: #FFFFFF; color: #17211C; }
/* Long words never leave the box: the text column may shrink and wrap (some themes set nowrap on buttons). */
.pws-chat .pwc-go > span:last-child { flex: 1 1 auto; min-width: 0; }
.pws-chat .pwc-go b, .pws-chat .pwc-go small { white-space: normal; overflow-wrap: anywhere; }
/* The header line under "Phayre's Woods" stays inside the header: at most two lines. */
.pws-chat .chat-h small { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.pws-chat .chat-h small[hidden] { display: none; }

.pws-chat.pwc-on .chat-panel { width: 380px; height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column; }
.pws-chat.pwc-on .chat-panel[hidden] { display: none; }
.pws-chat .pwc-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: #F2F1EB; }
.pws-chat .pwc-view[hidden] { display: none; }
.pws-chat .chat-b[hidden] { display: none; }
.pws-chat.pwc-on.open { z-index: 9990; }
.pwc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pws-chat .pwc-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 8px 8px 0; padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; color: #53605A; font: 500 13px/1 var(--sans); cursor: pointer; }
.pws-chat .pwc-back[hidden] { display: none; }
body .pws-chat .pwc-back:hover, body .pws-chat .pwc-back:focus { background: rgba(23, 51, 38, .08); color: #17211C; }

.pws-chat .pwc-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.pws-chat .pwc-m { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.pws-chat .pwc-m.me { align-self: flex-end; align-items: flex-end; }
.pws-chat .pwc-b { padding: 9px 13px; background: #FFFFFF; border: 1px solid #E6E6DD; border-radius: 4px 14px 14px 14px; color: #17211C; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.pws-chat .pwc-m.me .pwc-b { background: var(--brand, #2C6553); border-color: transparent; color: #FFFFFF; border-radius: 14px 4px 14px 14px; }
.pws-chat .pwc-m.team .pwc-b { border-color: var(--brand, #2C6553); }
.pws-chat .pwc-b a { color: inherit; text-decoration: underline; }
.pws-chat .pwc-who { font-size: 12px; color: #53605A; margin: 0 0 2px 4px; }
.pws-chat .pwc-m.pending .pwc-b { opacity: .7; }
.pws-chat .pwc-m.failed .pwc-b { opacity: .6; }
.pws-chat .pwc-err { font-size: 12px; color: #B42318; margin-top: 3px; }

.pws-chat .pwc-typing .pwc-b { display: flex; gap: 4px; padding: 13px 14px; }
.pws-chat .pwc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA39D; animation: pwc-dot 1.2s infinite ease-in-out; }
.pws-chat .pwc-typing i:nth-child(2) { animation-delay: .15s; }
.pws-chat .pwc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pwc-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.pws-chat .pwc-cards { display: flex; gap: 8px; overflow-x: auto; max-width: 330px; margin-top: 6px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.pws-chat .pwc-card { flex: 0 0 200px; scroll-snap-align: start; background: #FFFFFF; border: 1px solid #E6E6DD; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.pws-chat .pwc-card img { display: block; width: 100%; height: 120px; object-fit: cover; }
.pws-chat .pwc-card-t { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 4px; }
.pws-chat .pwc-card-t b { font: 600 15px/1.25 var(--sans); }
.pws-chat .pwc-card-t small { font-size: 12.5px; color: #53605A; }
.pws-chat .pwc-card-a { display: flex; flex-direction: column; border-top: 1px solid #EFEFE8; margin-top: 6px; }
.pws-chat .pwc-card-a a, .pws-chat .pwc-card-a button { display: block; padding: 8px 10px; border: 0; border-bottom: 1px solid #EFEFE8; background: transparent; color: var(--brand, #2C6553); font: 600 13.5px/1.2 var(--sans), 'Noto Sans Bengali', sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.pws-chat .pwc-card-a > :last-child { border-bottom: 0; }
body .pws-chat .pwc-card-a a:hover, body .pws-chat .pwc-card-a button:hover, body .pws-chat .pwc-card-a button:focus { background: #F2F8F5; color: var(--brand, #2C6553); }

.pws-chat .pwc-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.pws-chat .pwc-quick[hidden] { display: none; }
.pws-chat .pwc-quick button { padding: 7px 12px; border: 1px solid var(--brand, #2C6553); border-radius: 999px; background: #FFFFFF; color: var(--brand, #2C6553); font: 500 13.5px/1.2 var(--sans); cursor: pointer; }
body .pws-chat .pwc-quick button:hover, body .pws-chat .pwc-quick button:focus { background: var(--brand, #2C6553); color: #FFFFFF; }

.pws-chat .pwc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #FFFFFF; border-top: 1px solid #E6E6DD; }
.pws-chat .pwc-form textarea { flex: 1 1 auto; min-height: 42px; max-height: 120px; padding: 10px 12px; border: 1px solid #D5D7CC; border-radius: 12px; background: #FFFFFF; color: #17211C; font: 400 15px/1.35 var(--sans); resize: none; }
.pws-chat .pwc-form textarea:focus { outline: 2px solid var(--brand, #2C6553); outline-offset: 0; border-color: transparent; }
.pws-chat .pwc-send { flex: none; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--brand, #2C6553); color: #FFFFFF; cursor: pointer; }
body .pws-chat .pwc-send:hover, body .pws-chat .pwc-send:focus { background: var(--brand-hover, #22503F); color: #FFFFFF; }
.pws-chat .pwc-send:disabled { opacity: .5; cursor: default; }
.pws-chat .pwc-foot { margin: 0; padding: 0 12px 8px; background: #FFFFFF; font-size: 11.5px; color: #6B746F; text-align: center; }

/* Phones: the chat takes the whole screen. */
@media (max-width: 600px) {
	.pws-chat.pwc-on.open .chat-panel { position: fixed; inset: 0; width: auto; max-width: none; height: 100dvh; border-radius: 0; }
	.pws-chat.pwc-on.open .chat-btn { display: none; }
	.pws-chat .pwc-cards { max-width: calc(100vw - 48px); }
	.pws-chat .pwc-form { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	.pws-chat .pwc-form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .pws-chat .pwc-typing i { animation: none; } }
@media print { .pwc-view { display: none !important; } }
