/* ===========================================================================
   Canlı Sohbet Widget — Müşteri Tarafı
   =========================================================================== */

#cs-widget {
    --cs-primary: #0ea5e9;
    --cs-primary-dark: #0284c7;
    --cs-bg: #ffffff;
    --cs-border: #e2e8f0;
    --cs-muted: #64748b;
    --cs-text: #0f172a;
    --cs-bubble-customer: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --cs-bubble-admin: #f1f5f9;
    --cs-bubble-system: #fef3c7;
    --cs-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.25);
    position: fixed;
    z-index: 2147483000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--cs-text);
}

/* Üst konumlandırma (whatsapp bottom-right'ta olduğu için çakışmasın) */
#cs-widget,
#cs-launcher,
#cs-panel {
    box-sizing: border-box;
}

#cs-launcher {
    position: fixed;
    right: 24px;
    bottom: 96px; /* WhatsApp butonunun üstünde (bottom:24 + 56 + 16 boşluk). WA yoksa .cs-no-wa ile bottom:24 olur */
    width: 56px;
    height: 56px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transition: transform .2s ease, box-shadow .2s ease;
}
#cs-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}
#cs-launcher:active { transform: scale(0.98); }

.cs-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}
.cs-launcher-icon svg { width: 26px; height: 26px; }
.cs-launcher-label { display: none; }

/* WhatsApp gibi pulse animasyonu */
#cs-launcher::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid #0ea5e9;
    opacity: .55;
    animation: cs-launcher-pulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes cs-launcher-pulse {
    0%   { transform: scale(.95); opacity: .7; }
    100% { transform: scale(1.25); opacity: 0; }
}

.cs-launcher-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    animation: cs-pulse 1.6s infinite;
}

@keyframes cs-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* WA butonu yoksa canlı destek onun yerine geçer */
#cs-widget.cs-no-wa #cs-launcher { bottom: 24px; }
#cs-widget.cs-no-wa #cs-panel    { bottom: 96px; }

/* Panel — butonun üstünden yukarı doğru açılır */
#cs-panel {
    position: fixed;
    right: 24px;
    bottom: 168px; /* launcher (bottom:96 + 56 yükseklik + 16 gap) */
    width: 380px;
    max-width: calc(100vw - 48px);
    height: min(600px, calc(100vh - 200px));
    background: var(--cs-bg);
    border-radius: 20px;
    box-shadow: var(--cs-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cs-slide 0.25s ease-out;
    border: 1px solid var(--cs-border);
}

