
/* WebPixLab WhatsApp Chat Pro - Frontend Styles */

.wpl-wa-widget {
    position: fixed;
    z-index: 999990;
    bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wpl-wa-widget.wpl-pos-right {
    right: 24px;
}

.wpl-wa-widget.wpl-pos-left {
    left: 24px;
}

/* Floating Button */
.wpl-wa-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25d366;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    outline: none;
    padding: 0;
}

.wpl-wa-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.wpl-wa-btn.wpl-extended {
    width: auto;
    border-radius: 30px;
    padding: 0 20px 0 16px;
    gap: 8px;
}

.wpl-wa-btn-label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.2px;
}

.wpl-wa-btn svg {
    display: block;
    width: 32px;
    height: 32px;
    fill: #ffffff;
    pointer-events: none;
}

.wpl-wa-btn.wpl-extended svg {
    width: 22px;
    height: 22px;
}

/* Ripple animation removed for clean modern look */

/* Notification Badge */
.wpl-wa-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    animation: wpl-bounce 1.5s infinite;
}

@keyframes wpl-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Callout Bubble */
.wpl-wa-callout {
    position: absolute;
    bottom: 74px;
    right: 0;
    background: #ffffff;
    color: #1e293b;
    padding: 10px 30px 10px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    border: 1px solid #e2e8f0;
}

.wpl-pos-left .wpl-wa-callout {
    right: auto;
    left: 0;
}

.wpl-wa-callout.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wpl-wa-callout-close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}

.wpl-wa-callout-close:hover {
    color: #475569;
}

/* Chat Popup Modal */
.wpl-wa-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(15px);
    transform-origin: bottom right;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    border: 1px solid #e2e8f0;
}

.wpl-pos-left .wpl-wa-popup {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

.wpl-wa-popup.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* Popup Header */
.wpl-wa-popup-header {
    background: linear-gradient(135deg, #095228 0%, #128c7e 100%);
    color: #ffffff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpl-wa-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpl-wa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.wpl-wa-popup-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.wpl-wa-subtitle {
    margin: 3px 0 0;
    font-size: 12px;
    color: #d1fae5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpl-wa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.wpl-wa-status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.wpl-wa-status-dot.offline {
    background: #fbbf24;
}

.wpl-wa-popup-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
}

.wpl-wa-popup-close:hover {
    opacity: 1;
}

/* Popup Body */
.wpl-wa-popup-body {
    background: #efeae2 url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png') repeat;
    padding: 20px 16px;
    max-height: 280px;
    overflow-y: auto;
}

.wpl-wa-offline-notice {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Speech Bubble */
.wpl-wa-chat-bubble {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    position: relative;
    max-width: 90%;
    margin-left: 6px;
}

.wpl-wa-chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-top: 8px solid #ffffff;
    border-left: 8px solid transparent;
}

.wpl-wa-bubble-author {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #047857;
    margin-bottom: 4px;
}

.wpl-wa-chat-bubble p {
    margin: 0;
    font-size: 13.5px;
    color: #111827;
    line-height: 1.45;
}

.wpl-wa-bubble-time {
    display: block;
    text-align: right;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Multi-Agent Cards */
.wpl-wa-agent-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wpl-wa-agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.wpl-wa-agent-meta strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.wpl-wa-agent-meta small {
    display: block;
    font-size: 11.5px;
    color: #64748b;
}

.wpl-wa-card-arrow {
    color: #25d366;
    font-size: 16px;
    font-weight: bold;
}

/* Popup Footer */
.wpl-wa-popup-footer {
    background: #f0f2f5;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
}

.wpl-wa-btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 16px;
    border-radius: 25px;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
}

.wpl-wa-btn-cta:hover {
    background: #20ba59;
    transform: translateY(-1px);
}

/* Inline Shortcode Button */
.wpl-wa-inline-btn {
    display: inline-flex;
    align-items: center;
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
    transition: background 0.2s ease, transform 0.15s ease;
}

.wpl-wa-inline-btn:hover {
    background: #20ba59;
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wpl-wa-widget {
        bottom: 18px;
    }
    .wpl-wa-widget.wpl-pos-right { right: 18px; }
    .wpl-wa-widget.wpl-pos-left { left: 18px; }
    .wpl-wa-popup {
        width: calc(100vw - 36px);
        right: 0;
        bottom: 74px;
    }
}

.wpl-wa-callout::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffffff;
}

.wpl-pos-left .wpl-wa-callout::after {
    right: auto;
    left: 22px;
}
