/* Chat Assistant Styles */
:root {
    --chat-primary: #8B0000;
    --chat-secondary: #D4AF37;
    --chat-text: #333;
    --chat-light-text: #777;
    --chat-bg: #fff;
    --chat-light-bg: #f5f5f5;
    --chat-border: #ddd;
    --chat-shadow: rgba(0, 0, 0, 0.1);
    --chat-user-bg: #f0f0f0;
    --chat-bot-bg: #f9f2dd;
    --chat-option-bg: #f9f9f9;
    --chat-option-hover: #eee;
    --chat-transition: all 0.3s ease;
}

/* Chat Widget Container */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
    color: var(--chat-text);
    transform: none !important;
    top: auto !important;
    left: auto !important;
}

/* Chat Icon */
.chat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--chat-shadow);
    transition: var(--chat-transition);
    position: relative;
}

.chat-icon:hover {
    transform: scale(1.1);
    background-color: #a50000;
}

.chat-icon i {
    color: white;
    font-size: 24px;
}

/* Notification Badge */
.chat-icon::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background-color: var(--chat-secondary);
    border-radius: 50%;
    border: 2px solid white;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transform-origin: bottom right;
    transition: var(--chat-transition);
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background-color: var(--chat-primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gold);
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar i {
    color: var(--black);
    font-size: 20px;
}

.chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    opacity: 0.8;
}

.chat-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.8;
    transition: var(--chat-transition);
}

.chat-controls button:hover {
    opacity: 1;
}

/* Chat Body */
.chat-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--chat-light-bg);
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--chat-border);
    border-radius: 3px;
}

/* Message Bubbles */
.chat-message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--chat-bot-bg);
    border-bottom-left-radius: 5px;
    color: var(--chat-text);
}

.user-message {
    align-self: flex-end;
    background-color: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 5px;
}

/* Chat Options */
.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    align-self: flex-start;
}

.chat-option-button {
    background-color: var(--chat-option-bg);
    border: 1px solid var(--chat-border);
    border-radius: 18px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--chat-transition);
    color: var(--chat-text);
    font-family: 'Montserrat', sans-serif;
}

.chat-option-button:hover {
    background-color: var(--chat-option-hover);
    border-color: var(--chat-primary);
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    padding: 15px;
    background-color: var(--chat-light-bg);
    border-top: 1px solid var(--chat-border);
}

.chat-input {
    flex: 1;
    border: 1px solid var(--chat-border);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.chat-input:focus {
    border-color: var(--chat-primary);
}

.chat-send {
    background-color: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--chat-transition);
}

.chat-send:hover {
    background-color: #a50000;
    transform: scale(1.05);
}

/* Links in chat */
.chat-message a {
    color: var(--chat-secondary);
    text-decoration: underline;
    transition: var(--chat-transition);
}

.chat-message a:hover {
    color: var(--chat-primary);
}

.user-message a {
    color: #ffdb8a;
}

.user-message a:hover {
    color: white;
}

/* Responsive Styles */
@media (max-width: 576px) {
    .chat-window {
        width: calc(100vw - 60px);
        height: 450px;
        right: -15px;
    }
    
    .chat-icon {
        width: 50px;
        height: 50px;
    }
    
    .chat-icon i {
        font-size: 20px;
    }
    
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
}

/* Animation for new messages */
@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message, .chat-options {
    animation: messageIn 0.3s ease forwards;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 10px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--chat-light-text);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: typing 1.3s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}