@keyframes cs-slide {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cs-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
}
.cs-head-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.cs-head-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.cs-head-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.cs-head-text { display: flex; flex-direction: column; min-width: 0; }
.cs-head-text strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-head-text small  { font-size: 12px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Başlık aksiyonları (arama + küçült) — daima yan yana, taşmaz, net tıklanır butonlar */
.cs-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}
.cs-head-actions button {
    background: rgba(255,255,255,0.14);
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.cs-head-actions button:hover { background: rgba(255,255,255,0.30); }

.cs-screen { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#cs-widget [hidden] { display: none !important; }

/* Kimlik formu */
#cs-screen-identify {
    padding: 20px;
    overflow-y: auto;
}
.cs-welcome { text-align: center; margin-bottom: 16px; }
.cs-welcome-icon { font-size: 40px; margin-bottom: 8px; }
.cs-welcome h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.cs-welcome p  { font-size: 13px; color: var(--cs-muted); margin: 0; }

.cs-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cs-field > span {
    font-size: 13px; font-weight: 600;
    color: #334155;
}
.cs-field > span em { color: #ef4444; font-style: normal; }
.cs-field input {
    padding: 10px 12px;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.cs-field input:focus { border-color: var(--cs-primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }

/* Telefon maskesi prefix */
.cs-tel-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    overflow: hidden;
}
.cs-tel-wrap:focus-within {
    border-color: var(--cs-primary);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.cs-tel-prefix {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    border-right: 1px solid var(--cs-border);
    flex-shrink: 0;
}
.cs-tel-prefix img { border-radius: 2px; }
.cs-tel-wrap input[type="tel"] {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: transparent;
    font-family: inherit;
    letter-spacing: 0.02em;
}
.cs-tel-wrap input[type="tel"]:focus { box-shadow: none; }

.cs-primary-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.cs-primary-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 15px -3px rgba(14,165,233,0.4); }
.cs-primary-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.cs-legal {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: var(--cs-muted);
}

.cs-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Sohbet ekranı */
.cs-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cs-chat-body::-webkit-scrollbar { width: 6px; }
.cs-chat-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.cs-msg { display: flex; flex-direction: column; max-width: 80%; }
.cs-msg.cs-from-customer { align-self: flex-end; align-items: flex-end; }
.cs-msg.cs-from-admin    { align-self: flex-start; align-items: flex-start; }
.cs-msg.cs-from-system   { align-self: center; max-width: 90%; align-items: center; }

/* Avatar + bubble satırı */
.cs-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}
.cs-from-customer .cs-msg-row { flex-direction: row-reverse; }
.cs-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}
.cs-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-avatar-admin.cs-avatar-def { background: var(--cs-primary); color: #fff; }
.cs-avatar-customer { background: #0ea5e9; color: #fff; }

.cs-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.cs-from-customer .cs-bubble {
    background: var(--cs-bubble-customer);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.cs-from-admin .cs-bubble {
    background: var(--cs-bubble-admin);
    color: #0f172a;
    border-bottom-left-radius: 4px;
}
.cs-from-system .cs-bubble {
    background: var(--cs-bubble-system);
    color: #92400e;
    font-size: 12px;
    border-radius: 10px;
    text-align: center;
}
.cs-meta {
    font-size: 11px;
    color: var(--cs-muted);
    margin-top: 4px;
    padding: 0 6px;
}

/* Görüldü çift-tik */
.cs-tik {
    display: inline-block;
    margin-left: 4px;
    color: #64748b;
    font-weight: 700;
}
.cs-tik-seen { color: #0ea5e9; }
.cs-gorulduLabel { color: #0ea5e9; font-weight: 600; }

.cs-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px 8px;
    color: var(--cs-muted);
    font-size: 12px;
}
.cs-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--cs-muted);
    animation: cs-typing 1.2s infinite;
}
.cs-typing span:nth-child(2) { animation-delay: 0.2s; }
.cs-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cs-typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
.cs-typing em { font-style: normal; margin-left: 4px; }

.cs-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--cs-border);
    background: #ffffff;
}
#cs-compose-input {
    flex: 1;
    resize: none;
    max-height: 120px;
    padding: 10px 14px;
    border: 1px solid var(--cs-border);
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}
#cs-compose-input:focus {
    border-color: var(--cs-primary);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

/* Kimlik yokken compose kilitli — tıklayınca kimlik formu açılır */
.cs-compose-locked #cs-compose-input {
    cursor: pointer;
    background: #f8fafc;
    color: var(--cs-muted);
}
.cs-compose-locked #cs-compose-input::placeholder { color: #94a3b8; }
.cs-compose-locked .cs-send-btn { opacity: 0.6; pointer-events: none; }
.cs-send-btn {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s;
}
.cs-send-btn:hover { transform: scale(1.05); }
.cs-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Mesai dışı bant */
.cs-offline-banner {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #fde68a;
    text-align: center;
}
.cs-offline-banner i { font-style: normal; }

