/* ==========================================================================
   SA Facilities — Floating WhatsApp Chat Widget
   ========================================================================== */

#wa-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Launcher button */
.wa-launcher {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    cursor: pointer;
    border: none;
    position: relative;
    -webkit-transition: transform 0.25s ease, box-shadow 0.25s ease;
    -o-transition: transform 0.25s ease, box-shadow 0.25s ease;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wa-launcher:hover {
    -webkit-transform: scale(1.06);
        -ms-transform: scale(1.06);
            transform: scale(1.06);
    box-shadow: 0 8px 26px rgba(37, 211, 102, 0.6);
}

.wa-launcher svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

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

#wa-widget.wa-open .wa-launcher .wa-chat-icon {
    display: none;
}

#wa-widget.wa-open .wa-launcher .wa-close-icon {
    display: block;
}

/* Pulse ring */
.wa-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.55;
    -webkit-animation: wa-pulse-anim 2.2s ease-out infinite;
            animation: wa-pulse-anim 2.2s ease-out infinite;
    z-index: -1;
}

@-webkit-keyframes wa-pulse-anim {
    0% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.5; }
    100% { -webkit-transform: scale(1.9); transform: scale(1.9); opacity: 0; }
}

@keyframes wa-pulse-anim {
    0% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.5; }
    100% { -webkit-transform: scale(1.9); transform: scale(1.9); opacity: 0; }
}

/* Little teaser bubble that appears next to the launcher */
.wa-teaser {
    position: absolute;
    right: 72px;
    bottom: 14px;
    max-width: 220px;
    background: #fff;
    color: #1b1b1b;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    opacity: 0;
    -webkit-transform: translateX(8px);
        -ms-transform: translateX(8px);
            transform: translateX(8px);
    pointer-events: none;
    -webkit-transition: opacity 0.3s ease, transform 0.3s ease;
    -o-transition: opacity 0.3s ease, transform 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wa-teaser.wa-show {
    opacity: 1;
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
    pointer-events: all;
}

.wa-teaser:after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
            transform: rotate(45deg);
}

.wa-teaser-close {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #999;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    pointer-events: all;
}

/* Chat panel */
.wa-panel {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 330px;
    max-width: calc(100vw - 32px);
    background: #e5ddd5;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    -webkit-transform: translateY(16px) scale(0.97);
        -ms-transform: translateY(16px) scale(0.97);
            transform: translateY(16px) scale(0.97);
    pointer-events: none;
    -webkit-transition: opacity 0.25s ease, transform 0.25s ease;
    -o-transition: opacity 0.25s ease, transform 0.25s ease;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#wa-widget.wa-open .wa-panel {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
        -ms-transform: translateY(0) scale(1);
            transform: translateY(0) scale(1);
    pointer-events: all;
}

.wa-panel-header {
    background: #075E54;
    color: #fff;
    padding: 16px 18px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
}

.wa-panel-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    font-weight: 700;
    color: #075E54;
    font-size: 15px;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
}

.wa-panel-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.wa-panel-status {
    font-size: 12px;
    opacity: 0.85;
    margin: 2px 0 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 5px;
}

.wa-panel-status:before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}

.wa-panel-body {
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M0 0h30v30H0zM30 30h30v30H30z'/%3E%3C/g%3E%3C/svg%3E");
}

.wa-msg {
    background: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #111;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    max-width: 90%;
}

.wa-msg-time {
    display: block;
    font-size: 10.5px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.wa-options {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.wa-option-btn {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    text-align: left;
    background: #fff;
    border: 1px solid #d8f0e2;
    color: #075E54;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    -webkit-transition: background 0.2s ease, -webkit-transform 0.15s ease;
    transition: background 0.2s ease, -webkit-transform 0.15s ease;
    -o-transition: background 0.2s ease, transform 0.15s ease;
    transition: background 0.2s ease, transform 0.15s ease;
    transition: background 0.2s ease, transform 0.15s ease, -webkit-transform 0.15s ease;
    text-decoration: none;
}

.wa-option-btn:hover {
    background: #dcf8c6;
    -webkit-transform: translateX(2px);
        -ms-transform: translateX(2px);
            transform: translateX(2px);
}

.wa-option-btn .wa-emoji {
    font-size: 16px;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
}

.wa-panel-footer {
    background: #f0f0f0;
    padding: 12px 16px;
    text-align: center;
}

.wa-start-chat {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: #fff;
    border: none;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    -webkit-transition: background 0.2s ease;
    -o-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.wa-start-chat:hover {
    background: #1ebe57;
}

.wa-panel-note {
    font-size: 10.5px;
    color: #8a8a8a;
    margin: 8px 0 0;
}

@media (max-width: 420px) {
    #wa-widget {
        right: 14px;
        bottom: 14px;
    }
    .wa-panel {
        width: calc(100vw - 28px);
        right: -6px;
    }
    .wa-teaser {
        display: none;
    }
}
