/* AppBazar canlı çat widget-i */
.abc { --abc-main: #6345ED; --abc-main2: #8B5CF6; --abc-bg: #ffffff; --abc-soft: #F4F2FB; --abc-line: #E7E4F2; --abc-text: #1D1B29; --abc-muted: #6E6A80; --abc-team: #F1EFF8; --abc-shadow: 0 24px 60px rgba(29, 20, 72, .22), 0 4px 14px rgba(29, 20, 72, .10);
    position: fixed; right: 22px; bottom: 22px; z-index: 10000; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; color: var(--abc-text); -webkit-font-smoothing: antialiased; }
[data-theme=dark] .abc { --abc-bg: #17151F; --abc-soft: #211E2C; --abc-line: #2D2A3A; --abc-text: #F2F0FA; --abc-muted: #A19DB3; --abc-team: #262333; --abc-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .35); }
.abc *, .abc *::before, .abc *::after { box-sizing: border-box; }
.abc button { font: inherit; cursor: pointer; }

/* Düymə */
.abc-launch { width: 60px; height: 60px; border: 0; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--abc-main) 0%, var(--abc-main2) 100%); box-shadow: 0 12px 30px rgba(99, 69, 237, .45); display: grid; place-items: center; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.abc-launch:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 36px rgba(99, 69, 237, .55); }
.abc-launch svg { width: 28px; height: 28px; transition: transform .25s ease, opacity .2s ease; }
.abc-launch .abc-i-close { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
.abc.is-open .abc-launch .abc-i-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.abc.is-open .abc-launch .abc-i-close { opacity: 1; transform: none; }
.abc-badge { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #EF4444; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.abc-badge[hidden] { display: none; }
.abc-hint { position: absolute; right: 72px; bottom: 8px; width: max-content; max-width: 240px; background: var(--abc-bg); color: var(--abc-text); border-radius: 16px 16px 4px 16px; padding: 11px 34px 11px 14px; font-size: 14px; box-shadow: var(--abc-shadow); animation: abc-pop .35s ease; }
.abc-hint b { display: block; font-size: 14.5px; }
.abc-hint span { color: var(--abc-muted); font-size: 13px; }
.abc-hint button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; background: none; color: var(--abc-muted); border-radius: 50%; font-size: 16px; line-height: 1; }
.abc-hint[hidden], .abc.is-open .abc-hint { display: none; }

/* Pəncərə */
.abc-panel { position: absolute; right: 0; bottom: 76px; width: 380px; height: min(640px, calc(100vh - 120px)); background: var(--abc-bg); border-radius: 22px; box-shadow: var(--abc-shadow); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; visibility: hidden; transition: opacity .2s ease, transform .22s ease, visibility 0s linear .22s; }
.abc.is-open .abc-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease, transform .22s ease; }