/* Otomatik karşılama balonu */
#cs-greeting-bubble {
    position: fixed;
    right: 90px;
    bottom: 100px;
    max-width: 260px;
    background: #ffffff;
    color: #0f172a;
    padding: 12px 36px 12px 14px;
    border-radius: 14px;
    box-shadow: 0 15px 40px -10px rgba(15, 23, 42, 0.25);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    animation: cs-slide 0.3s ease-out;
    z-index: 2147482999;
    border: 1px solid var(--cs-border);
}
#cs-greeting-bubble::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 18px;
    border: 8px solid transparent;
    border-left-color: #ffffff;
}
#cs-greeting-bubble p { margin: 0; }
.cs-greeting-close {
    position: absolute;
    top: 4px;
    right: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
}
.cs-greeting-close:hover { background: #f1f5f9; color: #0f172a; }

#cs-widget.cs-no-wa #cs-greeting-bubble { bottom: 28px; }

/* Mobil */
@media (max-width: 768px) {
    #cs-greeting-bubble { right: 80px; bottom: 88px; max-width: 200px; font-size: 12px; }
    #cs-widget.cs-no-wa #cs-greeting-bubble { bottom: 24px; }

    #cs-launcher {
        right: 16px;
        bottom: 84px;
    }
    #cs-panel {
        right: 10px;
        left: 10px;
        bottom: 150px;
        top: 12px;
        width: auto;
        max-width: none;
        height: auto;
        border-radius: 16px;
    }
    #cs-widget.cs-no-wa #cs-launcher { bottom: 16px; }
    #cs-widget.cs-no-wa #cs-panel    { bottom: 84px; }

    /* Kimlik formu — "Sohbete Başla" butonu sticky altta kalsın */
    #cs-screen-identify {
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    #cs-screen-identify .cs-welcome {
        padding: 18px 18px 6px;
        flex-shrink: 0;
        margin-bottom: 10px;
    }
    #cs-screen-identify #cs-identify-form {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 0 18px 18px;
        display: flex;
        flex-direction: column;
    }
    #cs-screen-identify #cs-identify-form .cs-primary-btn {
        position: sticky;
        bottom: 0;
        margin-top: 8px;
        z-index: 3;
        box-shadow: 0 -10px 16px -6px rgba(255,255,255,0.95),
                    0 6px 14px -3px rgba(14,165,233,0.45);
    }
    #cs-screen-identify .cs-legal {
        margin-top: 8px;
        padding-bottom: 4px;
    }

    /* Admin inisiyatifli kimlik tamamlama formu için de aynı mantık */
    #cs-identity-prompt {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        max-height: 65% !important;
    }
    #cs-identity-complete-form {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        padding-right: 2px;
    }
    #cs-identity-complete-submit {
        position: sticky;
        bottom: 0;
        margin-top: 8px;
        z-index: 3;
        box-shadow: 0 -10px 16px -6px rgba(248,250,252,0.95),
                    0 6px 14px -3px rgba(14,165,233,0.45);
    }
}

/* Admin inisiyatifli sohbet — kimlik tamamlama formu (chat ekranı içinde) */
.cs-identity-prompt {
    padding: 14px 16px 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    max-height: 56%;
    overflow-y: auto;
}

/* Doğrulama modu — kimlik formu TÜM sohbet alanını kaplasın,
   mesajlar ve compose gizlensin (dar ekranlarda tüm alanlar görünsün) */
