/**
 * WhatsApp chat widget: floating button (bottom right) and chat box.
 * Without JavaScript the button is a plain link to wa.me.
 */
.wa-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    color: #ffffff;
    background: #25d366;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.wa-fab:hover,
.wa-fab:focus-visible {
    color: #ffffff;
    background: #1ebe5b;
    transform: scale(1.06);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

.wa-fab:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.45);
    outline-offset: 3px;
}

.wa-fab::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25d366;
    opacity: 0;
    animation: wa-ring 2.4s ease-out infinite;
}

.wa-fab[aria-expanded="true"]::before {
    animation: none;
}

.wa-fab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #ff3b30;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.wa-fab[aria-expanded="true"] .wa-fab-badge {
    display: none;
}

.wa-fab .wa-icon-close {
    display: none;
}

.wa-fab[aria-expanded="true"] .wa-icon-chat {
    display: none;
}

.wa-fab[aria-expanded="true"] .wa-icon-close {
    display: block;
}

@keyframes wa-ring {
    0% { opacity: .6; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.45); }
}

/* Chat box */
.wa-chat {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    width: 340px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    font-family: inherit;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.wa-chat.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
}

.wa-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 18px;
    color: #ffffff;
    background: #075e54;
}

.wa-chat-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #000000 url('/images/logo.png') center / 84% auto no-repeat;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.wa-chat-title {
    flex: 1 1 auto;
    min-width: 0;
}

.wa-chat-title strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.wa-chat-title span {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
}

.wa-chat-close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease;
}

.wa-chat-close:hover,
.wa-chat-close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
}

.wa-chat-body {
    padding: 20px 16px 18px;
    background-color: #efeae2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
    background-size: 14px 14px;
}

.wa-bubble {
    position: relative;
    max-width: 86%;
    padding: 10px 12px 18px;
    font-size: 14px;
    line-height: 1.45;
    color: #111b21;
    background: #ffffff;
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.wa-bubble + .wa-bubble {
    margin-top: 6px;
    border-radius: 10px;
}

.wa-bubble::before {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    border-top: 0 solid transparent;
    border-right: 8px solid #ffffff;
    border-bottom: 10px solid transparent;
}

.wa-bubble + .wa-bubble::before {
    display: none;
}

.wa-bubble-name {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 700;
    color: #075e54;
}

.wa-bubble-time {
    position: absolute;
    right: 10px;
    bottom: 4px;
    font-size: 11px;
    color: #8696a0;
}

.wa-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px 12px;
    background: #f0f2f5;
}

.wa-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    font: inherit;
    font-size: 14px;
    color: #111b21;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
}

.wa-chat-input:focus {
    border-color: #25d366;
}

.wa-chat-send {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #ffffff;
    background: #25d366;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.wa-chat-send:hover,
.wa-chat-send:focus-visible {
    background: #1ebe5b;
    transform: scale(1.05);
}

.wa-chat-note {
    margin: 0;
    padding: 0 14px 12px;
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
    color: #667781;
    background: #f0f2f5;
}

@media (max-width: 575.98px) {
    .wa-fab {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }

    .wa-chat {
        right: 16px;
        bottom: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-fab::before {
        animation: none;
    }

    .wa-chat,
    .wa-chat.is-open {
        transition: none;
    }
}
