/* Basic Archie widget layout and styling */

#archie-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Round owl button */
/* Make the button essentially "just Archie" */
#archie-chat-widget .chat-toggle-button {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
}

/* Control Archie’s size directly */
#archie-chat-widget .chat-toggle-button img.chat-icon {
    width: 64px;   /* bump these up/down to taste: 64, 72, etc. */
    height: 64px;
}

/* Chat window container */
#archie-chat-widget .chat-container {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 320px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 52, 96, 0.1);
}

/* When open */
#archie-chat-widget .chat-container.open {
    display: flex;
}

/* Header */
#archie-chat-widget .chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #0b3b7a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

#archie-chat-widget .chat-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: #ffffff;
    padding: 2px;
}

#archie-chat-widget .close-chat-button {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Body */
#archie-chat-widget .chat-body {
    padding: 10px 12px;
    background: #f5f7fb;
    overflow-y: auto;
    flex: 1;
}

/* Bubbles */
#archie-chat-widget .message-bubble {
    max-width: 90%;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-line; /* <-- respect newlines for paragraphs */
}

#archie-chat-widget .message-bubble.assistant {
    background: #ffffff;
    color: #122231;
    border-radius: 12px 12px 12px 4px;
}

#archie-chat-widget .message-bubble.user {
    background: #0b3b7a;
    color: #ffffff;
    margin-left: auto;
    border-radius: 12px 12px 4px 12px;
}

#archie-chat-widget .chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid rgba(15, 52, 96, 0.12);
}

#archie-chat-widget #chat-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(15, 52, 96, 0.25);
    font-size: 0.95rem;
}

#archie-chat-widget #chat-send-button {
    padding: 10px 16px;
    border-radius: 9999px;
    border: none;
    background: #0b3b7a;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
}

#archie-chat-widget #chat-send-button:disabled {
    opacity: 0.7;
    cursor: default;
}

/* Raise Archie button up and away from wall */
#archie-chat-widget {
    bottom: 32px;
    right: 32px;
}

#archie-chat-widget .chat-container {
    width: 350px;
    max-height: 520px;
}