#cs-screen-chat.cs-dogrulama-modu #cs-messages,
#cs-screen-chat.cs-dogrulama-modu #cs-typing,
#cs-screen-chat.cs-dogrulama-modu #cs-durum-banner,
#cs-screen-chat.cs-dogrulama-modu #cs-compose-form {
    display: none !important;
}
#cs-screen-chat.cs-dogrulama-modu .cs-identity-prompt {
    flex: 1 1 auto !important;
    max-height: none !important;
    border-top: none !important;
    padding: 18px 18px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0;
}
#cs-screen-chat.cs-dogrulama-modu #cs-identity-complete-form {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0;
    display: flex !important;
    flex-direction: column !important;
    padding-right: 2px;
}
#cs-screen-chat.cs-dogrulama-modu #cs-identity-complete-submit {
    position: sticky;
    bottom: 0;
    margin-top: 10px;
    z-index: 3;
    box-shadow: 0 -10px 16px -6px rgba(248,250,252,0.95),
                0 6px 14px -3px rgba(14,165,233,0.45);
}
.cs-identity-banner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.cs-identity-banner strong { display: block; font-size: 14px; color: #0f172a; margin-bottom: 4px; }
.cs-identity-banner p      { margin: 0; font-size: 12.5px; color: #475569; line-height: 1.4; }
#cs-identity-complete-form .cs-field { margin-bottom: 8px; }
#cs-identity-complete-submit { margin-top: 4px; }

/* ===========================================================================
   Anlık akış + güven göstergeleri (temsilci çevrimiçi, bağlantı, tekrar gönder)
   =========================================================================== */

/* Temsilci çevrimiçi noktası — başlık avatarının köşesinde (WhatsApp tarzı) */
.cs-head-avatar { position: relative; }
.cs-presence-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;            /* çevrimdışı (gri) */
    border: 2px solid var(--cs-primary, #0ea5e9);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.85);
    transition: background-color .25s ease;
}
.cs-presence-dot.online {
    background: #22c55e;            /* çevrimiçi (yeşil) */
    animation: cs-presence-pulse 2s ease-out infinite;
}
@keyframes cs-presence-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55), 0 0 0 1px rgba(255,255,255,0.85); }
    70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0),  0 0 0 1px rgba(255,255,255,0.85); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0),    0 0 0 1px rgba(255,255,255,0.85); }
}

