/* TOV EDU Chat Widget CSS */
:root {
    --tov-blue: #004080; /* Example TOV identity color */
    --tov-light-blue: #e6f0fa;
    --msg-user-bg: #004080;
    --msg-user-text: #ffffff;
    --msg-bot-bg: #f1f1f1;
    --msg-bot-text: #333333;
    --font-family: 'Suit', sans-serif; /* Example font */
}

/* Floating Button */
@keyframes tov-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 64, 128, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 64, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 64, 128, 0); }
}

.tov-chat-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background-color: var(--tov-blue);
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: tov-pulse 2s infinite;
}

.tov-chat-launcher:hover {
    transform: scale(1.1);
    animation: none;
}

.tov-chat-launcher svg {
    width: 36px;
    height: 36px;
    fill: white;
}

/* Chat Container */
.tov-chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px; /* Max height */
    max-height: 80vh;
    background-color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
}

.tov-chat-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header */
.tov-chat-header {
    background-color: var(--tov-blue);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tov-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tov-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Messages Area */
.tov-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tov-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.tov-msg.bot {
    align-self: flex-start;
    background-color: var(--msg-bot-bg);
    color: var(--msg-bot-text);
    border-bottom-left-radius: 2px;
}

.tov-msg.user {
    align-self: flex-end;
    background-color: var(--msg-user-bg);
    color: var(--msg-user-text);
    border-bottom-right-radius: 2px;
}

/* Quick Replies */
.tov-quick-replies {
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #fafafa;
}

.tov-quick-chip {
    background-color: white;
    border: 1px solid var(--tov-blue);
    color: var(--tov-blue);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.tov-quick-chip:hover {
    background-color: var(--tov-light-blue);
}

/* Input Area */
.tov-chat-input-area {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background-color: white;
}

.tov-chat-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.tov-chat-input-area input:focus {
    border-color: var(--tov-blue);
}

.tov-chat-send-btn {
    background-color: var(--tov-blue);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tov-chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
    margin-left: 2px;
}

/* Footer Link */
.tov-footer {
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    padding: 4px;
    background-color: #fafafa;
}
