/* css/whatsapp-widget.css */

/* Floating Button */
.wa-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.wa-trigger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.wa-trigger-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Pulse effect */
.wa-trigger-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: wa-pulse 2s infinite;
    opacity: 0;
    box-sizing: border-box;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Unread Badge */
.wa-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #d4af37;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Chat Window */
.wa-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    transform-origin: bottom right;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wa-chat-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.wa-header {
    background: linear-gradient(135deg, #111111 0%, #1a1a2e 100%);
    padding: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #d4af37; /* Gold accent */
}

.wa-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111111;
    font-weight: 700;
    font-size: 18px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.wa-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background-color: #25D366;
    border: 2px solid #1a1a2e;
    border-radius: 50%;
}

.wa-agent-name {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    line-height: 1.2;
}

.wa-agent-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.wa-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    padding: 5px;
}

.wa-close-btn:hover {
    color: #ffffff;
}

/* Chat Body (WhatsApp chat texture fallback) */
.wa-body {
    background-color: #efeae2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23b3a99a' fill-opacity='0.08'%3E%3Cpath fill-rule='evenodd' d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7z'/%3E%3C/g%3E%3C/svg%3E");
    padding: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.wa-bubble {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 0 12px 12px 12px;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    color: #333333;
}

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

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

/* Footer / Input area */
.wa-footer {
    background-color: #f0f0f0;
    padding: 12px 16px;
}

.wa-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wa-input {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.wa-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 16px;
}

.wa-send-btn:hover {
    background-color: #128C7E;
    transform: scale(1.05);
}
