/* Exupp Chat Widget Styles */

/* Chat toggle button */
.chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9999;
}

.chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-toggle .material-symbols-outlined {
    font-size: 28px;
    color: white;
}

/* Chat container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    font-family: 'Poppins', sans-serif;
}

.chat-container.open {
    display: flex;
}

/* Chat header */
.chat-header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.chat-header .material-symbols-outlined {
    font-size: 24px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

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

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

/* Individual messages */
.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.chat-message.error {
    background: #ffebee;
    color: #c62828;
}

/* Typing indicator */
.chat-typing {
    align-self: flex-start;
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: none;
}

.chat-typing.visible {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Chat input area */
.chat-input-area {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #ff9800;
}

.chat-input::placeholder {
    color: #999;
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send .material-symbols-outlined {
    font-size: 20px;
    color: white;
}

/* Welcome message */
.chat-welcome {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.chat-welcome h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 400;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-container {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .chat-toggle {
        bottom: 16px;
        right: 16px;
    }
}
