/* Floating Button Styles */
#wp-ai-helper-floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px; /* Make it round */
    height: 60px; /* Make it round */
    background: #0073aa;
    color: #fff;
    border-radius: 50%; /* Perfect circle */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000; /* Higher than chat widget */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', Arial, sans-serif;
    text-align: center;
    padding: 5px; /* Add some padding */
    box-sizing: border-box; /* Include padding in width/height */
}

#wp-ai-helper-floating-button:hover {
    background: #005177;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

#wp-ai-helper-floating-button .wp-ai-helper-icon {
    font-size: 24px; /* Icon size */
    line-height: 1; /* Remove extra space below icon */
}

#wp-ai-helper-floating-button .wp-ai-helper-text {
    font-size: 12px; /* Text size */
    margin-top: 2px;
    font-weight: bold;
}

/* Chat Widget Styles */
#wp-ai-helper-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px; /* Default width for larger screens */
    max-width: 90vw; /* Ensures it doesn't overflow on small screens */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Slightly softer shadow */
    z-index: 9999; /* Lower than floating button */
    font-family: 'Inter', Arial, sans-serif; /* Example: using Inter font */
    display: flex; /* Use flexbox for overall layout */
    flex-direction: column; /* Stack header, messages, input area vertically */
    overflow: hidden; /* Ensures content stays within rounded corners */
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Initially hidden */
    transform: translateY(10px); /* Start slightly below */
    transition: all 0.3s ease-in-out;
}

/* State for when the widget is open */
#wp-ai-helper-widget.wp-ai-helper-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* State for when the floating button is hidden */
#wp-ai-helper-floating-button.wp-ai-helper-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}


#wp-ai-helper-header {
    background: #0073aa;
    color: #fff;
    padding: 12px 15px; /* Slightly more padding */
    border-radius: 10px 10px 0 0; /* Match widget border-radius */
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
    cursor: pointer; /* Indicate it might be clickable (e.g., to minimize) */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#wp-ai-helper-close-button {
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
}

#wp-ai-helper-close-button:hover {
    color: #f0f0f0;
}

#wp-ai-helper-messages {
    flex-grow: 1; /* Allows message area to take available space */
    height: 200px; /* Fixed height, will scroll */
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column; /* Stack messages vertically */
    gap: 10px; /* Space between messages */
}

/* New styles for message differentiation */
.user-message {
    background-color: #e0f7fa; /* Light blue for user */
    padding: 8px 12px;
    border-radius: 10px;
    align-self: flex-end; /* Align user messages to the right */
    max-width: 85%; /* Prevent messages from taking full width */
}

.user-message strong {
    color: #0073aa; /* Darker blue for "You" label */
}

.ai-message {
    background-color: #f0f0f0; /* Light grey for AI */
    padding: 8px 12px;
    border-radius: 10px;
    align-self: flex-start; /* Align AI messages to the left */
    max-width: 85%;
}

.ai-message strong {
    color: #333; /* Darker color for "AI" label */
}

.loading-message {
    font-style: italic;
    color: #888;
    align-self: flex-start;
}

.error-message {
    color: #d32f2f; /* Red for error messages */
    font-weight: bold;
    align-self: flex-start;
}

.wp-ai-helper-input-area { /* New container for input and button */
    display: flex;
    padding: 10px;
    gap: 10px; /* Space between input and button */
    align-items: center; /* Vertically align items */
}

#wp-ai-helper-input {
    flex-grow: 1; /* Allows input to take available space */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    outline: none; /* Remove default focus outline */
}

#wp-ai-helper-input:focus {
    border-color: #0073aa; /* Highlight on focus */
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

#wp-ai-helper-send {
    padding: 10px 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.2s ease; /* Smooth transition for hover */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#wp-ai-helper-send:hover {
    background: #005177;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#wp-ai-helper-send:disabled {
    background: #a7d9ed; /* Lighter background when disabled */
    cursor: not-allowed;
    box-shadow: none;
}

/* Media query for very small screens */
@media (max-width: 400px) {
    #wp-ai-helper-widget {
        width: calc(100vw - 20px); /* Take almost full width */
        right: 10px;
        bottom: 10px;
    }
}
/* Your existing styles... */

.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 10px; /* Adjust spacing as needed */
}

.password-container input {
    width: calc(100% - 30px); /* Make room for the button */
    padding-right: 30px; /* Ensure text doesn't go under the button */
}

.show-password-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
}

#wp-ai-helper-login-form {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

#wp-ai-helper-login-form input,
#wp-ai-helper-login-form button {
    margin-bottom: 10px;
}

.wp-ai-helper-hidden {
    display: none !important;
}