/* WhatsApp Floating Button - Same style as chat toggle */
.whatsapp-float {
    position: fixed !important;
    bottom: 95px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    transition: all 0.3s !important;
    color: white !important;
    font-size: 24px !important;
    text-decoration: none !important;
    z-index: 10000 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5) !important;
}

.whatsapp-float i {
    display: inline-block !important;
    font-size: 24px !important;
    color: white !important;
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.whatsapp-toggle {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    color: white;
    font-size: 28px;
    text-decoration: none;
    position: relative;
    z-index: 10000;
}

.whatsapp-toggle i {
    display: inline-block;
    font-size: 28px;
}

.whatsapp-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background: #20BA5A;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    color: white;
    font-size: 24px;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

.chat-window {
    position: absolute;
    bottom: 95px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-header-info i {
    font-size: 1.2rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f7fafc;
}

.chat-welcome {
    text-align: center;
    padding: 2rem 1rem;
    color: #718096;
}

.chat-welcome i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.chat-welcome.login-required i {
    color: #e53e3e;
}

.chat-auth-buttons {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.chat-auth-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    background: #fff;
    transition: all 0.2s ease;
}

.chat-auth-btn.primary {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: #fff;
}

.chat-auth-btn.primary:hover {
    background: #2c5282;
}

.chat-auth-btn.secondary:hover {
    background: #edf2f7;
}

.chat-welcome h4 {
    margin: 0.5rem 0;
    color: #2d3748;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
}

.customer-message {
    justify-content: flex-end;
}

.customer-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    word-wrap: break-word;
}

.admin-message {
    justify-content: flex-start;
}

.admin-message .message-content {
    background: white;
    color: #2d3748;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 18px 4px;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    display: block;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: white;
    border-radius: 0 0 12px 12px;
}

.chat-input-container form {
    display: flex;
    gap: 0.5rem;
}

#chatMessageInput {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

#chatMessageInput:focus {
    border-color: #667eea;
}

#chatSendBtn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#chatSendBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#chatSendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 85px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chat-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 95px;
        right: 10px;
        left: 10px;
    }
    
    .whatsapp-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

