/* Naturalce — sohbet asistanı · Rising Medya © 2026 */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Yüzen düğme: mobilde alt sekme çubuğunun üstünde sağda; masaüstünde WhatsApp düğmesinin üstünde */
.nca-fab { position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); z-index: 66; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px 0 6px; border-radius: 999px; background: var(--brand-800, #124D2E); color: #fff; box-shadow: 0 12px 30px rgba(12, 58, 34, .35); font-weight: 800; font-size: 13px; letter-spacing: .02em; transition: transform .25s var(--ease, ease), box-shadow .25s, opacity .2s; }
.nca-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(12, 58, 34, .42); }
.nca-fab__ic { width: 40px; height: 40px; border-radius: 50%; background: var(--gold-500, #D9942B); display: inline-flex; align-items: center; justify-content: center; }
.nca-fab__ic svg { width: 22px; height: 22px; }
.nca-fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(.9); }
.nca-fab.has-history::after { content: ""; position: absolute; top: 6px; left: 36px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-800, #124D2E); }
/* Ürün sayfasında mobil "Sepete ekle" çubuğu görünürken düğme çubuğun üstüne çıkar (üst üste binmesin) */
@media (max-width: 899px) { body:has(.buybar.is-visible) .nca-fab { bottom: calc(142px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 420px) { .nca-fab__txt { display: none; } .nca-fab { padding: 0 6px; width: 52px; justify-content: center; } }

/* Panel */
.nca { position: fixed; z-index: 130; right: 0; left: 0; bottom: 0; top: auto; height: min(86vh, 680px); display: flex; flex-direction: column; background: var(--paper, #FBF9F3); border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px rgba(12, 58, 34, .28); overflow: hidden; opacity: 0; transform: translateY(24px); transition: opacity .22s var(--ease, ease), transform .22s var(--ease, ease); }
.nca.is-open { opacity: 1; transform: none; }
.nca[hidden] { display: none; }
body.nca-on .tabbar, body.nca-on .cookie { visibility: hidden; }
.nca__head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--brand-900, #0C3A22); color: #fff; }
.nca__avatar { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex: none; }
.nca__avatar img { width: 30px; height: 30px; object-fit: contain; }
.nca__who { flex: 1; min-width: 0; }
.nca__who strong { display: block; font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 17px; line-height: 1.2; }
.nca__who small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.nca__dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); }
.nca__icon { width: 40px; height: 40px; border-radius: 10px; color: rgba(255, 255, 255, .85); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nca__icon:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nca__icon svg { width: 20px; height: 20px; }

.nca__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.nca-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.nca-msg p { margin: 0 0 6px; } .nca-msg p:last-child { margin-bottom: 0; }
.nca-msg ul { margin: 4px 0 6px; padding-left: 18px; list-style: disc; } .nca-msg li { margin: 2px 0; }
.nca-msg a { color: var(--brand-700, #1B6B3A); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.nca-msg--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line, #E4EAE2); border-bottom-left-radius: 4px; color: var(--ink, #17201A); }
.nca-msg--user { align-self: flex-end; background: var(--brand-700, #1B6B3A); color: #fff; border-bottom-right-radius: 4px; }
.nca-msg--error { background: #FFF7ED; border-color: #FED7AA; }
.nca-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.nca-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2, #9DA69F); animation: ncaDot 1.2s infinite ease-in-out; }
.nca-typing i:nth-child(2) { animation-delay: .15s; } .nca-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ncaDot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }

/* Sohbet içi ürün kartları */
.nca-prods { display: grid; gap: 8px; margin-top: 10px; }
.nca-prod { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px; border: 1px solid var(--line, #E4EAE2); border-radius: 12px; background: var(--paper, #FBF9F3); }
.nca-prod__img { width: 56px; height: 56px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.nca-prod__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.nca-prod__name { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--ink, #17201A) !important; text-decoration: none !important; }
.nca-prod__price { display: block; font-size: 13px; margin-top: 2px; } .nca-prod__price s { color: var(--muted-2, #9DA69F); font-size: 11.5px; }
.nca-prod__price strong { color: var(--brand-800, #124D2E); }
.nca-prod__add { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-800, #124D2E); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.nca-prod__add svg { width: 18px; height: 18px; }
.nca-prod__add:hover { background: var(--brand-600, #22854A); }
.nca-prod__add.is-added { background: var(--gold-500, #D9942B); }
.nca-prod__add.is-loading { opacity: .6; pointer-events: none; }
.nca-prod__out { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6F7A72); padding: 0 6px; }

.nca__chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 10px; scrollbar-width: none; }
.nca__chips::-webkit-scrollbar { display: none; }
.nca__chips[hidden] { display: none; }
.nca__chip { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--brand-200, #BFE5CC); background: #fff; color: var(--brand-800, #124D2E); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.nca__chip:hover { background: var(--brand-50, #F1F9F4); }

.nca__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #E4EAE2); background: #fff; }
.nca__form textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line, #E4EAE2); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; line-height: 1.4; max-height: 120px; outline: 0; background: var(--paper, #FBF9F3); }
.nca__form textarea:focus { border-color: var(--brand-500, #2FA55A); box-shadow: 0 0 0 3px var(--brand-100, #E1F3E7); background: #fff; }
.nca__send { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-800, #124D2E); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nca__send svg { width: 20px; height: 20px; }
.nca__form.is-busy .nca__send { opacity: .5; pointer-events: none; }
.nca__foot { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; color: #5E6961; line-height: 1.4; } /* ≥ 4.5:1 kontrast (WCAG AA) */
.nca__foot a { color: var(--brand-700, #1B6B3A); font-weight: 700; }

@media (min-width: 700px) {
  .nca { left: auto; right: 20px; bottom: 20px; width: 400px; height: min(640px, calc(100vh - 120px)); border-radius: 18px; box-shadow: 0 30px 80px rgba(12, 58, 34, .3); }
  body.nca-on .tabbar, body.nca-on .cookie { visibility: visible; }
}
@media (min-width: 1000px) {
  .nca-fab { right: 20px; bottom: 90px; } /* WhatsApp düğmesinin (bottom: 20px civarı) üstü */
}
@media (prefers-reduced-motion: reduce) { .nca, .nca-fab { transition: none; } .nca-typing i { animation: none; opacity: .7; } }
@media print { .nca, .nca-fab { display: none !important; } }
