/* assets/css/chatbot.css */
#openai-chatbot-container {
    font-family: Arial, sans-serif;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-color, #007cba);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1001; /* Ensure it’s above other elements */
}
#chatbot-toggle img {
    max-width: 100%;
    max-height: 100%;
}

#chatbot-toggle:hover {
    transform: scale(1.05);
}

#chatbot-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

#chatbot-window {
  position: fixed;        /* was absolute */
  right: 20px;            /* align with container */
  bottom: 90px;           /* sit above the round toggle button */
  width: 350px;
  height: 500px;
  background: var(--secondary-color, #ffffff);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s;
  z-index: 2147483647;    /* ensure it’s above badges/headers */
}


#chatbot-window.hidden {
    display: none;
}

#chatbot-header {
    background: var(--primary-color, #007cba);
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-title {
    font-weight: bold;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.message {
    margin-bottom: 15px;
}

.message.user {
    text-align: right;
}

.message.assistant, .message.user {
    display: flex;
}

.content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
}

.message.user .content {
    background: var(--primary-color, #007cba);
    color: white;
}

.message.assistant .content {
    background: white;
    border: 1px solid #ddd;
}

.message.error .content {
    background: #ffdddd;
    color: #cc0000;
}

.hidden { display: none !important; }

#chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#chatbot-send {
    background: var(--primary-color, #007cba);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
}