/* Bağlantı yeniden kuruluyor bandı */
.cs-conn-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12.5px;
    font-weight: 600;
    border-bottom: 1px solid #fed7aa;
}
.cs-conn-spin {
    width: 13px;
    height: 13px;
    border: 2px solid #fdba74;
    border-top-color: #ea580c;
    border-radius: 50%;
    animation: cs-conn-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes cs-conn-spin { to { transform: rotate(360deg); } }

/* "Tekrar gönder" düğmesi (başarısız müşteri mesajı altında) */
.cs-retry-btn {
    background: transparent;
    border: none;
    color: var(--cs-primary, #0ea5e9);
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
}
.cs-retry-btn:hover { color: var(--cs-primary-dark, #0284c7); }

/* Kurumsal tasarımda odak halkası da marka rengine uysun (klasikte dokunma) */
body[data-tasarim="kurumsal"] .cs-field input:focus,
body[data-tasarim="kurumsal"] .cs-tel-wrap:focus-within,
body[data-tasarim="kurumsal"] #cs-compose-input:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(30, 74, 138, 0.18);                          /* eski tarayıcı fallback */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600) 18%, transparent);
}

/* Hareket azaltma tercihi — animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
    #cs-launcher::before,
    .cs-launcher-badge,
    .cs-presence-dot.online,
    .cs-conn-spin,
    .cs-typing span { animation: none !important; }
    #cs-panel { animation: none !important; }
}

/* ===========================================================================
   Sesli Arama (WebRTC) — buton + overlay + banka tarzı arama ekranı
   =========================================================================== */
#cs-arama-btn {
    background: transparent; border: none; color: #fff; cursor: pointer;
    padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s;
}
#cs-arama-btn:hover { background: rgba(255, 255, 255, 0.15); }
#cs-arama-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cs-arama-overlay {
    position: fixed; inset: 0; z-index: 2147483600;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: radial-gradient(circle at 50% 28%, rgba(30, 74, 138, 0.55), rgba(8, 18, 38, 0.85));
    backdrop-filter: blur(7px) saturate(120%);
    -webkit-backdrop-filter: blur(7px) saturate(120%);
    opacity: 0; transition: opacity .2s ease;
}
.cs-arama-overlay.acik { opacity: 1; }

.cs-arama-kart {
    width: 320px; max-width: calc(100vw - 40px);
    background: linear-gradient(160deg, var(--cs-primary, #1e4a8a) 0%, var(--cs-primary-dark, #15376a) 100%);
    border-radius: 24px; padding: 28px 24px 26px; text-align: center; color: #fff;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    position: relative; animation: cs-arama-in .25s ease-out;
}
@keyframes cs-arama-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.cs-arama-guvenli-rozet {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; color: #d1fae5;
    background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.cs-arama-avatar-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.cs-arama-avatar {
    width: 92px; height: 92px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 36px; font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.25);
}
.cs-arama-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cs-arama-kart[data-faz="gelen"] .cs-arama-avatar,
.cs-arama-kart[data-faz="giden"] .cs-arama-avatar { animation: cs-arama-pulse 1.6s ease-out infinite; }
@keyframes cs-arama-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70%  { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.cs-arama-ad { display: block; font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.cs-arama-unvan { font-size: 12.5px; color: rgba(255, 255, 255, 0.78); font-weight: 500; margin-bottom: 6px; }
.cs-arama-durum { font-size: 13.5px; color: rgba(255, 255, 255, 0.85); min-height: 18px; }
.cs-arama-sure {
    font-size: 22px; font-weight: 700; margin-top: 8px;
    font-variant-numeric: tabular-nums; font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 1px;
}
.cs-arama-kalite { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; margin-top: 8px; }
.cs-arama-kalite span { width: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
.cs-arama-kalite span:nth-child(1) { height: 6px; }
.cs-arama-kalite span:nth-child(2) { height: 11px; }
.cs-arama-kalite span:nth-child(3) { height: 16px; }
.cs-arama-kalite[data-seviye="1"] span:nth-child(1) { background: #fca5a5; }
.cs-arama-kalite[data-seviye="2"] span:nth-child(1),
.cs-arama-kalite[data-seviye="2"] span:nth-child(2) { background: #fcd34d; }
.cs-arama-kalite[data-seviye="3"] span { background: #6ee7b7; }

.cs-arama-sesbaslat {
    margin-top: 12px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cs-arama-sesbaslat:hover { background: rgba(255, 255, 255, 0.26); }

.cs-arama-aksiyon { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 24px; }
.cs-arama-yuvarlak {
    width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .12s, filter .12s; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
}
.cs-arama-yuvarlak:hover { transform: scale(1.06); }
.cs-arama-yuvarlak:active { transform: scale(.96); }
.cs-arama-yuvarlak.kabul { background: #22c55e; animation: cs-arama-kabul-pulse 1.6s infinite; }
@keyframes cs-arama-kabul-pulse {
    0%   { box-shadow: 0 8px 20px -6px rgba(0,0,0,.5), 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70%  { box-shadow: 0 8px 20px -6px rgba(0,0,0,.5), 0 0 0 14px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 8px 20px -6px rgba(0,0,0,.5), 0 0 0 0 rgba(34, 197, 94, 0); }
}
.cs-arama-yuvarlak.reddet { background: #ef4444; }
.cs-arama-yuvarlak.sustur { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); }
.cs-arama-yuvarlak.sustur.aktif { background: #fff; color: var(--cs-primary, #1e4a8a); }
.cs-arama-yuvarlak.hoparlor { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); }
.cs-arama-yuvarlak.hoparlor.aktif { background: #fff; color: var(--cs-primary, #1e4a8a); }
.cs-arama-yuvarlak.hoparlor[hidden] { display: none; }

@media (max-width: 768px) {
    .cs-arama-kart { width: 100%; max-width: 360px; padding: 32px 24px; border-radius: 28px; }
    .cs-arama-yuvarlak { width: 66px; height: 66px; }
    .cs-arama-aksiyon { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .cs-arama-kart, .cs-arama-kart[data-faz] .cs-arama-avatar, .cs-arama-yuvarlak.kabul { animation: none !important; }
}
