/* Canlı destek — mağaza widget + admin */
.np-live-chat {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 9990;
    font-family: inherit;
}
.np-live-chat-launcher {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #c45c26, #a34a1c);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(196, 92, 38, .45);
    position: relative;
    transition: transform .15s;
}
.np-live-chat-launcher:hover { transform: scale(1.05); }
.np-live-chat-launcher-badge {
    position: absolute;
    top: -.15rem;
    right: -.15rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}
.np-live-chat-launcher-badge[hidden] {
    display: none !important;
}
.np-live-chat-launcher-badge:not([hidden]) {
    display: flex;
}
.np-live-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(3.35rem + .65rem);
    width: min(380px, calc(100vw - 2rem));
    height: min(520px, calc(100vh - 6rem));
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
    flex-direction: column;
    overflow: hidden;
}
.np-live-chat-panel[hidden] {
    display: none !important;
}
.np-live-chat-panel:not([hidden]) {
    display: flex;
}
.np-live-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
}
.np-live-chat-head strong { display: block; font-size: .92rem; }
.np-live-chat-head small { font-size: .72rem; opacity: .85; }
.np-live-chat-head-actions { display: flex; gap: .25rem; }
.np-live-chat-icon-btn {
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.np-live-chat-foot .np-live-chat-icon-btn {
    background: #f1f5f9;
    color: #475569;
    flex-shrink: 0;
}
.np-live-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .85rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .65rem;
    scroll-behavior: smooth;
}
.np-live-chat-msg {
    max-width: 88%;
    padding: .65rem .75rem;
    border-radius: 12px;
    font-size: .84rem;
    line-height: 1.5;
}
.np-live-chat-msg-head {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .3rem;
    font-size: .72rem;
}
.np-live-chat-msg-head strong { font-weight: 700; }
.np-live-chat-msg-head time { opacity: .65; white-space: nowrap; }
.np-live-chat-msg--visitor {
    align-self: flex-end;
    background: #fff;
    border: 1px solid #e2e8f0;
}
.np-live-chat-msg--bot,
.np-live-chat-msg--system {
    align-self: flex-start;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.np-live-chat-msg--agent {
    align-self: flex-start;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.np-live-chat-faq {
    padding: .65rem .85rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    max-height: 140px;
    overflow-y: auto;
}
.np-live-chat-faq-title {
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}
.np-live-chat-faq-grid { display: flex; flex-direction: column; gap: .35rem; }
.np-live-chat-faq-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .45rem .55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
    font-size: .78rem;
    text-align: left;
    cursor: pointer;
    color: #334155;
}
.np-live-chat-faq-btn:hover { border-color: #c45c26; background: #fff7ed; }
.np-live-chat-faq-btn i { color: #c45c26; width: 1rem; text-align: center; flex-shrink: 0; }
.np-live-chat-connect {
    padding: .5rem .85rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}
.np-live-chat-connect-btn { width: 100%; justify-content: center; }
.np-live-chat-foot {
    padding: .55rem .75rem .7rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    position: relative;
}
.np-live-chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
}
.np-live-chat-input-row textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .5rem .65rem;
    font: inherit;
    font-size: .84rem;
    max-height: 80px;
}
.np-live-chat-send {
    width: 2.2rem;
    height: 2.2rem;
    border: none;
    border-radius: 10px;
    background: #c45c26;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.np-live-chat-foot-meta {
    display: flex;
    justify-content: space-between;
    margin-top: .4rem;
}
.np-live-chat-end,
.np-live-chat-new {
    border: none;
    background: none;
    font-size: .72rem;
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
}
.np-live-chat-emoji-pop[hidden],
.live-chat-admin-emoji-pop[hidden] {
    display: none !important;
}
.np-live-chat-emoji-pop,
.live-chat-admin-emoji-pop {
    position: absolute;
    bottom: 100%;
    left: .75rem;
    margin-bottom: .35rem;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .45rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    max-width: 220px;
    z-index: 2;
}
.np-live-chat-emoji-pop:not([hidden]),
.live-chat-admin-emoji-pop:not([hidden]) {
    display: flex;
}
.np-live-chat-emoji-pop button,
.live-chat-admin-emoji-pop button {
    border: none;
    background: none;
    font-size: 1.15rem;
    cursor: pointer;
    padding: .15rem;
}
.live-chat-page { padding: 2rem 0 4rem; }
.live-chat-page-sub { color: var(--muted); max-width: 560px; }

/* Admin */
.admin-nav-badge {
    margin-left: auto;
    min-width: 1.1rem;
    padding: .1rem .35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    text-align: center;
}
.admin-live-chat-toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 10000;
    max-width: 320px;
    padding: .85rem 1rem;
    background: #1e293b;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    font-size: .85rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: .2s;
}
.admin-live-chat-toast.is-visible { opacity: 1; transform: translateY(0); }
.admin-live-chat-toast a { color: #93c5fd; margin-left: .35rem; }
.live-chat-status {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: capitalize;
}
.live-chat-status--waiting { background: #fef3c7; color: #92400e; }
.live-chat-status--active { background: #dcfce7; color: #166534; }
.live-chat-status--bot { background: #f1f5f9; color: #64748b; }
.live-chat-status--closed { background: #f1f5f9; color: #94a3b8; }
.live-chat-admin-show .live-chat-admin-thread {
    max-height: 55vh;
    min-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .65rem;
    scroll-behavior: smooth;
}
.live-chat-admin-compose {
    position: relative;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.live-chat-admin-agent-note {
    margin: 0 0 .65rem;
    font-size: .82rem;
    color: var(--muted);
}
.live-chat-admin-input-row {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}
.live-chat-admin-input-row textarea {
    flex: 1;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}
.live-chat-admin-accept {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
}
.live-chat-admin-accept p { margin: 0; flex: 1; font-size: .88rem; }
.live-chat-admin-accept .btn-primary,
.live-chat-admin-input-row .btn-primary {
    color: #fff;
}
.support-admin-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .85rem;
}
.support-filter-tab {
    padding: .4rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: .82rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
}
.support-filter-tab.is-active {
    background: var(--primary, #2563eb);
    color: #fff;
    border-color: var(--primary, #2563eb);
}

@media (max-width: 900px) {
    .np-live-chat {
        z-index: 10050;
    }
}

@media (max-width: 480px) {
    .np-live-chat { right: .65rem; bottom: .65rem; }
    .np-live-chat-panel {
        width: calc(100vw - 1.3rem);
        height: calc(100vh - 5rem);
    }
}
