/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.chat-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chat-window {
    position: fixed;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f5f5f5;
}

.chat-message {
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    background: white;
    padding: 0.8rem;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.message-bubble.system {
    background: #e3f2fd;
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
    color: #1976d2;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.3rem;
}

.chat-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.chat-input-group select,
.chat-input-group input {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.chat-input-group select:focus,
.chat-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-textarea {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    resize: none;
    min-height: 60px;
    margin-bottom: 0.5rem;
}

.chat-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.chat-submit {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-submit:hover {
    transform: translateY(-2px);
}

.chat-submit:active {
    transform: translateY(0);
}

.chat-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Chat positions */
.chat-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.chat-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.chat-widget.top-right {
    top: 20px;
    right: 20px;
}

.chat-widget.top-left {
    top: 20px;
    left: 20px;
}

.chat-window.bottom-right {
    bottom: 90px;
    right: 20px;
}

.chat-window.bottom-left {
    bottom: 90px;
    left: 20px;
}

.chat-window.top-right {
    top: 90px;
    right: 20px;
}

.chat-window.top-left {
    top: 90px;
    left: 20px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        height: calc(100vh - 100px);
        max-width: 350px;
    }
    
    .chat-window.bottom-right,
    .chat-window.bottom-left,
    .chat-window.top-right,
    .chat-window.top-left {
        bottom: 90px;
        left: 20px;
        right: 20px;
        top: auto;
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}
