/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: 'Figtree', sans-serif;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color, #2b5c7f);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--secondary-color, #1a3a52);
}

.chat-toggle-btn svg {
    width: 28px;
    height: 28px;
}

.chat-window {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    width: 350px;
    height: 500px;
    background-color: var(--bg-color, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color, #e0e0e0);
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.chat-header {
    background-color: var(--primary-color, #2b5c7f);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.chat-messages {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-color, #f9f9f9);
}

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

.message.assistant {
    background-color: var(--surface-color, #e8f0fe);
    color: var(--text-color, #333);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

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

.message.loading {
    color: #888;
    font-style: italic;
}

.chat-input-form {
    display: flex;
    padding: 12px;
    background-color: var(--bg-color, #ffffff);
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.chat-input-form input {
    flex-grow: 1;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
}

.chat-input-form input:focus {
    border-color: var(--primary-color, #2b5c7f);
}

.chat-input-form button {
    background-color: var(--primary-color, #2b5c7f);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-form button:hover {
    background-color: var(--secondary-color, #1a3a52);
}

.chat-input-form button svg {
    width: 18px;
    height: 18px;
}

/* Dark mode adjustments */
body.dark-mode .chat-window {
    background-color: #1e1e1e;
    border-color: #333;
}
body.dark-mode .chat-messages {
    background-color: #121212;
}
body.dark-mode .message.assistant {
    background-color: #2c2c2c;
    color: #e0e0e0;
}
body.dark-mode .chat-input-form {
    background-color: #1e1e1e;
    border-color: #333;
}
body.dark-mode .chat-input-form input {
    background-color: #2c2c2c;
    color: #fff;
    border-color: #444;
}
