/* Admin Help Button */
#ai-botkit-admin-help-button {
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(180deg, #21C58B 0%, #038E5D 100%);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 24px;
    border: none;
    padding: 0;
}

#ai-botkit-admin-help-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #21C58B 0%, #038E5D 100%);    
}

#ai-botkit-admin-help-button span {
    font-size: 24px;
    line-height: 1;
}

#ai-botkit-admin-help-button img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.ai-botkit-admin-help-text {
    display: none;
}

/* Admin widget overrides */
body.wp-admin .ai-botkit-widget-button {
    z-index: 99991; /* Ensure button stays above WP admin elements */
}

body.wp-admin .ai-botkit-widget {
    z-index: 99992; /* Ensure widget stays above WP admin elements */
}

/* Fix positioning in admin context */
body.wp-admin .ai-botkit-widget,
body.wp-admin .ai-botkit-widget-container {
    position: fixed !important;
    max-height: 70vh !important;
}

/* Make sure the widget close button is easily visible */
body.wp-admin .ai-botkit-minimize {
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make sure typing indicator is visible */
body.wp-admin .ai-botkit-typing {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(0, 136, 88, 0.1);
    border-radius: 12px;
    margin-bottom: 4px;
}

body.wp-admin .ai-botkit-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #008858;
    border-radius: 50%;
    opacity: 0.7;
    animation: typing-dot 1.4s infinite ease-in-out both;
}

body.wp-admin .ai-botkit-typing span:nth-child(1) {
    animation-delay: 0s;
}

body.wp-admin .ai-botkit-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

body.wp-admin .ai-botkit-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0%, 80%, 100% { 
        transform: scale(0.7);
    }
    40% { 
        transform: scale(1);
    }
}

.ai-botkit-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 1;
}

.ai-botkit-widget-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-botkit-widget-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-botkit-widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.ai-botkit-widget-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-botkit-widget-action {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.ai-botkit-widget-action:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.ai-botkit-widget-action i {
    font-size: 16px;
}

/* Widget Container */
.ai-botkit-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999998;
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.ai-botkit-widget:not([aria-hidden="true"]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chat Container */
.ai-botkit-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    position: relative;
}

/* Chat Messages */
.ai-botkit-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    scrollbar-width: none;
}

/* Message Styles */
.ai-botkit-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    margin-bottom: 8px;
}

.ai-botkit-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-botkit-message.assistant {
    align-self: flex-start;
}

.ai-botkit-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #008858;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.ai-botkit-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-break: break-word;
}

.ai-botkit-message.user .ai-botkit-message-content {
    background: #008858;
    color: white;
}
.ai-botkit-message.assistant .ai-botkit-message-content {
    background: #F5F5F5;
    color: #333333;
    border: 1px solid #E7E7E7;
}

.ai-botkit-message-text {
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    margin: 0;
}

.ai-botkit-message.user .ai-botkit-message-text {
    color: white;
}

/* Input Form */
.ai-botkit-input-form {
    padding: 16px;
    background: white;
    border-top: 1px solid #E7E7E7;
}

.ai-botkit-input-wrapper {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px;
}


.ai-botkit-input-wrapper .ai-botkit-doc-bot-input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    min-height: 24px;
    line-height: 1.5;
}

.ai-botkit-doc-bot-input:focus {
    outline: none;
}

.ai-botkit-send-button {
    background: #008858;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

.ai-botkit-send-button:hover {
    background: #006e47;
}

.ai-botkit-send-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Typing Indicator */
.ai-botkit-typing {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(0, 136, 88, 0.1);
    border-radius: 12px;
    margin-bottom: 4px;
}

.ai-botkit-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #008858;
    border-radius: 50%;
    opacity: 0.7;
    animation: typing-dot 1.4s infinite ease-in-out both;
}

.ai-botkit-typing span:nth-child(1) {
    animation-delay: 0s;
}

.ai-botkit-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-botkit-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0%, 80%, 100% { 
        transform: scale(0.7);
    }
    40% { 
        transform: scale(1);
    }
}
.ai-botkit-help-widget-container{
    position: fixed;
    bottom: 100px;
    width: 220px;
    right: 20px;
    padding: 21px 15px;
    color: #fff;
    background: linear-gradient(93.73deg, #1FC289 0.85%, #04915F 101.84%);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    border: 1px solid;
    border-image-source: linear-gradient(93.28deg, #31C792 2.76%, #29F2AB 98.3%);
    z-index: 999999;
    display: none;
}
.ai-botkit-help-widget-container p{
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}
.ai-botkit-help-widget-close{
    position: absolute;
    top: 0;
    right: 0;
    font-size: 20px;
    cursor: pointer;
    transform: translate(50%, -50%);
    background-color: #B7D6CB;
    border-radius: 45px;
    color: #2E6552;
    padding: 2px;
}