/* Chat Widget CSS */
:root {
    --chat-primary: #6D1615;
    --chat-secondary: #f4f7f6;
    --chat-text: #333;
    --chat-bg: #ffffff;
    --chat-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.chat-widget-container {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 9999;
    font-family: 'Catamaran', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--chat-shadow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    color: white;
    font-size: 24px;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--chat-bg);
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

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

.chat-header {
    background: linear-gradient(135deg, var(--chat-primary) 0%, #4a0f0e 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header .avatar {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.5);
}

.chat-header-info h4 {
    margin: 0;
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.chat-header-info span {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-header-info span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.bot {
    background: #eee;
    color: var(--chat-text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-message.user {
    background: var(--chat-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#chatEmail {
    border: 1px solid #eee;
    padding: 8px 12px;
    border-radius: 10px;
    outline: none;
    font-size: 13px;
    transition: all 0.3s;
    background: #f9f9f9;
}

#chatEmail:focus {
    border-color: var(--chat-primary);
    background: #fff;
    box-shadow: 0 0 5px rgba(109, 22, 21, 0.1);
}

.chat-footer input[type="text"] {
    flex: 1;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.chat-footer input[type="text"]:focus {
    border-color: var(--chat-primary);
}

.chat-footer button {
    background: var(--chat-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-footer button:hover {
    background: #4a0f0e;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    display: block;
    text-align: right;
}
