/* Floating WhatsApp Widget Styles */

.floating-whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Toggle Button */
.whatsapp-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    color: #ffffff;
    font-size: 28px;
}

.whatsapp-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-toggle-btn:active {
    transform: scale(0.95);
}

.whatsapp-toggle-btn .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #ffffff;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Panel */
.whatsapp-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.whatsapp-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Panel Header */
.whatsapp-panel-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

.whatsapp-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.whatsapp-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.whatsapp-header-text h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.whatsapp-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.whatsapp-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Panel Body */
.whatsapp-panel-body {
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.whatsapp-welcome-message {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.whatsapp-welcome-message p {
    margin: 0;
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
}

/* Quick Actions */
.whatsapp-quick-actions {
    margin-bottom: 1.5rem;
}

.whatsapp-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.whatsapp-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    color: #ffffff;
}

.whatsapp-action-btn i {
    font-size: 20px;
}

.whatsapp-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.contact-item i {
    color: #25D366;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.contact-item span:first-of-type {
    color: #666666;
    flex: 1;
}

.contact-item a,
.contact-item span:last-child {
    color: #25D366;
    font-weight: 600;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Help Section */
.whatsapp-help-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.whatsapp-help-section h6 {
    margin: 0 0 1rem 0;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
}

.help-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-links li {
    margin: 0;
}

.help-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #333333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.help-links a:hover {
    background: #f0f0f0;
    color: #25D366;
}

.help-links a i {
    color: #25D366;
    width: 20px;
    text-align: center;
}

/* Scrollbar Styling */
.whatsapp-panel-body::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-panel-body::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.whatsapp-panel-body::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}

.whatsapp-panel-body::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* RTL Support */
[dir="rtl"] .floating-whatsapp-widget {
    right: auto;
    left: 20px;
}

[dir="rtl"] .whatsapp-panel {
    right: auto;
    left: 0;
}

/* Dark Mode Support */
body.theme-dark-blue .whatsapp-panel,
body.theme-dark .whatsapp-panel {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-dark-blue .whatsapp-welcome-message,
body.theme-dark .whatsapp-welcome-message {
    background: #2d2d2d;
}

body.theme-dark-blue .whatsapp-welcome-message p,
body.theme-dark .whatsapp-welcome-message p {
    color: #ffffff;
}

body.theme-dark-blue .contact-item,
body.theme-dark .contact-item {
    background: #2d2d2d;
}

body.theme-dark-blue .contact-item span:first-of-type,
body.theme-dark .contact-item span:first-of-type {
    color: #aaaaaa;
}

body.theme-dark-blue .whatsapp-help-section,
body.theme-dark .whatsapp-help-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark-blue .whatsapp-help-section h6,
body.theme-dark .whatsapp-help-section h6 {
    color: #ffffff;
}

body.theme-dark-blue .help-links a,
body.theme-dark .help-links a {
    color: #ffffff;
}

body.theme-dark-blue .help-links a:hover,
body.theme-dark .help-links a:hover {
    background: #2d2d2d;
}

/* Responsive */
@media (max-width: 768px) {
    .floating-whatsapp-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-toggle-btn {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .whatsapp-panel {
        width: calc(100vw - 30px);
        max-width: 350px;
        bottom: 76px;
    }
    
    [dir="rtl"] .floating-whatsapp-widget {
        left: 15px;
    }
}

@media (max-width: 480px) {
    .whatsapp-panel {
        width: calc(100vw - 20px);
        right: 0;
    }
    
    [dir="rtl"] .whatsapp-panel {
        left: 0;
    }
}

