/* Lakeland Networks Chatbot – hardened */

/* Links inside the chat stream */
#chatbox a {
    color: #004080;
    text-decoration: underline;
}

/* Bubble + tooltip wrapper (floating) */
#chatbotBubbleWrapper {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99999;
}

#chatbotTooltip {
    background-color: #004080;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    animation: fadeInSlideLeft 0.3s ease-out;
}

#chatbotBubble {
    width: 60px;
    height: 60px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}

#chatbotBubble img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    display: block;
}

@keyframes fadeInSlideLeft {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Main window */
#chatbotWindow {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 500px;
    height: 550px;
    background: #fff;
    color: black;
    border: 1px solid #ccc;
    display: none;
    flex-direction: column;
    z-index: 99998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#chatHeader {
    background-color: #004080;
    color: white;
    padding: 10px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbox {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: white;
    color: black;
    display: flex;
    flex-direction: column;
}

#chatbox h1,
#chatbox h2,
#chatbox h3,
#chatbox h4,
#chatbox h5,
#chatbox h6 {
    color: #004080;
    margin: 8px 0 6px;
    font-weight: 700;
}

#chatbox p {
    margin: 6px 0;
    line-height: 1.45em;
    color: #222;
}

#chatbox .plan-block {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
    background: #fafafa;
}

#chatInput {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 8px;
    background: #f1f1f1;
    gap: 8px;
}

#userInput {
    flex: 1;
    resize: none;
    overflow-y: auto;
    max-height: 150px;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 2.6em;
}

#chatbotSendButton {
    padding: 6px 12px;
    background-color: #004080;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

#chatClose {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#typingIndicator {
    font-style: italic;
    color: #888;
    padding: 5px 10px;
}

#typingIndicator .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top: 2px solid #004080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-message {
    align-self: flex-end;
    max-width: 90%;
    background: #e9f2ff;
    border: 1px solid #cfe2ff;
    padding: 8px 10px;
    margin: 6px 0;
    border-radius: 8px;
    color: #002b5c;
}

.bot-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    max-width: 95%;
}

.bot-message img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px 10px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

#downloadTranscriptBtn {
    background-color: #f1f1f1;
    color: #004080;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

/* Smaller screens */
@media screen and (max-width: 480px) {
    #chatbotWindow {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 100%;
        height: 90vh;
        bottom: 90px;
    }

    #chatbotBubbleWrapper {
        bottom: 20px;
        right: 20px;
    }
}
