#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    min-height:400px;
    z-index: 9999;
    background: white;
    border: 0px solid #ccc;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    transition: all 0.1s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#chatbot-container a:link {
    color:#c00;
}

#chatbot-container a:link:active {
    color:#c00;
}

#chatbot-container a:link:visited {
    color:#c00;
}

#chatbot-header {
    display: flex;
    align-items: center;
    padding: 12px;
    font-size: 16px;
    background: #A6D6E9;
    color: #194866;
    font-weight: bold;
    justify-content: space-between;
    cursor: pointer;
}

#da-money-title {
    display: flex;
    align-items: center;
}

#chatbot-logo {
    width: 44px;
    height: 44px;
    margin-right: 10px;
}

#chatbot-toggle {
    cursor: pointer;
    font-size: 20px;
}



/* Minimized State */
#chatbot-container.minimized {
    background-image: url('../da-money-logo.png');
    background-color: #A6D6E9;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 80px;
    height: 80px;
    min-height: 80px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease-in-out; /* Smooth transition */
}

#chatbot-container.minimized #chatbot-header,
#chatbot-container.minimized #chatbot-messages,
#chatbot-container.minimized input,
#chatbot-container.minimized button {
    display: none;
}

/* Hover effect on minimized state */
#chatbot-container.minimized.hovering {
    background-image: url('../da-money-logo.png');
    background-color: #A6D6E9;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 40px;
    font-weight: bold;
    color: #194866;
    text-align: center;
    line-height: 75px; /* Ensure vertical centering */
    /*animation: bounce 1.5s infinite;*/
    animation: wobble 0.2s infinite alternate ease-in-out;
}

#chatbot-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    flex-grow: 1;
    background: #fff;
    font-size: 14px;
   
    grid-auto-flow: row;       /* ensure vertical flow */
    align-items: start;        /* prevent stretching */
    justify-content: flex-start;       
}

@media (min-width: 1200px) {
    #chatbot-messages {
        padding: 10px 24px;
    }
}

#chatbot-messages p {
	margin: 0px;
}

#chatbot-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#chatbot-input {
    flex: 1;
    padding: 5px;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: #194866;
}

#chatbot-input::placeholder {
    color: #bcbbbb;
}

#chatbot-send {
    background: #194866;
    border: none;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#chatbot-send:hover {
    background: #A6D6E9;
}

#chatbot-send svg {
    width: 20px;
    height: 20px;
    color: white;
}

.user-message {
    background: #FCFCB2;
    color: #0c5460;
    padding: 8px;
    margin: 5px;
    width: fit-content;
    border-radius: 8px;
    border-bottom-right-radius: 0;
    text-align: left;
    margin-left:auto;
    display:flex;
}

.bot-message-wrapper {
    display: flex;
    align-items: flex-end; /* Align the logo to the bottom */
    max-width: 100%;
    margin: 5px 5px 12px 5px;
}

@media (min-width: 1200px) {
    .bot-message-wrapper {
        margin-bottom: 24px;
    }
}

.bot-message {
    background: #ddf2fa;
    color: #194866;
    padding: 8px;
    border-radius: 8px;
    border-bottom-left-radius: 0;
    text-align: left;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* display:flex; */
}

.bot-message a:link {
    color: #F16565;
    text-decoration: underline;
}

.bot-message a:visited {
    color: #F16565;
    text-decoration: underline;
}

.bot-message-logo {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    margin-bottom: 1px;
    align-self: flex-end; /* Align logo to the bottom */
}

.bot-message h3 {
	font-size:14px;
    font-weight:bold;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}


#chatbot-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

#chatbot-fullscreen-toggle,
#chatbot-toggle {
    cursor: pointer;
    font-size: 18px;
    padding: 2px 8px;
    user-select: none;
    /* transition: background-color 0.2s ease; */
}

#chatbot-fullscreen-toggle:hover,
#chatbot-toggle:hover {
    background-color: #ddd;
    border-radius: 4px;
}

#chatbot-container.fullscreen {
    width: 95%;
    z-index: 9999;
}

.chatbot-clear-button {
    margin: 10px;
    padding: 6px 12px;
    font-size: 14px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

#chatbot-clear {
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

#chatbot-clear:hover {
    color: #c00;
    background-color: rgba(200, 0, 0, 0.05);
}

#chatbot-clear:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 0, 0, 0.2);
}

.chatbot-footer-container {
    background-color: #ddf2fa;
    text-align: center;
}

.wp-ai-chatbot-embedded {
    /* border: 1px solid #ccc; */
    border-radius: 8px;
    /* padding: 10px; */
    width: 100%;
    max-width: 600px;
    height: 400px;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: sans-serif;
}

.wp-ai-chatbot-embedded .bot-message-logo {
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.wp-ai-chatbot-embedded .bot-message {
    padding: 18px;
    background-color: #ddf2fa;
    box-shadow: 4px 6px 15px 0 rgba(0, 0, 0, 0.16);
    color: #194866;
    font-weight: 500;
    font-family: Roboto, sans-serif;
}

.wp-ai-chatbot-embedded .user-message {
    margin-top: 15px;
    padding: 15px;
    box-shadow: 4px 6px 15px 0 rgba(0, 0, 0, 0.16);
    font-weight: 500;
    font-family: Roboto, sans-serif;
}

.wp-ai-chatbot-embedded .chat-header {
    font-weight: bold;
    margin-bottom: 10px;
}

.wp-ai-chatbot-embedded #wp-ai-chatbot-embedded-input {
    background-color: #ddf2fa;
    padding: 20px;
    border-radius: 0px 0px 8px 8px;
}

.wp-ai-chatbot-embedded #chatbot-input-container {
    background-color: #fff;
    border-radius: 8px;
}

.wp-ai-chatbot-embedded .chat-controls {
    position: relative;
    text-align: right;
    margin: 5px 10px 0 0;
}

.wp-ai-chatbot-embedded #chatbot-clear {
    position: absolute;
    bottom: -8px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 4px 4px 0 0;
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, bottom 0.25s ease-in-out;
}

.wp-ai-chatbot-embedded #chatbot-clear:hover {
    bottom: -2px;
    color: #c00;
    background-color: rgba(200, 0, 0, 0.05);
}

.wp-ai-chatbot-embedded #chatbot-clear:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 0, 0, 0.2);
}



@keyframes loadingDots {
    0% { content: '.'; }
    50% { content: '..'; }
    100% { content: '...'; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Wobble animation */
@keyframes wobble {
    0% {
        transform: rotate(-10deg);
    }
    100% {
        transform: rotate(10deg);
    }
}

/* Continuous spin animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}