/* AI Agent Widget - Override Styles */
/* This file contains high-priority styles to override theme conflicts */

/* Widget container - ensure proper isolation */
#ai-agent-widget {
    position: fixed !important;
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Header styles with maximum specificity */
html body #ai-agent-widget .ai-chat-header {
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

html body #ai-agent-widget .ai-chat-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
}

/* Header buttons with correct background behavior */
html body #ai-agent-widget .ai-chat-header button.header-btn {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    white-space: nowrap !important;
    opacity: 0.85 !important;
}

html body #ai-agent-widget .ai-chat-header button.header-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

html body #ai-agent-widget .ai-chat-header button.header-btn:active {
    opacity: 0.7 !important;
}

html body #ai-agent-widget .ai-chat-header button#ai-chat-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background-color 0.2s !important;
    font-family: inherit !important;
    opacity: 0.85 !important;
}

/* Hover effects */
html body #ai-agent-widget .ai-chat-header button#ai-chat-close:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
}

/* Reset any inherited text styles that might interfere */
html body #ai-agent-widget .ai-chat-header,
html body #ai-agent-widget .ai-chat-header h3,
html body #ai-agent-widget .ai-chat-header button {
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    text-shadow: none !important;
}

/* Ensure text is visible regardless of background */
html body #ai-agent-widget .ai-chat-header h3,
html body #ai-agent-widget .ai-chat-header button#ai-chat-close {
    visibility: visible !important;
}