/*
 * Pazarlama sitelerindeki sağ alt WhatsApp / telefon düğmeleri — ortak görünüm (05.11.2026).
 * Yalnız görünüm: bağlantılar, data-track-label ve Ref/dönüşüm ölçümü şablonlarda aynen durur.
 * Kullanan: KurumsalPHP (.whatsapp-fab), google_ads_landing / google_ads_index (.gads-float), layout_master (div.fixed.bottom-6.right-6.z-50.flex-col).
 * Sol alttaki "Sizi arayalım" düğmesi geri arama penceresinin kendi dosyasındadır (callback_widget_embed.js).
 */
@keyframes fcHalo { 0% { transform: scale(1); opacity: .5 } 80%, 100% { transform: scale(1.7); opacity: 0 } }
@keyframes fcNudge { 0%, 78%, 100% { transform: none } 82% { transform: translateY(-5px) } 86% { transform: none } 90% { transform: translateY(-2px) } 94% { transform: none } }

/* WhatsApp — yeşil, beyaz halkalı, nabız gibi atan hale */
html body a.whatsapp-fab,
html body .gads-float a.gads-float-wa,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"] {
    width: 60px; height: 60px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none;
    background: linear-gradient(145deg, #34e07f 0%, #1fb855 55%, #128c4a 100%);
    box-shadow: 0 14px 30px -10px rgba(18, 140, 74, .75), 0 0 0 3px #fff, 0 2px 6px rgba(15, 23, 42, .2);
    animation: fcNudge 7s ease-in-out infinite;
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}
html body a.whatsapp-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90; }
html body a.whatsapp-fab svg,
html body .gads-float a.gads-float-wa svg,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"] svg { width: 31px; height: 31px; position: relative; z-index: 1; }
html body a.whatsapp-fab::before,
html body .gads-float a.gads-float-wa::before,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"]::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; background: #25d366;
    animation: fcHalo 2.8s ease-out infinite; pointer-events: none; z-index: 0;
}
html body .gads-float a.gads-float-wa,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"] { position: relative; }

/* Telefon (sağdaki yığında) — koyu, beyaz halkalı */
html body .gads-float a.gads-float-phone,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"] {
    position: relative; width: 52px; height: 52px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none;
    box-shadow: 0 12px 26px -10px rgba(15, 23, 42, .6), 0 0 0 3px #fff, 0 2px 6px rgba(15, 23, 42, .18);
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
    -webkit-tap-highlight-color: transparent;
}
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"] { background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%); }
html body .gads-float a.gads-float-phone svg,
html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"] svg { width: 24px; height: 24px; }

/* Yığın: düğmeler ortalı, alttan güvenli boşluk */
html body .gads-float,
html body div.fixed.bottom-6.right-6.z-50.flex-col {
    right: 16px !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    align-items: center; gap: 14px !important;
}

/* Masaüstünde üstüne gelince etiket */
@media (hover: hover) and (min-width: 768px) {
    html body a.whatsapp-fab { right: 24px; bottom: 24px; }
    html body .gads-float, html body div.fixed.bottom-6.right-6.z-50.flex-col { right: 24px !important; bottom: 24px !important; }
    html body a.whatsapp-fab:hover,
    html body .gads-float a:hover,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"]:hover,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"]:hover { transform: translateY(-2px) scale(1.06); animation: none; }
    html body a.whatsapp-fab::after,
    html body .gads-float a.gads-float-wa::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"]::after { content: "WhatsApp'tan yazın"; }
    html body .gads-float a.gads-float-phone::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"]::after { content: "Hemen arayın"; }
    html body a.whatsapp-fab::after,
    html body .gads-float a::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"]::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"]::after {
        position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%);
        padding: 9px 14px; border-radius: 12px; white-space: nowrap;
        background: #0f172a; color: #fff; font: 600 14px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
        box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    }
    html body a.whatsapp-fab:hover::after,
    html body .gads-float a:hover::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href*="wa.me"]:hover::after,
    html body div.fixed.bottom-6.right-6.z-50.flex-col > a[href^="tel:"]:hover::after { opacity: 1; transform: translate(0, -50%); }
}

/* KurumsalPHP: yukarı çık düğmesi WhatsApp'ın üstünde, çakışmasın */
html body .back-to-top { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); right: 26px; }
@media (hover: hover) and (min-width: 768px) { html body .back-to-top { bottom: 100px; right: 34px; } }

@media (prefers-reduced-motion: reduce) {
    html body a.whatsapp-fab, html body .gads-float a, html body div.fixed.bottom-6.right-6.z-50.flex-col > a { animation: none !important; }
    html body a.whatsapp-fab::before, html body .gads-float a::before, html body div.fixed.bottom-6.right-6.z-50.flex-col > a::before { animation: none !important; display: none; }
}
@media print { html body .gads-float, html body div.fixed.bottom-6.right-6.z-50.flex-col, html body a.whatsapp-fab { display: none !important; } }
