/* ==========================================================================
   WEBGUIDE CHATBOT (YÜZEN İLETİŞİM ÇUBUĞU) - CSS
   ========================================================================== */

/* Masaüstü Görünüm: Ekranın sol ortasına yapışık.
*/
.wg-chatbot-wrapper {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 99999;
    pointer-events: none; /* Arkaplana tıklanabilmesi için */
}

.wg-chat-btn {
    pointer-events: auto; /* Sadece butonlar tıklanabilir */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.wg-chat-btn svg {
    width: 26px;
    height: 26px;
    transition: transform 0.3s ease;
}

/* --- TOOLTIP (Masaüstünde Hover Olunca Soldan Çıkan Yazı) --- */
.wg-chat-tooltip {
    position: absolute;
    left: 80px; /* Butonun sağından dışarı */
    background: #1e293b;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    pointer-events: none;
}

/* Tooltip Oku */
.wg-chat-tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #1e293b transparent transparent;
}

/* --- MASAÜSTÜ HOVER EFEKTLERİ VE RENKLER --- */
.wg-chat-btn:hover {
    transform: scale(1.1);
}

.wg-chat-btn:hover .wg-chat-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Telefon (Mavi) */
.wg-phone-btn { color: #3b82f6; }
.wg-phone-btn:hover { background-color: #3b82f6; color: #fff; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4); }

/* WhatsApp (Yeşil) */
.wg-wa-btn { color: #10b981; }
.wg-wa-btn:hover { background-color: #10b981; color: #fff; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4); }

/* Form (Turuncu/Sarı) */
.wg-form-btn { color: #f59e0b; }
.wg-form-btn:hover { background-color: #f59e0b; color: #fff; box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4); }


/* ==========================================================================
   MOBİL GÖRÜNÜM (APP BAR - FOOTER'A YAPIŞIK)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Mobil alt kısım butonlarla kapanmasın diye body'e padding ekliyoruz */
    body {
        padding-bottom: 75px !important;
    }

    .wg-chatbot-wrapper {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 10px 0;
        /* iPhone gibi çentikli cihazların alt güvenli alanı için */
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08);
        gap: 0;
        pointer-events: auto; /* Konteyner tıklanabilir olayları yakalamalı */
        animation: slideUpNav 0.5s ease forwards;
    }

    @keyframes slideUpNav {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Mobilde Butonları Dönüştür */
    .wg-chat-btn {
        width: auto;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        border: none;
        flex: 1;
        flex-direction: column;
        gap: 6px;
    }

    .wg-chat-btn:hover {
        transform: none;
        background: transparent;
        box-shadow: none;
    }
    
    .wg-chat-btn:active {
        transform: scale(0.95);
    }

    .wg-chat-btn svg {
        width: 24px;
        height: 24px;
    }

    /* Mobilde Text'i Görünür Yap */
    .wg-chat-tooltip {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        padding: 0;
        box-shadow: none;
        font-size: 0.75rem;
        font-weight: 700;
        pointer-events: auto;
    }

    .wg-chat-tooltip::before {
        display: none; /* Oku gizle */
    }

    /* Mobil Kalıcı Renkler */
    .wg-phone-btn, .wg-phone-btn .wg-chat-tooltip { color: #3b82f6; }
    .wg-wa-btn, .wg-wa-btn .wg-chat-tooltip { color: #10b981; }
    .wg-form-btn, .wg-form-btn .wg-chat-tooltip { color: #f59e0b; }
    
    .wg-phone-btn:hover .wg-chat-tooltip,
    .wg-wa-btn:hover .wg-chat-tooltip,
    .wg-form-btn:hover .wg-chat-tooltip {
        color: inherit; /* Hover'da beyaz olmasını engelle */
    }
}