/* Hallmark Chatbot Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

#chatbot-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
}

/* Launcher */
#chatbot-launcher {
    width: 60px;
    height: 60px;
    background: #112340;
    /* Navy Blue */
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#chatbot-launcher:hover {
    transform: scale(1.05);
}

/* Chat Window */
#chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    border: 1px solid #e1e4e8;
    z-index: 100000;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
#chatbot-header {
    background: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    box-sizing: border-box;
    z-index: 10;
}

.chatbot-header-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Circle */
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.chatbot-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-header-text {
    flex: 1;
}

.sub-title {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.main-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

#chatbot-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    transition: background 0.2s;
}

#chatbot-close:hover {
    background: #e0e0e0;
}

/* Messages Area */
#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f3f4f6;
    /* Optional: Subtle pattern logic could go here */
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: absolute;
    top: 90px;
    bottom: 80px;
    left: 0;
    right: 0;
}

/* Markdown Content Styling */
.chatbot-message p {
    margin: 0 0 8px;
}

.chatbot-message p:last-child {
    margin-bottom: 0;
}

.chatbot-message ul,
.chatbot-message ol {
    margin: 5px 0 10px 20px;
    padding: 0;
}

.chatbot-message li {
    margin-bottom: 4px;
}

.chatbot-message strong {
    font-weight: 600;
}

.chatbot-message a {
    color: #007bff;
    text-decoration: underline;
}

.chatbot-message.user a {
    color: #fff;
}

.chatbot-message code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.chatbot-message pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.chatbot-message {
    max-width: 80%;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.chatbot-message.user {
    align-self: flex-end;
    background: #112340;
    /* Navy Blue */
    color: white;
    border-radius: 18px 18px 4px 18px;
    /* Rounded with sharp bottom-right */
}

.chatbot-message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-radius: 18px 18px 18px 4px;
    /* Rounded with sharp bottom-left */
    border: 1px solid #eee;
}

.chatbot-message.loading {
    align-self: flex-start;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #888;
    font-style: italic;
    font-size: 12px;
    padding: 0;
}

/* Input Area */
#chatbot-input-area {
    padding: 15px 20px;
    background: #f0f2f5;
    /* Light gray footer */
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #e1e4e8;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    box-sizing: border-box;
    z-index: 10;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    /* Pill shape */
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #112340;
}

#chatbot-send {
    background: #112340;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    /* Soft rounded square */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#chatbot-send:hover {
    background: #0d1b33;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        position: fixed;
    }
}