/* Marinos Chatbot Widget CSS */

#marinos-chat-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Yanıp sönen bildirim noktası */
#mc-pulse-dot {
    position: absolute;
    bottom: 52px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #ff3b30;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: mc-pulse 1.6s ease-in-out infinite;
    z-index: 2;
}

@keyframes mc-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.45); opacity: 0.6; }
}

/* Toggle butonu */
#marinos-chat-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--mc-color, #1a73e8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.28);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: auto;
    animation: mc-glow 2s infinite;
}

/* YENİ: Dinamik renk ile parlayan gölge animasyonu */
@keyframes mc-glow {
    0% { box-shadow: 0 4px 20px rgba(0,0,0,0.28), 0 0 0 0 var(--mc-color); }
    70% { box-shadow: 0 4px 20px rgba(0,0,0,0.28), 0 0 0 15px transparent; }
    100% { box-shadow: 0 4px 20px rgba(0,0,0,0.28), 0 0 0 0 transparent; }
}

#marinos-chat-toggle:hover {
    transform: scale(1.08);
}

/* Chat kutusu */
#marinos-chat-box {
    position: absolute;
    bottom: 78px;
    right: 0;
    width: 340px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: mc-slidein 0.25s ease;
}

#marinos-chat-box.mc-hidden {
    display: none !important;
}

@keyframes mc-slidein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
#mc-header {
    background: var(--mc-color, #1a73e8);
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
#mc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#mc-title {
    flex: 1;
}
#mc-title strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
}
#mc-title span {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Yeşil yanıp sönen online noktası */
#mc-online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: mc-online-pulse 2s ease-in-out infinite;
}

@keyframes mc-online-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    50%  { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
#mc-minimize {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#mc-minimize:hover { opacity: 1; }

/* Mesaj alanı */
#mc-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--mc-padding, 16px 14px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--mc-bg, #f8f9fb);
}

/* GELİŞMİŞ MESAJ BALONCUKLARI */
.mc-msg {
    max-width: 82%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}
.mc-msg.bot {
    background: #ffffff;
    color: #1a1a2e;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.mc-msg.bot::before {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 0;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-bottom-right-radius: 12px;
    z-index: -1;
}
.mc-msg.user {
    background: var(--mc-color, #1a73e8);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.mc-msg.user::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 0;
    width: 12px;
    height: 12px;
    background: var(--mc-color, #1a73e8);
    border-bottom-left-radius: 12px;
    z-index: -1;
}

/* AKICI YAZIYOR GÖSTERGESİ */
.mc-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    position: relative;
}
.mc-typing::before {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 0;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-bottom-right-radius: 12px;
    z-index: -1;
}
.mc-typing span {
    width: 6px;
    height: 6px;
    background: #8e8e93;
    border-radius: 50%;
    animation: mc-wave 1.4s infinite ease-in-out both;
}
.mc-typing span:nth-child(1) { animation-delay: -0.32s; }
.mc-typing span:nth-child(2) { animation-delay: -0.16s; }
.mc-typing span:nth-child(3) { animation-delay: 0s; }

@keyframes mc-wave {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* HIZLI CEVAP BUTONLARI */
.mc-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
    align-self: flex-start;
    animation: mc-slidein 0.3s ease forwards;
}

.mc-quick-reply-btn {
    background: transparent;
    border: 1px solid var(--mc-color, #1a73e8);
    color: var(--mc-color, #1a73e8);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.mc-quick-reply-btn:hover {
    background: var(--mc-color, #1a73e8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* WhatsApp bar */
#mc-whatsapp-bar {
    background: #f0fdf4;
    border-top: 1px solid #d1fae5;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #166534;
}
#mc-whatsapp-btn {
    background: #25d366;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}
#mc-whatsapp-btn:hover { background: #1db954; }

/* Input alanı */
#mc-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #eee;
    background: #fff;
}
#mc-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.2s;
}
#mc-input:focus { border-color: var(--mc-color, #1a73e8); }
#mc-send {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--mc-send-color, var(--mc-color, #1a73e8));
    min-width: 40px;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#mc-send svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
#mc-send:hover    { opacity: 0.88; }
#mc-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* Mobil */
@media (max-width: 480px) {
    #marinos-chat-box {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 76px;
        max-height: 70vh;
    }
    #marinos-chat-wrapper {
        bottom: 16px;
        right: 16px;
    }
}

/* İletişim bar — inaktivite tetikleyici */
#mc-contact-bar {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-self: flex-start;
    flex-wrap: wrap;
}
#mc-phone-btn,
#mc-wa-contact-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}
#mc-phone-btn {
    background: var(--mc-color, #1a73e8);
    color: #fff;
}
#mc-wa-contact-btn {
    background: #25d366;
    color: #fff;
}
#mc-phone-btn:hover,
#mc-wa-contact-btn:hover { opacity: 0.88; }

/* TEMA ÇAKIŞMALARINI ÖNLEME (İKONLARI ZORLA GÖSTER) */
#marinos-chat-toggle svg,
#mc-send svg,
#mc-avatar svg {
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 20px !important;
}

/* Gönder butonu ikon rengini panelden dinamik çek */
#mc-send svg path {
    fill: var(--mc-send-icon-color, #ffffff) !important;
}

#mc-icon-close[style*="display: none"] {
    display: none !important;
}