/* Dark mode toggle */
.theme-toggle {
    cursor: pointer;
}

.message-bubble-user {
    position: relative;
}

.message-bubble-assistant {
    position: relative;
}

.message-shadow {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dark .message-shadow {
    box-shadow: 0 1px 2px rgba(255, 255, 255, 0.05);
}

.message-content pre {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow-x: auto;
}

.dark .message-content pre {
    background-color: rgba(255, 255, 255, 0.05);
}

.message-content code {
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.1em 0.3em;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.dark .message-content code {
    background-color: rgba(255, 255, 255, 0.05);
}

.message-content pre code {
    padding: 0;
    background-color: transparent;
}

.dark .message-content pre code {
    background-color: transparent;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
}

.typing-dot {
    height: 6px;
    width: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background-color: #6B7280;
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.dark .typing-dot {
    background-color: #D1D5DB;
}

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

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
    margin-right: 0;
}

@keyframes typingAnimation {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.4);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Temperature slider disabled state */
#temperature-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

#temperature-container.disabled input[type="range"] {
    cursor: not-allowed;
    opacity: 0.5;
}

#temperature-container.disabled label {
    color: #9CA3AF;
}

.dark #temperature-container.disabled label {
    color: #6B7280;
}

#temperature-not-supported {
    font-weight: 500;
}

/* Add animation for new messages */
.new-message {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4B5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Add custom CSS for message actions */
.message-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    z-index: 5;
    padding: 2px;
}

.dark .message-actions {
    background-color: rgba(55, 65, 81, 0.9);
}

.action-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .action-btn {
    color: #D1D5DB;
}

.action-btn:hover {
    color: #1E40AF;
}

.dark .action-btn:hover {
    color: #93C5FD;
}

/* Edit form styles */
.edit-form {
    width: 100%;
}

.edit-textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    margin-bottom: 0.5rem;
}

/* Message container for hover effects */
.message-container {
    position: relative;
}