/* Chatbot styles */
#chatbot-container {
    position: relative;
    width: 280px;
    min-width: 260px;
    background: #000;
    border-radius: 0 8px 8px 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    min-height: 450px;
}

.chatbot-header {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(74, 105, 189, 0.3), rgba(30, 55, 153, 0.3));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 8px 0 0;
    color: white;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.chat-message.system {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: bold;
}

.chat-message.system .chat-avatar {
    background: linear-gradient(135deg, #4a69bd, #1e3799);
    color: white;
}

.chat-message.user .chat-avatar {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.chat-avatar img {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
}

.chat-bubble {
    max-width: 75%;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.system .chat-bubble {
    background: rgba(74, 105, 189, 0.2);
    border: 1px solid rgba(74, 105, 189, 0.3);
    color: #a8c7ff;
}

.chat-message.user .chat-bubble {
    background: rgba(108, 117, 125, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.3);
    color: #d6d8db;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chatbot input field */
.chatbot-input-container {
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 6px;
    position: relative;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-size: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.chatbot-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 105, 189, 0.5);
}

.chatbot-send-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #4a69bd, #1e3799);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-send-btn:hover {
    background: linear-gradient(135deg, #5a79cd, #2e47a9);
    transform: translateY(-1px);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Prompt Selector Styles */
.prompt-selector-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.prompt-selector-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.prompt-selector-btn:active {
    transform: translateY(0);
}

.prompt-selector-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Dropdown */
.prompt-selector-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: calc(100% - 35px);
    width: 260px;
    max-height: 320px;
    background: linear-gradient(135deg, rgba(25, 25, 30, 0.98), rgba(18, 18, 22, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7),
                0 2px 10px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    backdrop-filter: blur(20px);
}

.prompt-selector-dropdown.show {
    display: flex;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prompt-selector-header {
    padding: 10px 14px;
    background: linear-gradient(to right, rgba(74, 105, 189, 0.08), rgba(30, 55, 153, 0.08));
    border-bottom: 1px solid rgba(74, 105, 189, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.prompt-selector-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 2px;
}

.prompt-selector-list::-webkit-scrollbar {
    width: 6px;
}

.prompt-selector-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.prompt-selector-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.prompt-selector-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.chatbot-prompt-option {
    padding: 10px 14px;
    margin: 3px 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.chatbot-prompt-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(74, 105, 189, 0),
        rgba(74, 105, 189, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-prompt-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(74, 105, 189, 0.2);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chatbot-prompt-option:hover::before {
    opacity: 1;
}

.chatbot-prompt-option:active {
    background: rgba(74, 105, 189, 0.15);
    transform: translateX(1px);
    border-color: rgba(74, 105, 189, 0.3);
}

.chatbot-prompt-option.selected {
    background: rgba(74, 105, 189, 0.1);
    border-color: rgba(74, 105, 189, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

.chatbot-prompt-option.disabled {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    font-style: italic;
}

.chatbot-prompt-option.disabled:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    transform: none;
}

.chatbot-prompt-option.disabled::after {
    content: '🔒';
    position: absolute;
    right: 10px;
    opacity: 0.5;
}

.prompt-selector-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-style: italic;
}

/* Quick Tooltip */
.quick-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}