/* WhatsApp karşılama asistanı. Tema değişkenleri yoksa kendi koyu paletine düşer. */
.bmg-wa { --wa-bg: var(--panel, #17171a); --wa-line: var(--line, #323136); --wa-ink: var(--text, #f2f5fb); --wa-mut: var(--muted, #a7b2c3); --wa-green: #25d366; --wa-deep: #128c4a; position: fixed; z-index: 9; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font: 15px/1.45 inherit; }
body:has(.compare-tray:not([hidden])) .bmg-wa { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 650px) { body.single-product .bmg-wa { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
.bmg-wa-fab { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--wa-green); color: #062b14; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 24px #0008; position: relative; }
.bmg-wa-fab svg { width: 30px; height: 30px; }
.bmg-wa-fab:focus-visible, .bmg-wa-chip:focus-visible, .bmg-wa-x:focus-visible, .bmg-wa-send:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bmg-wa-fab .bmg-wa-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #ff5a4f; border: 2px solid var(--wa-green); }
.bmg-wa-fab.is-calling { animation: bmg-wa-pulse 1.6s ease-out 2; }
@keyframes bmg-wa-pulse { 0% { box-shadow: 0 0 0 0 #25d36699, 0 6px 24px #0008; } 100% { box-shadow: 0 0 0 18px #25d36600, 0 6px 24px #0008; } }
.bmg-wa-panel { width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100svh - 120px)); display: flex; flex-direction: column; background: var(--wa-bg); color: var(--wa-ink); border: 1px solid var(--wa-line); border-radius: 18px; box-shadow: 0 18px 60px #000a; overflow: hidden; transform-origin: bottom right; animation: bmg-wa-in .28s ease-out; }
.bmg-wa-panel[hidden] { display: none; }
@keyframes bmg-wa-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.bmg-wa-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--wa-deep); color: #fff; }
.bmg-wa-av { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--wa-deep); display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: 0 0 auto; }
.bmg-wa-head strong { display: block; font-size: 15px; line-height: 1.2; }
.bmg-wa-head small { display: block; font-size: 12.5px; opacity: .88; }
.bmg-wa-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.bmg-wa-x:hover { background: #ffffff22; }
.bmg-wa-body { padding: 14px 12px 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bmg-wa-msg { max-width: 88%; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: var(--raised, #212126); border: 1px solid var(--wa-line); overflow-wrap: anywhere; }
.bmg-wa-msg.me { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: #1f5136; border-color: #2c6b48; }
.bmg-wa-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bmg-wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--wa-mut); animation: bmg-wa-blink 1s infinite; }
.bmg-wa-typing i:nth-child(2) { animation-delay: .15s; } .bmg-wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bmg-wa-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.bmg-wa-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 2px 0 6px; }
.bmg-wa-chip { text-align: left; font: inherit; font-size: 14px; color: var(--wa-ink); background: transparent; border: 1px solid #2f8f5b; border-radius: 12px; padding: 8px 12px; min-height: 40px; cursor: pointer; text-decoration: none; }
.bmg-wa-chip:hover { background: #25d36618; border-color: var(--wa-green); }
.bmg-wa-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--wa-line); }
.bmg-wa-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--wa-ink); background: var(--surface, #131315); border: 1px solid var(--wa-line); border-radius: 12px; padding: 9px 12px; }
.bmg-wa-send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--wa-green); color: #062b14; display: grid; place-items: center; cursor: pointer; }
.bmg-wa-send svg { width: 20px; height: 20px; }
.bmg-wa-foot { padding: 0 12px 10px; font-size: 12px; color: var(--wa-mut); }

.bmg-wa-teaser { display: flex; align-items: flex-start; gap: 4px; max-width: min(300px, calc(100vw - 32px)); background: var(--wa-bg); border: 1px solid var(--wa-line); border-radius: 16px 16px 4px 16px; box-shadow: 0 10px 34px #0009; padding: 4px 4px 4px 0; animation: bmg-wa-in .28s ease-out; }
.bmg-wa-teaser-text { flex: 1; text-align: left; font: inherit; font-size: 14.5px; color: var(--wa-ink); background: none; border: 0; padding: 9px 4px 9px 13px; cursor: pointer; }
.bmg-wa-teaser-x { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--wa-mut); font-size: 20px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .bmg-wa-panel, .bmg-wa-teaser, .bmg-wa-fab.is-calling, .bmg-wa-typing i { animation: none; } }
@media print { .bmg-wa { display: none; } }
