/* PostThisDeal Shopping Assistant: orange-and-navy chat bubble and panel. */
.ptda, .ptda-open {
	--a-navy: #10203F;
	--a-orange: #FF6600;
	--a-orange-dark: #E25A00;
	--a-orange-soft: #FFF3EB;
	--a-pink: #FF365B;
	--a-bg: #F8FAFC;
	--a-text: #10203F;
	--a-muted: #5B6577;
	--a-border: #E6E9F0;
}
.ptda, .ptda *, .ptda *::before, .ptda *::after { box-sizing: border-box; }
.ptda { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 99990; font-family: var(--ptd-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); color: var(--a-text); font-size: 15px; line-height: 1.4; }

.ptda__bubble { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--a-orange); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(255, 102, 0, .35), 0 2px 6px rgba(16, 32, 63, .2); }
.ptda__bubble:hover { background: var(--a-orange-dark); }
.ptda__bubble:focus-visible, .ptda button:focus-visible, .ptda a:focus-visible, .ptda input:focus-visible, .ptda textarea:focus-visible, .ptda-open:focus-visible { outline: 3px solid rgba(255, 102, 0, .45); outline-offset: 2px; }
.ptda__bubble-i { font-size: 20px; }
.ptda.is-open .ptda__bubble-t { display: none; }
.ptda.is-open .ptda__bubble { padding: 0 16px; }

.ptda__panel { position: absolute; right: 0; bottom: 64px; width: 380px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(16, 32, 63, .28); border: 1px solid var(--a-border); }
.ptda__panel[hidden] { display: none; }
.ptda__head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--a-navy); color: #fff; }
.ptda__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--a-orange); display: grid; place-items: center; font-size: 18px; flex: none; }
.ptda__who { display: grid; flex: 1; min-width: 0; }
.ptda__who strong { font-size: 15px; }
.ptda__who span { font-size: 12px; opacity: .8; }
.ptda__icon { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.ptda__icon:hover { background: rgba(255, 255, 255, .22); }

.ptda__log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--a-bg); overscroll-behavior: contain; }
.ptda__msg { margin: 0; max-width: 88%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--a-border); white-space: pre-wrap; overflow-wrap: anywhere; }
.ptda__msg--you { align-self: flex-end; background: var(--a-navy); color: #fff; border-color: var(--a-navy); border-radius: 14px 14px 4px 14px; }
.ptda__typing { color: var(--a-muted); font-style: italic; }

.ptda__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ptda__chip { min-height: 36px; padding: 6px 12px; border: 1.5px solid var(--a-orange); border-radius: 999px; background: #fff; color: #C2410C; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ptda__chip:hover { background: var(--a-orange); color: #fff; }

.ptda__deals ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ptda__deal { display: flex; gap: 10px; padding: 10px; background: #fff; border: 1px solid var(--a-border); border-radius: 12px; color: var(--a-text); text-decoration: none; }
.ptda__deal:hover { border-color: var(--a-orange); box-shadow: 0 2px 10px rgba(16, 32, 63, .08); }
.ptda__deal img, .ptda__noimg { width: 64px; height: 64px; flex: none; border-radius: 8px; object-fit: contain; background: #fff; }
.ptda__noimg { display: grid; place-items: center; background: var(--a-orange-soft); font-size: 24px; }
.ptda__deal-b { display: grid; gap: 2px; min-width: 0; }
.ptda__deal-t { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptda__deal-m, .ptda__deal-n { font-size: 12px; color: var(--a-muted); }
.ptda__deal-w { font-size: 13px; color: #3B4A66; font-style: italic; }
.ptda__deal-p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 14px; }
.ptda__deal-p strong { color: var(--a-navy); font-size: 15px; }
.ptda__deal-p s { color: var(--a-muted); font-size: 13px; }
.ptda__deal-p em { font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--a-pink); border-radius: 6px; padding: 1px 6px; }
.ptda__deal-p em.ptda__code { background: var(--a-navy); }
.ptda__deal-go { font-size: 13px; font-weight: 800; color: var(--a-pink); }
.ptda__foot { margin: 6px 2px 0; font-size: 12px; color: var(--a-muted); }

.ptda__sources { display: grid; gap: 6px; }
.ptda__source { display: grid; gap: 2px; padding: 9px 12px; background: #fff; border: 1px solid var(--a-border); border-left: 3px solid var(--a-orange); border-radius: 10px; color: var(--a-text); text-decoration: none; font-size: 14px; }
.ptda__source span { color: var(--a-muted); font-size: 13px; }
.ptda__source:hover { border-color: var(--a-orange); }

.ptda__handoff { display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--a-border); border-radius: 12px; }
.ptda__handoff input, .ptda__handoff textarea { width: 100%; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; font-size: 16px; color: var(--a-text); background: #fff; }
.ptda__team { min-height: 44px; border: 0; border-radius: 999px; background: var(--a-orange); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.ptda__team:disabled { opacity: .6; cursor: progress; }
.ptda__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ptda__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--a-border); background: #fff; }
.ptda__input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid #CBD5E1; border-radius: 999px; font: inherit; font-size: 16px; color: var(--a-text); background: #fff; }
.ptda__input:focus { outline: none; border-color: var(--a-orange); box-shadow: 0 0 0 3px rgba(255, 102, 0, .18); }
.ptda__send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--a-orange); color: #fff; font-size: 18px; cursor: pointer; }

.ptda-open { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--a-orange); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }

/* Phones: a compact bubble, and the chat takes the whole screen. */
@media (max-width: 640px) {
	.ptda { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
	.ptda__bubble { min-height: 48px; padding: 0 14px 0 12px; font-size: 14px; }
	.ptda__panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
	.ptda.is-open .ptda__bubble { display: none; }
}
@media print { .ptda { display: none; } }
