/* Canlı destek widget — sağ alt sabit */
.live-support {
    --ls-fab-size: 56px;
    --ls-mobile-nav: 64px;
    position: fixed;
    bottom: 64px;
    right: 24px;
    z-index: 500;
    font-family: var(--font);
}

.live-support-fab {
    position: relative;
    width: var(--ls-fab-size);
    height: var(--ls-fab-size);
    border-radius: 50%;
    border: 1px solid rgba(255, 245, 235, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a2030 0%, #0c0f16 48%, #141a26 100%);
    color: #fff5eb;
    box-shadow:
        0 10px 36px rgba(0, 0, 0, 0.55),
        0 2px 8px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.live-support-fab:hover {
    transform: scale(1.06) translateY(-2px);
    border-color: rgba(251, 146, 60, 0.35);
    background: linear-gradient(145deg, #222938 0%, #10141d 48%, #1a2230 100%);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.6),
        0 0 24px rgba(251, 146, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.live-support-fab.is-open {
    transform: scale(0.95);
}

.live-support-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.live-support-panel {
    position: absolute;
    bottom: calc(56px + 14px);
    right: 0;
    width: min(380px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    animation: lsSlideUp 0.25s ease;
}

.live-support-panel[hidden] {
    display: none !important;
}

@keyframes lsSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.live-support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.live-support-head strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.live-support-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.live-support-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: lsPulse 2s ease infinite;
}

@keyframes lsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-support-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.live-support-close:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.live-support-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    min-height: 0;
}

.live-support-welcome p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}



.live-support-guest-form label {
    display: block;
    margin-bottom: 12px;
}

.live-support-guest-form label span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.live-support-guest-form label em {
    font-weight: 400;
    font-style: normal;
    opacity: 0.75;
}

.live-support-guest-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.live-support-guest-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.live-support-start-btn {
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.live-support-login-hint {
    margin-top: 12px;
    font-size: 12px;
    text-align: center;
    color: var(--text-muted);
}

.live-support-login-hint a {
    color: var(--accent);
    font-weight: 600;
}

.live-support-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-support-messages:not([hidden]) {
    display: flex;
}

.ls-bubble-wrap {
    display: flex;
    flex-direction: column;
    max-width: 88%;
}

.ls-bubble-wrap.ls-mine {
    align-self: flex-end;
    align-items: flex-end;
}

.ls-bubble-wrap.ls-theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.ls-bubble-wrap.ls-system {
    align-self: center;
    max-width: 95%;
    align-items: center;
}

.ls-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.ls-mine .ls-bubble {
    background: var(--accent);
    color: #041210;
    border-bottom-right-radius: 4px;
}

.ls-theirs .ls-bubble {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.ls-system .ls-bubble {
    background: rgba(0, 212, 170, 0.08);
    border: 1px dashed rgba(0, 212, 170, 0.25);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.ls-bubble-wrap time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    opacity: 0.8;
}

.live-support-compose {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.live-support-compose:not([hidden]) {
    display: flex;
}

.live-support-compose input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.live-support-compose input:focus {
    outline: none;
    border-color: var(--accent);
}

.live-support-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #041210;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.live-support-send:hover {
    transform: scale(1.05);
}

.live-support-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* LiveChat aktiv — yalnız xüsusi qara launcher */
.live-support--livechat .live-support-fab {
    z-index: 201;
}

body.epin-lc-custom-launcher #chat-widget-container {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.epin-lc-custom-launcher.epin-lc-chat-open #chat-widget-container {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .live-support {
        --ls-fab-size: 52px;
        --ls-mobile-nav: 72px;
        bottom: calc(var(--ls-mobile-nav) + 20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        z-index: 200;
    }

    .live-support-fab {
        width: var(--ls-fab-size);
        height: var(--ls-fab-size);
    }

    .live-support-panel {
        width: min(360px, calc(100vw - 24px));
        height: min(480px, calc(100vh - 160px));
        bottom: calc(var(--ls-fab-size) + 12px);
    }
}
