/* ==================================================
 * SİHİRHOME — Müşteri Bot Widget v75 (2026-05-05)
 * ================================================== */

/* v131BG-CTA: Bot küçük + sağ kenar ortası — yarı gizli pull-tab */
.sh-mbot-fab {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 36px;
    height: 56px;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(135deg, var(--sh-mbot-color, #6366f1), color-mix(in srgb, var(--sh-mbot-color, #6366f1) 70%, #000));
    color: #fff;
    border: 0;
    cursor: pointer;
    box-shadow: -2px 4px 14px rgba(0,0,0,.15);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform .25s, box-shadow .25s, right .25s;
    opacity: .85;
}
.sh-mbot-fab:hover { transform: translateY(-50%) translateX(-3px); opacity: 1; box-shadow: -4px 6px 18px rgba(0,0,0,.22); }
.sh-mbot-fab .sh-mbot-pulse { display: none; } /* Pulse'ı kaldır — sade kalsın */
@keyframes sh-mbot-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}
.sh-mbot-unread {
    position: absolute;
    top: -2px; left: -8px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.sh-mbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all .25s cubic-bezier(.22, 1, .36, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.sh-mbot-window.sh-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.sh-mbot-header {
    background: linear-gradient(135deg, var(--sh-mbot-color, #6366f1), color-mix(in srgb, var(--sh-mbot-color, #6366f1) 70%, #000));
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sh-mbot-header-l { display: flex; align-items: center; gap: 10px; }
.sh-mbot-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.sh-mbot-title { font-weight: 600; font-size: 14px; }
.sh-mbot-status { font-size: 11px; opacity: 0.85; }
.sh-mbot-status::before {
    content: '●'; color: #4ade80; margin-right: 4px;
}
.sh-mbot-close {
    background: none; border: 0; color: #fff;
    font-size: 22px; cursor: pointer; padding: 4px 8px;
    border-radius: 6px; line-height: 1;
}
.sh-mbot-close:hover { background: rgba(255,255,255,.15); }

.sh-mbot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f9fafb, #fff);
}
.sh-mbot-msg {
    margin-bottom: 10px;
    display: flex;
    animation: sh-mbot-in .25s ease-out;
}
@keyframes sh-mbot-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sh-mbot-msg.bot { justify-content: flex-start; }
.sh-mbot-msg.user { justify-content: flex-end; }
.sh-mbot-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    max-width: 78%;
    font-size: 13px;
    line-height: 1.45;
    word-wrap: break-word;
}
.sh-mbot-msg.bot .sh-mbot-bubble {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.sh-mbot-msg.user .sh-mbot-bubble {
    background: var(--sh-mbot-color, #6366f1);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.sh-mbot-bubble a { color: inherit; text-decoration: underline; }
.sh-mbot-typing {
    background: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    display: inline-flex;
    gap: 4px;
}
.sh-mbot-typing span {
    width: 6px; height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: sh-mbot-typing 1.2s infinite;
}
.sh-mbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.sh-mbot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sh-mbot-typing {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.1); }
}

.sh-mbot-quick {
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sh-mbot-quick-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 0;
    border-radius: 999px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}
.sh-mbot-quick-btn:hover { background: var(--sh-mbot-color, #6366f1); color: #fff; }

.sh-mbot-input-area {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}
.sh-mbot-input-area input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}
.sh-mbot-input-area input:focus { border-color: var(--sh-mbot-color, #6366f1); }
.sh-mbot-input-area button {
    background: var(--sh-mbot-color, #6366f1);
    color: #fff;
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background .15s;
}
.sh-mbot-input-area button:hover { background: color-mix(in srgb, var(--sh-mbot-color, #6366f1) 80%, #000); }
.sh-mbot-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

.sh-mbot-footer-meta {
    text-align: center;
    padding: 6px;
    font-size: 10px;
    color: #9ca3af;
    background: #fff;
    border-top: 1px solid #f9fafb;
}

@media (max-width: 480px) {
    .sh-mbot-window { left: 10px; right: 10px; bottom: 86px; width: auto; height: 70vh; }
    .sh-mbot-fab { right: 14px; bottom: 14px; }
}
