@charset "utf-8";

/* Container */
#talk-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
	min-height: 430px;
}

#chat-wrapper {
    width: 100%;
}
.chat-appears{
    opacity: 0;
    transform: translateY(10px);
    animation: chatFadeIn 0.35s ease-out forwards;
}

@keyframes chatFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#chat-history {
    margin-bottom: 160px;
}

/* Messages */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 10px 0;
    line-height: 1.5;
}

.message.user {
    background: #d9f0ff;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: #f1f1f1;
    margin-right: auto;
}

/* Input bar */
#chat-input-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    position: static !important;
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto;
    padding: 10px;
    border-top: 1px solid #ddd  !important;
    background-color: white  !important;
}

#chat-input-bar.sticky {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%)  !important;
    width: 100% !important;
    max-width: 700px !important;
    background-color: white;
	border-top: 1px solid #22acdb;
    z-index: 9999;
    /*box-shadow: 0 -2px 10px rgba(0,0,0,0.08);*/
}

/* Branding row */
#chatbot-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-logo img {
    display: inline-block;
}

/* Suggested questions */
#chatbot-questions {
    text-align: center;
    font-size: 14px;
    color: #555;
    width: 50%;
}

/* Input row */
#chatbot-input-row {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: stretch; /* buttons match textarea height */
}

#chat-input {
    flex: 1;
    resize: none;
    overflow-y: auto;
    max-height: 120px;
    padding: 10px;
	background-color:rgb(247, 251, 255);
}
#chat-input:focus {
	background-color:white;
}
/* Buttons */
#chat-input-bar button {
    background-color: #1db3e5;
    color: white;
    border-radius: 0px 10px 10px 0px;
    font-weight: bold;
    border: none;
}
.chatbot-question-item {
	color: #999;
    border: 1px solid #CCC;
    border-radius: 5px;
    text-decoration: none !important;
    padding: 1px;
}
.chatbot-question-item:hover { color: #1db3e5; }
#ec-exit-chatbot{
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 16px;
    background-color: #1db1e1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 9999999;
    display: none;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
#ec-exit-chatbot:hover { color: #1db1e1; background-color:white}
.stan-loading {text-align: center;padding-top: 150px; }
.stan-loading img { width: 120px; opacity: 0.8; animation: stanPulse 1.4s ease-in-out infinite;}

@keyframes stanPulse { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }


/* Responsive (Avada breakpoint) */
@media only screen and (max-width: 800px) {
    #chatbot-questions {
        display: none;
    }
    #chatbot-branding {
        justify-content: flex-start;
    }
}

/* -------------------------------------
   Stan Animations
--------------------------------------*/

/* Thinking fade */
@keyframes stan-thinking-fade {
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}

.stan-thinking {
    animation: stan-thinking-fade 1.2s ease-in-out infinite;
}

/* Error shake */
@keyframes stan-error-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.stan-error {
    animation: stan-error-shake 0.5s ease-in-out;
}
