﻿.wa-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    background: #25d366;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    cursor: pointer;
    z-index: 9999;
    transition: transform .15s ease,box-shadow .15s ease
}

    .wa-fab:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(0,0,0,.28)
    }

    .wa-fab img {
        width: 55px;
        height: 55px;
        display: block
    }

.wa-popup {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease,opacity .25s ease;
    z-index: 10000;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    overflow: visible
}

    .wa-popup.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto
    }

.wa-header {
    background: #25d366;
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px
}

.wa-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800
}

.wa-glyph {
    width: 22px;
    height: 22px;
    display: block
}

.wa-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer
}

    .wa-close:hover {
        background: rgba(0,0,0,.08)
    }

.wa-body {
    background: #f7fff9;
    padding: 16px
}

.wa-bubble {
    display: inline-block;
    background: #fff;
    color: #333;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #eef3ef;
    position: relative;
    box-shadow: 0 1px 0 rgba(0,0,0,.04)
}

    .wa-bubble:after {
        content: "";
        position: absolute;
        left: 12px;
        bottom: -8px;
        width: 16px;
        height: 16px;
        background: #fff;
        border-left: 1px solid #eef3ef;
        border-bottom: 1px solid #eef3ef;
        transform: rotate(45deg)
    }

.wa-footer {
    padding: 14px 16px;
    background: #f7fff9;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    position: relative;
    overflow: visible
}

.wa-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: #fff;
    border: 0;
    border-radius: 26px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37,211,102,.35);
    transition: transform .12s ease,box-shadow .12s ease,filter .12s ease;
    position: relative;
    overflow: visible
}

    .wa-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(37,211,102,.38)
    }

.wa-ic {
    display: block;
    width: 22px;
    height: 22px
}

.plane {
    transform-box: fill-box;
    transform-origin: 20% 50%;
    will-change: transform,opacity
}

/* GIF benzeri efekt: uçak çıkar & geri gelir; buton pulse */
.wa-btn.sending {
    animation: btn-pulse .64s ease
}

    .wa-btn.sending .plane {
        animation: fly-out .32s cubic-bezier(.2,.7,.2,1) forwards, fly-in .32s cubic-bezier(.2,.7,.2,1) .32s forwards;
    }

@keyframes fly-out {
    0% {
        transform: translate(0,0) rotate(0) scale(1);
        opacity: 1
    }

    60% {
        transform: translate(36px,-18px) rotate(8deg) scale(1.06);
        opacity: .96
    }

    100% {
        transform: translate(52px,-26px) rotate(10deg) scale(1.08);
        opacity: .9
    }
}

@keyframes fly-in {
    0% {
        transform: translate(52px,-26px) rotate(10deg) scale(1.08);
        opacity: .95
    }

    100% {
        transform: translate(0,0) rotate(0) scale(1);
        opacity: 1
    }
}

@keyframes btn-pulse {
    0% {
        filter: brightness(1)
    }

    30% {
        filter: brightness(1.08)
    }

    60% {
        filter: brightness(1)
    }

    100% {
        filter: brightness(1)
    }
}

/* Mobile */
@media (max-width:420px) {
    .wa-popup {
        right: 12px;
        left: 12px;
        width: auto
    }

    .wa-fab {
        right: 14px;
        bottom: 14px
    }
}
/* Yazma esnasında yanıp sönen imleç */
.wa-bubble.typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 4px;
    background: #25d366;
    vertical-align: -0.15em;
    animation: wa-caret .9s steps(1,end) infinite;
}

@keyframes wa-caret {
    50% {
        opacity: 0
    }
}
