/* WhatsApp Plugin Styles */
.whatsapp-plugin {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Position variations */
.whatsapp-plugin.position-bottom-right {
    bottom: 30px;
    right: 30px;
}

.whatsapp-plugin.position-bottom-left {
    bottom: 30px;
    left: 30px;
}

.whatsapp-plugin.position-top-right {
    top: 30px;
    right: 30px;
}

.whatsapp-plugin.position-top-left {
    top: 30px;
    left: 30px;
}

/* Main Button */
.whatsapp-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
}

.whatsapp-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Style variations */
.whatsapp-plugin.style-circle .whatsapp-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
}

.whatsapp-plugin.style-circle .whatsapp-text {
    display: none;
}

.whatsapp-plugin.style-square .whatsapp-button {
    border-radius: 8px;
}

.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup/Modal */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.position-bottom-left .whatsapp-popup {
    right: auto;
    left: 0;
}

.position-top-right .whatsapp-popup {
    bottom: auto;
    top: 80px;
}

.position-top-left .whatsapp-popup {
    bottom: auto;
    top: 80px;
    right: auto;
    left: 0;
}

.whatsapp-plugin.active .whatsapp-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-popup-header {
    background: #339D91;
    color: white ;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.whatsapp-popup-body {
    padding: 20px;
}

.greeting {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 14px;
}

.message-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.message-option {
    padding: 8px 12px;
    background: #f0f2f5;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-option:hover,
.message-option.active {
    background: #25D366;
    border-color: #25D366;
    color: white;
}

.custom-message {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-family: inherit;
}

.custom-message:focus {
    outline: none;
    border-color: #25D366;
}

.department-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    background: white;
    cursor: pointer;
}

.whatsapp-actions {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #25D366;
    color: white;
}

.btn-primary:hover {
    background: #128C7E;
}

.btn-secondary {
    background: #f0f2f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e4e6eb;
}

.whatsapp-popup-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.whatsapp-popup-footer p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
}

.number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.number-option {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.number-option:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-plugin.position-bottom-right,
    .whatsapp-plugin.position-bottom-left {
        bottom: 15px;
    }
    
    .whatsapp-plugin.position-bottom-right {
        right: 15px;
    }
    
    .whatsapp-plugin.position-bottom-left {
        left: 15px;
    }
    
    .whatsapp-popup {
        width: 280px;
    }
    
    .message-options {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button {
    animation: pulse 2s infinite;
}

/* Shortcode button */
.whatsapp-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.whatsapp-shortcode-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
