/* Site içi canlı destek penceresi. Kaynak: sohbet-merkezi/magaza/public/css/sohbet.css — mağazalara yama.js dağıtır;
   Pi dışı siteler commerce-api.medkaltec.com/canli/w.css üzerinden alır.
   Renk: --sb-ana (pencere betiği dış sitede verir) → yoksa sitenin --red değişkeni → yoksa nötr mavi. */
.sb-dugme, .sb-kutu, .sb-onizleme { --sb-a: var(--sb-ana, var(--red, #0b63a8)); --sb-ad: var(--sb-ana-d, var(--red-d, #084b80)); --sb-b: var(--sb-bas, var(--red-deep, #052f52)); --sb-yesil: #16a34a; box-sizing: border-box; }
.sb-dugme *, .sb-kutu *, .sb-onizleme * { box-sizing: border-box; }
.sb-dugme { position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 151; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 13px; margin: 0; border: 0; border-radius: 99px; background: var(--sb-a); color: #fff; font: 700 14px/1 var(--sans, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif); letter-spacing: 0; cursor: pointer; box-shadow: 0 10px 28px -10px rgba(14, 17, 22, .55); transition: bottom .3s ease, background .2s, transform .2s; }
.sb-dugme:hover { background: var(--sb-ad); }
.sb-dugme:active { transform: scale(.97); }
.sb-dugme:focus-visible, .sb-kapat:focus-visible, .sb-gonder:focus-visible, .sb-onizleme:focus-visible { outline: 3px solid var(--red-light, #8cc3ec); outline-offset: 2px; }
.sb-dugme-ic { position: relative; display: inline-grid; place-items: center; }
.sb-ic { width: 22px; height: 22px; flex: none; }
.sb-nokta { position: absolute; right: -3px; bottom: -2px; width: 10px; height: 10px; border-radius: 99px; background: #9aa3ad; border: 2px solid var(--sb-a); display: none; }
.sb-cevrimici .sb-nokta { display: block; background: var(--sb-yesil); }
.sb-rozet { position: absolute; top: -6px; right: -4px; min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: #e11d48; color: #fff; font: 800 11.5px/1 var(--sans, system-ui, sans-serif); border: 2px solid #fff; animation: sb-zipla .5s ease; }
.sb-rozet[hidden] { display: none; }
@keyframes sb-zipla { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
body.mbuy-on .sb-dugme, body.sbuy-on .sb-dugme { bottom: calc(100px + env(safe-area-inset-bottom)); }
body.page-product .sb-dugme { bottom: calc(22px + env(safe-area-inset-bottom)); }
body.page-product.mbuy-on .sb-dugme, body.page-product.sbuy-on .sb-dugme { bottom: calc(100px + env(safe-area-inset-bottom)); }
/* Sepet, ödeme ve PayTR adımlarında dikkat dağıtmasın (WhatsApp düğmesiyle aynı kural) */
body.page-basket .sb-dugme, body.page-checkout .sb-dugme, body.page-pay .sb-dugme, body.page-basket .sb-kutu, body.page-checkout .sb-kutu, body.page-pay .sb-kutu, body.page-basket .sb-onizleme, body.page-checkout .sb-onizleme, body.page-pay .sb-onizleme { display: none; }
body.sb-acik .sb-dugme, body.sb-acik .sb-onizleme { display: none; }
@media (max-width: 420px) { .sb-dugme-y { display: none; } .sb-dugme { width: 52px; height: 52px; padding: 0; justify-content: center; } }
/* Geniş ekran: WhatsApp düğmesinin (sağ alt, 60 px) üstünde */
@media (min-width: 900px) {
  .sb-dugme, body.page-product .sb-dugme { right: 22px; bottom: 94px; }
  body.mbuy-on .sb-dugme, body.sbuy-on .sb-dugme, body.page-product.mbuy-on .sb-dugme, body.page-product.sbuy-on .sb-dugme { bottom: 168px; }
}

/* Önizleme (pencere kapalıyken temsilci yazınca) */
.sb-onizleme { position: fixed; right: 16px; bottom: calc(132px + env(safe-area-inset-bottom)); z-index: 152; width: min(300px, calc(100vw - 32px)); padding: 12px 34px 12px 14px; border-radius: 16px 16px 4px 16px; background: #fff; color: #0e1116; font: 400 14px/1.45 var(--sans, system-ui, sans-serif); box-shadow: 0 16px 40px -14px rgba(14, 17, 22, .45), 0 0 0 1px rgba(14, 17, 22, .06); cursor: pointer; animation: sb-gir .25s ease; }
.sb-onizleme[hidden] { display: none; }
.sb-oniz-bas { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 800; color: var(--sb-a); }
.sb-oniz-metin { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sb-oniz-kapat { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 99px; background: transparent; color: #626975; cursor: pointer; }
.sb-oniz-kapat .sb-ic { width: 16px; height: 16px; }
.sb-oniz-kapat:hover { background: #eef1f5; }
@media (min-width: 900px) { .sb-onizleme { right: 22px; bottom: 154px; } }
@keyframes sb-gir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sb-kutu { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; margin: 0; background: var(--card, #fff); color: var(--ink, #0e1116); font: 400 14.5px/1.5 var(--sans, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif); text-align: left; }
.sb-kutu[hidden] { display: none; }
@media (min-width: 640px) {
  .sb-kutu { inset: auto 22px 22px auto; width: 384px; height: min(620px, calc(100vh - 44px)); border: 1px solid var(--line, #e3e8ee); border-radius: var(--r-lg, 20px); overflow: hidden; box-shadow: 0 24px 64px -20px rgba(14, 17, 22, .45); animation: sb-gir .2s ease; }
}
.sb-bas { display: flex; align-items: center; gap: 11px; padding: 13px 12px 13px 14px; background: var(--sb-b); color: #fff; }
.sb-av { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.sb-av .sb-nokta { border-color: var(--sb-b); right: 0; bottom: 0; }
.sb-bas-y { flex: 1; min-width: 0; display: grid; }
.sb-bas-y strong { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bas-y span { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-kapat { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.sb-kapat:hover { background: rgba(255, 255, 255, .22); }

.sb-akis { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--paper, #f5f7fa); }
.sb-m { position: relative; max-width: 86%; padding: 9px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.sb-m p { margin: 0; white-space: pre-line; }
.sb-m p + p { margin-top: 7px; }
.sb-o { align-self: flex-start; background: var(--card, #fff); border: 1px solid var(--line, #e3e8ee); border-bottom-left-radius: 4px; }
.sb-ben { align-self: flex-end; background: var(--sb-a); color: #fff; border-bottom-right-radius: 4px; margin-top: 4px; }
.sb-temsilci { background: #eef6ff; border-color: #cfe3fb; }
.sb-etiket { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 0 2px; font-size: 11.5px; font-weight: 700; color: var(--mut, #626975); }
.sb-etiket-t { color: var(--sb-ad); }
.sb-etiket-ic { width: 14px; height: 14px; }
.sb-zaman { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1; opacity: .55; text-align: right; }
.sb-sistem { align-self: center; max-width: 92%; margin: 6px 0; padding: 7px 12px; border-radius: 10px; background: rgba(14, 17, 22, .05); color: var(--ink-2, #3f4650); font-size: 12.5px; line-height: 1.45; text-align: center; }
.sb-sistem p { margin: 0; }
.sb-urun { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px; border: 1px solid var(--line, #e3e8ee); border-radius: 10px; background: var(--paper, #f5f7fa); color: inherit; text-decoration: none; }
.sb-urun:hover { border-color: var(--sb-a); }
.sb-urun img { width: 56px; height: 56px; object-fit: contain; border-radius: 7px; background: #fff; flex: none; }
.sb-urun-y { display: grid; gap: 2px; min-width: 0; }
.sb-urun-y b { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-urun-y i { font-style: normal; font-size: 13.5px; font-weight: 800; color: var(--sb-ad); }
.sb-yaziyor { display: inline-flex; gap: 5px; padding: 13px 14px; }
.sb-yaziyor i { width: 7px; height: 7px; border-radius: 99px; background: var(--mut, #626975); animation: sb-nokta 1.2s ease-in-out infinite; }
.sb-yaziyor i:nth-child(2) { animation-delay: .18s; }
.sb-yaziyor i:nth-child(3) { animation-delay: .36s; }
@keyframes sb-nokta { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sb-yaziyor i { animation: none; opacity: .6; } .sb-dugme { transition: none; } .sb-kutu, .sb-onizleme, .sb-rozet { animation: none; } }

/* Çevrimdışı iletişim formu */
.sb-ilet { align-self: stretch; display: grid; gap: 7px; margin: 4px 0; padding: 12px; border: 1px solid var(--line, #e3e8ee); border-radius: 14px; background: var(--card, #fff); }
.sb-ilet b { font-size: 13.5px; }
.sb-ilet input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-2, #d5dde6); border-radius: 10px; font: inherit; font-size: 16px; color: inherit; background: #fff; }
.sb-ilet input:focus { outline: 2px solid var(--sb-a); outline-offset: 0; border-color: transparent; }
.sb-ilet button { height: 42px; border: 0; border-radius: 10px; background: var(--sb-a); color: #fff; font: 700 14px/1 var(--sans, system-ui, sans-serif); cursor: pointer; }
.sb-ilet button:disabled { opacity: .6; cursor: default; }
.sb-ilet-hata { color: #b91c1c; font-size: 12px; }
.sb-ilet-hata[hidden] { display: none; }

.sb-ts:empty { display: none; }
.sb-ts { padding: 6px 12px 0; background: var(--card, #fff); }
.sb-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line, #e3e8ee); background: var(--card, #fff); }
.sb-alan { flex: 1; min-height: 44px; max-height: 96px; margin: 0; padding: 10px 12px; border: 1px solid var(--line-2, #d5dde6); border-radius: 12px; resize: none; font: inherit; font-size: 16px; line-height: 1.4; color: inherit; background: #fff; box-shadow: none; }
.sb-alan:focus { outline: 2px solid var(--sb-a); outline-offset: 0; border-color: transparent; }
.sb-gonder { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: var(--sb-a); color: #fff; cursor: pointer; }
.sb-gonder:disabled { opacity: .5; cursor: default; }
.sb-alt { padding: 0 12px 6px; font-size: 12.5px; color: var(--ink-2, #3f4650); background: var(--card, #fff); }
.sb-alt a, .sb-not a { color: var(--sb-ad); font-weight: 700; text-decoration: underline; }
.sb-not { margin: 0; padding: 0 12px calc(10px + env(safe-area-inset-bottom)); font-size: 11px; line-height: 1.4; color: var(--mut, #626975); background: var(--card, #fff); }
@media print { .sb-dugme, .sb-kutu, .sb-onizleme { display: none !important; } }
