/**
 * WhatsApp Widget Styles for IT Connect
 * Floating WhatsApp widget and integration styles
 */

/* WhatsApp Floating Widget */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.whatsapp-float-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.whatsapp-float-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-button.active {
    background: #dc3545;
}

.whatsapp-float-button i {
    font-size: 28px;
    color: white;
    transition: all 0.3s ease;
}

.whatsapp-float-button.active i::before {
    content: '\f00d'; /* Font Awesome times icon */
}

/* Pulse Animation */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(37, 211, 102, 0.8);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* Widget Header */
.widget-header {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.widget-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.widget-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.online-status {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.widget-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.widget-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Widget Body */
.widget-body {
    padding: 20px 15px 15px;
    max-height: 400px;
    overflow-y: auto;
}

.chat-messages {
    margin-bottom: 15px;
}

.message {
    margin-bottom: 15px;
}

.bot-message .message-content {
    background: #f1f3f4;
    padding: 12px 15px;
    border-radius: 15px 15px 15px 5px;
    max-width: 80%;
}

.bot-message .message-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.bot-message .message-content p:last-child {
    margin-bottom: 0;
}

.message-time {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.quick-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-btn:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
    transform: translateY(-2px);
}

/* Widget Footer */
.widget-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px;
}

.message-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.message-input-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.message-input-container input:focus {
    border-color: #25d366;
}

.message-input-container button {
    width: 40px;
    height: 40px;
    background: #25d366;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.message-input-container button:hover {
    background: #128c7e;
    transform: scale(1.1);
}

.widget-powered {
    text-align: center;
    font-size: 11px;
    color: #666;
    opacity: 0.7;
}

/* WhatsApp Buttons in Content */
[data-whatsapp],
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 5px;
}

[data-whatsapp]:hover,
.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #25d366);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-content i {
    font-size: 18px;
}

.notification-success .notification-content i {
    color: #28a745;
}

.notification-info .notification-content i {
    color: #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.notification-close:hover {
    background: #f8f9fa;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        width: 320px;
        bottom: 70px;
        right: 10px;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float-button {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float-button i {
        font-size: 24px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .whatsapp-widget {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 70px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .quick-btn {
        font-size: 13px;
        padding: 12px;
    }
}

/* Integration with existing site styles */
.hero-cta [data-whatsapp],
.contact-form [data-whatsapp] {
    margin-left: 10px;
}

/* WhatsApp icon enhancement */
.fab.fa-whatsapp {
    font-size: inherit;
}

/* Smooth scrolling for widget */
.widget-body::-webkit-scrollbar {
    width: 4px;
}

.widget-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.widget-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.widget-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
