/* goknix canli destek penceresi (gx/partials/ai-chat.blade.php) */
.gxai { --ai-blue: #0755e9; --ai-blue2: #2f7bff; --ai-ink: #08163f; --ai-text: #33435f; --ai-mute: #6a7a95; --ai-line: #e1e9f6; --ai-bg: #f5f8fd;
  position: fixed; right: 20px; bottom: 20px; z-index: 75; font-family: var(--c-font, "Plus Jakarta Sans", system-ui, sans-serif); -webkit-font-smoothing: antialiased; }
.gxai *, .gxai *::before, .gxai *::after { box-sizing: border-box; }
.gxai svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gxai .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.totop { bottom: 96px !important; }

/* acma dugmesi */
.gxai-fab { display: flex; align-items: center; gap: 11px; height: 58px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--ai-blue2), var(--ai-blue) 60%, #0444c4); color: #fff; box-shadow: 0 14px 34px -10px rgba(7, 85, 233, .65), 0 2px 6px rgba(8, 22, 63, .12);
  transition: transform .18s, box-shadow .18s; }
.gxai-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -10px rgba(7, 85, 233, .75), 0 2px 6px rgba(8, 22, 63, .12); }
.gxai-fab:focus-visible { outline: 3px solid #9cc0ff; outline-offset: 3px; }
.gxai-fab-ic { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.gxai-fab-ic svg { width: 22px; height: 22px; transition: opacity .18s, transform .18s; }
.gxai-fab-ic .i-chat circle { fill: currentColor; stroke: none; }
.gxai-fab-ic .i-close { position: absolute; opacity: 0; transform: rotate(-60deg); }
.gxai-fab-ic::after { content: ""; position: absolute; right: 1px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px #1361ee; }
.gxai.is-offline .gxai-fab-ic::after { display: none; }
.gxai-fab-t { display: grid; text-align: left; line-height: 1.15; }
.gxai-fab-t b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.gxai-fab-t small { font-size: 12px; opacity: .85; font-weight: 600; }
.gxai.is-open .gxai-fab { padding: 0 8px; }
.gxai.is-open .gxai-fab-t { display: none; }
.gxai.is-open .gxai-fab-ic::after { display: none; }
.gxai.is-open .gxai-fab-ic .i-chat { opacity: 0; transform: rotate(60deg); }
.gxai.is-open .gxai-fab-ic .i-close { opacity: 1; transform: none; }

/* tanitim balonu */
.gxai-teaser { position: absolute; right: 0; bottom: 72px; width: 260px; padding: 14px 34px 14px 16px; border: 1px solid var(--ai-line); border-radius: 16px 16px 4px 16px; background: #fff;
  color: var(--ai-text); font-size: 14px; line-height: 1.45; box-shadow: 0 18px 40px -14px rgba(8, 29, 75, .3); animation: gxai-up .3s ease-out; }
.gxai-teaser p { margin: 0; }
.gxai-teaser b { display: block; color: var(--ai-ink); font-size: 15px; margin-bottom: 2px; }
.gxai-teaser-x { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; border: 0; background: none; color: var(--ai-mute); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.gxai-teaser-x:hover { background: var(--ai-bg); }

/* panel */
.gxai-panel { position: absolute; right: 0; bottom: 74px; display: flex; flex-direction: column; width: 392px; height: min(640px, calc(100vh - 120px)); overflow: hidden;
  border: 1px solid #d9e4f5; border-radius: 22px; background: #fff; box-shadow: 0 30px 70px -20px rgba(8, 29, 75, .42), 0 4px 14px rgba(8, 29, 75, .08); transform-origin: 100% 100%; animation: gxai-pop .22s ease-out; }
.gxai-panel[hidden] { display: none; }
@keyframes gxai-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes gxai-up { from { opacity: 0; transform: translateY(8px); } }

.gxai-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #2f7bff 0%, #0755e9 45%, #0a2f86 100%); }
.gxai-av { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); }
.gxai-av svg { width: 22px; height: 22px; fill: #fff; stroke: none; }
.gxai-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #0a4bd0; }
.gxai.is-offline .gxai-dot { background: #f59e0b; }
.gxai-head-t { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.gxai-head-t b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.gxai-head-t small { font-size: 12.5px; opacity: .85; margin-top: 2px; }
.gxai-new, .gxai-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; opacity: .85; }
.gxai-new:hover, .gxai-x:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.gxai-new svg { width: 18px; height: 18px; }

.gxai-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 10px; background: var(--ai-bg); scroll-behavior: smooth; }
.gxai-body::-webkit-scrollbar { width: 6px; }
.gxai-body::-webkit-scrollbar-thumb { background: #c9d6ea; border-radius: 6px; }

.gxai-msg { display: flex; margin: 0 0 12px; animation: gxai-up .22s ease-out; }
.gxai-msg.user { justify-content: flex-end; }
.gxai-bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.gxai-msg.bot .gxai-bubble { background: #fff; color: var(--ai-text); border: 1px solid var(--ai-line); border-top-left-radius: 5px; box-shadow: 0 2px 6px rgba(8, 29, 75, .04); }
.gxai-msg.user .gxai-bubble { background: var(--ai-blue); color: #fff; border-top-right-radius: 5px; white-space: pre-wrap; }
.gxai-msg.sys .gxai-bubble { background: #fff7e8; color: #6b4300; border: 1px solid #f6dfb5; border-top-left-radius: 5px; }
.gxai-bubble p { margin: 0 0 8px; }
.gxai-bubble p:last-child, .gxai-bubble ul:last-child { margin-bottom: 0; }
.gxai-bubble ul { margin: 4px 0 8px; padding-left: 18px; }
.gxai-bubble li { margin: 3px 0; }
.gxai-bubble strong { color: var(--ai-ink); font-weight: 800; }
.gxai-msg.sys .gxai-bubble strong { color: inherit; }
.gxai-bubble a { color: var(--ai-blue); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(7, 85, 233, .25); }
.gxai-bubble a:hover { border-bottom-color: var(--ai-blue); }
.gxai-bubble a.gxai-cta { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 6px 11px; border: 0; border-radius: 9px; background: #eaf1ff; font-size: 13.5px; }
.gxai-bubble a.gxai-cta:hover { background: #dbe8ff; }
.gxai-bubble a.gxai-cta::after { content: "→"; }

.gxai-quick { margin: 4px 0 14px; }
.gxai-quick-h { margin: 0 0 8px 2px; color: var(--ai-mute); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.gxai-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.gxai-chip { padding: 8px 12px; border: 1px solid #cfdcf2; border-radius: 999px; background: #fff; color: var(--ai-ink); font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s, color .15s; }
.gxai-chip:hover { border-color: var(--ai-blue); color: var(--ai-blue); background: #f2f7ff; }
.gxai-chip:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 2px; }

.gxai-typing .gxai-bubble { display: inline-flex; gap: 5px; padding: 14px 16px; }
.gxai-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9db3d6; animation: gxai-blink 1.2s infinite ease-in-out; }
.gxai-typing i:nth-child(2) { animation-delay: .15s; }
.gxai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gxai-blink { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.gxai-faqpop { margin: 0 0 12px; padding: 12px; border: 1px solid var(--ai-line); border-radius: 14px; background: #fff; animation: gxai-up .2s ease-out; }

.gxai-contact { display: flex; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--ai-line); background: #fff; }
.gxai-contact a { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 7px 6px; border-radius: 9px; color: var(--ai-text); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.gxai-contact a:hover { background: var(--ai-bg); color: var(--ai-blue); }
.gxai-contact svg { width: 16px; height: 16px; }
.gxai.is-offline .gxai-contact { padding: 12px; }
.gxai.is-offline .gxai-contact a { background: var(--ai-bg); padding: 10px 6px; }

.gxai-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; background: #fff; }
.gxai-form textarea { flex: 1; min-width: 0; max-height: 120px; padding: 11px 14px; border: 1px solid #cfdcf2; border-radius: 14px; background: #fff; color: var(--ai-ink); font-family: inherit; font-size: 15px; line-height: 1.4; resize: none; outline: none; transition: border-color .15s, box-shadow .15s; }
.gxai-form textarea:focus { border-color: var(--ai-blue); box-shadow: 0 0 0 3px rgba(7, 85, 233, .12); }
.gxai-faq, .gxai-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 13px; cursor: pointer; }
.gxai-faq { background: var(--ai-bg); color: var(--ai-mute); }
.gxai-faq:hover, .gxai-faq[aria-expanded="true"] { color: var(--ai-blue); background: #eaf1ff; }
.gxai-send { background: var(--ai-blue); color: #fff; transition: background .15s, opacity .15s; }
.gxai-send:hover { background: #0444c4; }
.gxai-send:disabled { opacity: .4; cursor: default; background: var(--ai-blue); }
.gxai-note { margin: 0; padding: 2px 16px 12px; background: #fff; color: #8090a8; font-size: 11px; line-height: 1.45; }
.gxai-note a { color: inherit; text-decoration: underline; }

@media (max-width: 560px) {
  .gxai { right: 14px; bottom: 14px; }
  .gxai-fab { height: 54px; }
  .gxai-fab-t small { display: none; }
  .gxai-teaser { width: min(260px, calc(100vw - 28px)); }
  .gxai.is-open .gxai-fab { display: none; }
  .gxai-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border: 0; border-radius: 0; animation: gxai-up .2s ease-out; }
  .gxai-head { padding-top: max(16px, env(safe-area-inset-top)); }
  .gxai-note { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .gxai.is-offline .gxai-contact { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .gxai-form textarea { font-size: 16px; }
  body.gxai-lock { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .gxai *, .gxai-panel, .gxai-msg { animation: none !important; transition: none !important; } }
@media print { .gxai { display: none; } }
