* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Floating Chat Button - Smaller */
.chat-button {
    position: fixed;
    bottom: 100px; /* Proper spacing above unmute button */
    right: 20px;
    width: 50px; /* Reduced from 60px */
    height: 50px; /* Reduced from 60px */
    background: linear-gradient(135deg, #667eea 0%, #000000 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px; /* Reduced from 24px */
    transition: all 0.3s ease;
    z-index: 1000;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.chat-button.active {
    transform: scale(0.9);
}

/* Unmute Button - Smaller */
.unmute-btn {
    position: fixed;
    bottom: 20px; /* Reduced spacing */
    right: 20px;
    width: 45px; /* Reduced from 60px */
    height: 45px; /* Reduced from 60px */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px; /* Reduced from 24px */
    transition: all 0.3s ease;
    z-index: 1000;
}

.unmute-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Chat Widget Container - Smaller */
.chat-widget {
    position: fixed;
    bottom: 155px; /* Proper spacing above chat button */
    right: 20px;
    width: 280px; /* Reduced from 350px */
    height: 400px; /* Reduced from 500px */
    background: white;
    border-radius: 16px; /* Slightly smaller radius */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    overflow: hidden;
}

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

/* Chat Header - Smaller */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px; /* Reduced from 20px */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced from 12px */
}

.avatar {
    width: 32px; /* Reduced from 40px */
    height: 32px; /* Reduced from 40px */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Reduced from 18px */
}

.header-text h3 {
    font-size: 14px; /* Reduced from 16px */
    margin-bottom: 2px;
}

.header-text p {
    font-size: 11px; /* Reduced from 12px */
    opacity: 0.9;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px; /* Reduced from 20px */
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

/* Chat Messages - Smaller */
.chat-messages {
    height: 260px; /* Reduced from 340px */
    overflow-y: auto;
    padding: 15px; /* Reduced from 20px */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduced from 15px */
}

.message {
    display: flex;
    gap: 8px; /* Reduced from 10px */
    animation: slideIn 0.3s ease;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 26px; /* Reduced from 32px */
    height: 26px; /* Reduced from 32px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px; /* Reduced from 14px */
    flex-shrink: 0;
}

.bot-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-avatar {
    background: #e0e0e0;
    color: #666;
}

.message-content {
    max-width: 70%;
    padding: 10px 14px; /* Reduced from 12px 16px */
    border-radius: 16px; /* Reduced from 18px */
    font-size: 13px; /* Reduced from 14px */
    line-height: 1.4;
}

.bot-message {
    background: #f5f5f5;
    color: #333;
}

.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Quick Replies - Smaller */
.quick-replies {
    padding: 0 15px 8px; /* Reduced padding */
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* Reduced from 8px */
}

.quick-reply {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 16px; /* Reduced from 20px */
    padding: 6px 12px; /* Reduced from 8px 16px */
    font-size: 11px; /* Reduced from 12px */
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Chat Input - Smaller */
.chat-input {
    padding: 15px; /* Reduced from 20px */
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px; /* Reduced from 10px */
    align-items: center;
}

.input-field {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px; /* Reduced from 25px */
    padding: 10px 16px; /* Reduced from 12px 20px */
    font-size: 13px; /* Reduced from 14px */
    outline: none;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    border-color: #667eea;
}

/* Updated Send Button - More stylish design */
.send-btn {
    width: 32px; /* Reduced from 36px */
    height: 32px; /* Reduced from 36px */
    background: linear-gradient(135deg, #0d54a4 0%, #450762 100%);
    border: none;
    border-radius: 8px; /* Changed from circle to rounded square */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    flex-shrink: 0;
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.send-btn:hover::before {
    left: 100%;
}

.send-btn:active { 
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #ccc;
}

.send-btn:disabled::before {
    display: none;
}

/* Send button icon */
.send-btn::after {
    content: '';
    font-weight: bold;
    font-size: 16px;
}

/* Typing Indicator - Smaller */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced from 10px */
    padding: 10px 14px; /* Reduced from 12px 16px */
    background: #f5f5f5;
    border-radius: 16px; /* Reduced from 18px */
    max-width: 70%;
}

.typing-dots {
    display: flex;
    gap: 3px; /* Reduced from 4px */
}

.typing-dot {
    width: 6px; /* Reduced from 8px */
    height: 6px; /* Reduced from 8px */
    background: #999;
    border-radius: 50%;
    animation: typing 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px); /* Reduced from -10px */
        opacity: 1;
    }
}

/* Mobile Responsiveness - Adjusted for smaller sizes */
@media (max-width: 768px) {
    .chat-widget {
        width: 85vw; /* Reduced from 90vw */
        height: 70vh; /* Reduced from 80vh */
        right: 7.5vw;
        bottom: 130px; /* Adjusted for proper spacing */
    }
    
    .chat-button {
        bottom: 90px; /* Proper spacing above unmute button */
        right: 15px;
        width: 40px; /* Even smaller on mobile */
        height: 40px;
        font-size: 16px;
    }
    
    .unmute-btn {
        bottom: 15px; /* Positioned below chat button on mobile */
        right: 15px;
        width: 40px; /* Even smaller on mobile */
        height: 40px;
        font-size: 16px;
    }
}