/* StarAmped Chatbot Styles */

/* Chat container */
#chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

#chat-container.chat-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Chat header */
#chat-header {
    background-color: #1a365d; /* primary color */
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

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

/* Chat messages area */
#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message styles */
.bot-message, .user-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.bot-message {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 5px;
}

.user-message {
    align-self: flex-end;
    background-color: #1a365d; /* primary color */
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message p, .user-message p {
    margin: 0;
}

/* Input area */
#chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eaeaea;
    background-color: white;
    position: relative;
    height: 60px;
    z-index: 1001; /* Ensure input area is above other elements */
}

#user-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#user-input:focus {
    border-color: #f6ad55; /* secondary color */
}

#send-button {
    background-color: #f6ad55; /* secondary color */
    color: #1a365d; /* primary color */
    border: none;
    border-radius: 4px; /* Rectangular button */
    padding: 0 15px; /* Horizontal padding */
    height: 40px;
    margin-left: 10px;
    cursor: pointer !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
    z-index: 9999; /* Extremely high z-index to ensure it's above other elements */
    pointer-events: auto !important; /* Force pointer events */
    font-weight: bold; /* Make text bold */
    position: relative; /* Ensure position context */
}

#send-button:hover {
    background-color: #e69c40;
}

/* Chat toggle button */
#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #f6ad55; /* secondary color */
    color: #1a365d; /* primary color */
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: transform 0.3s, background-color 0.3s, display 0.3s;
}

#chat-toggle:hover {
    background-color: #e69c40;
}

/* We don't need any special styling for the active state as we're handling it in JavaScript */

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: #9E9EA1;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
}

.typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
}

.typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #chat-container {
        width: 90%;
        right: 5%;
        bottom: 70px;
    }
}