.abc-head { padding: 18px 18px 16px; color: #fff; background: linear-gradient(135deg, var(--abc-main) 0%, var(--abc-main2) 100%); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.abc-ava { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex-shrink: 0; position: relative; }
.abc-ava svg { width: 26px; height: 26px; }
.abc-ava::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #A3A3B5; border: 2px solid #7C5CF0; }
.abc.is-online .abc-ava::after { background: #22C55E; }
.abc-title { flex: 1; min-width: 0; }
.abc-title b { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.abc-title span { display: block; font-size: 12.5px; opacity: .88; }
.abc-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.abc-x:hover { background: rgba(255, 255, 255, .24); }
.abc-x svg { width: 18px; height: 18px; }

.abc-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--abc-soft); overscroll-behavior: contain; }
.abc-body::-webkit-scrollbar { width: 6px; }
.abc-body::-webkit-scrollbar-thumb { background: var(--abc-line); border-radius: 3px; }

.abc-day { text-align: center; margin: 10px 0; }
.abc-day span { display: inline-block; font-size: 11.5px; color: var(--abc-muted); background: var(--abc-bg); padding: 3px 10px; border-radius: 999px; }

.abc-row { display: flex; flex-direction: column; margin-bottom: 6px; }
.abc-row.abc-me { align-items: flex-end; }
.abc-row.abc-team { align-items: flex-start; }
.abc-who { font-size: 11.5px; color: var(--abc-muted); margin: 6px 0 3px 12px; font-weight: 600; }
.abc-msg { max-width: 82%; padding: 9px 13px 7px; border-radius: 18px; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; animation: abc-in .22s ease; }
.abc-row.abc-me .abc-msg { background: linear-gradient(135deg, var(--abc-main) 0%, #7350F0 100%); color: #fff; border-bottom-right-radius: 6px; }
.abc-row.abc-team .abc-msg { background: var(--abc-bg); color: var(--abc-text); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(29, 20, 72, .06); }
.abc-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.abc-msg img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin: 2px 0 4px; cursor: zoom-in; }
.abc-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 10.5px; opacity: .72; margin-top: 2px; white-space: nowrap; }
.abc-tick { font-size: 12px; letter-spacing: -3px; padding-right: 3px; }
.abc-tick.is-read { color: #A7F3D0; opacity: 1; }
.abc-sys { text-align: center; font-size: 12px; color: var(--abc-muted); margin: 8px 0; }
.abc-pending .abc-msg { opacity: .6; }
/* Saytın öz CSS-i (.team, .row və s.) çata qarışmasın */
.abc-body { overflow-x: hidden; }
.abc-row::before, .abc-row::after, .abc-msg::before, .abc-msg::after { content: none !important; display: none !important; }

.abc-welcome { background: var(--abc-bg); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(29, 20, 72, .06); }
.abc-welcome b { display: block; font-size: 16px; margin-bottom: 4px; }
.abc-welcome p { margin: 0; color: var(--abc-muted); font-size: 14px; }
.abc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.abc-chips button { border: 1.5px solid var(--abc-line); background: var(--abc-bg); color: var(--abc-text); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; transition: border-color .15s, color .15s, background .15s; }
.abc-chips button:hover { border-color: var(--abc-main); color: var(--abc-main); }

.abc-typing { display: inline-flex; align-items: center; gap: 8px; background: var(--abc-bg); border-radius: 18px; border-bottom-left-radius: 6px; padding: 10px 14px; font-size: 12.5px; color: var(--abc-muted); margin: 4px 0 8px; }
.abc-typing i { display: inline-flex; gap: 3px; }
.abc-typing i span { width: 6px; height: 6px; border-radius: 50%; background: var(--abc-muted); animation: abc-dot 1.2s infinite ease-in-out; }
.abc-typing i span:nth-child(2) { animation-delay: .15s; }
.abc-typing i span:nth-child(3) { animation-delay: .3s; }
.abc-typing[hidden] { display: none; }

/* Ad / telefon kartı */
.abc-id { background: var(--abc-bg); border-radius: 18px; padding: 16px; margin: 6px 0 10px; box-shadow: 0 6px 20px rgba(29, 20, 72, .08); border: 1.5px solid var(--abc-line); animation: abc-in .22s ease; }
.abc-id b { display: block; font-size: 15px; margin-bottom: 2px; }
.abc-id p { margin: 0 0 12px; font-size: 13px; color: var(--abc-muted); }
.abc-id input { width: 100%; border: 1.5px solid var(--abc-line); background: var(--abc-soft); color: var(--abc-text); border-radius: 12px; padding: 11px 13px; font-size: 15px; margin-bottom: 8px; outline: none; transition: border-color .15s; }
.abc-id input:focus { border-color: var(--abc-main); background: var(--abc-bg); }
.abc-id .abc-go { width: 100%; border: 0; border-radius: 12px; padding: 11px; color: #fff; font-weight: 600; background: linear-gradient(135deg, var(--abc-main) 0%, var(--abc-main2) 100%); }
.abc-id small { display: block; margin-top: 8px; font-size: 12px; color: var(--abc-muted); }
.abc-err { color: #E11D48; font-size: 13px; margin: 0 0 8px; }
.abc-err:empty { display: none; }

/* Yazma yeri */
.abc-foot { border-top: 1px solid var(--abc-line); background: var(--abc-bg); padding: 10px 10px 10px 12px; flex-shrink: 0; }
.abc-preview { display: flex; align-items: center; gap: 10px; padding: 0 2px 8px; }
.abc-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.abc-preview span { flex: 1; font-size: 13px; color: var(--abc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abc-preview button { border: 0; background: var(--abc-soft); color: var(--abc-muted); border-radius: 8px; width: 28px; height: 28px; }
.abc-preview[hidden] { display: none; }
.abc-compose { display: flex; align-items: flex-end; gap: 6px; }
.abc-compose textarea { flex: 1; resize: none; border: 0; outline: none; background: transparent; color: var(--abc-text); font: inherit; font-size: 15px; max-height: 120px; min-height: 24px; padding: 8px 4px; line-height: 1.4; }
.abc-compose textarea::placeholder { color: var(--abc-muted); }
.abc-ic { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--abc-muted); display: grid; place-items: center; flex-shrink: 0; transition: background .15s, color .15s; }
.abc-ic:hover { background: var(--abc-soft); color: var(--abc-main); }
.abc-ic svg { width: 22px; height: 22px; }
.abc-send { background: var(--abc-main); color: #fff; }
.abc-send:hover { background: #5435DB; color: #fff; }
.abc-send:disabled { background: var(--abc-line); color: var(--abc-muted); cursor: default; }
.abc-brand { text-align: center; font-size: 11px; color: var(--abc-muted); padding-top: 6px; opacity: .8; }

@keyframes abc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes abc-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes abc-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* Planşet/telefon: saytın alt menyusu (mobile-bottom-nav, 58px) görünür — düymə onun üstündə */
@media (max-width: 991px) { .abc { bottom: 78px; } .abc-panel { height: min(600px, calc(100vh - 170px)); } }

/* Telefon: tam ekran */
@media (max-width: 560px) {
    .abc { right: 14px; bottom: 64px; }
    .abc-launch { width: 56px; height: 56px; }
    .abc-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; transform: translateY(24px); }
    .abc.is-open .abc-launch { display: none; }
    .abc-head { padding-top: max(16px, env(safe-area-inset-top)); }
    .abc-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
    .abc-compose textarea, .abc-id input { font-size: 16px; } /* iOS böyütməsin */
    .abc-hint { right: 66px; }
}
html.abc-lock, html.abc-lock body { overflow: hidden !important; }
@media (prefers-reduced-motion: reduce) { .abc *, .abc-panel { animation: none !important; transition: none !important; } }
