/*
 * UI Components CSS
 * Non-critical styles for interactive components
 */

/* Chat Interface Detailed Styling */
#chat-history {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.dark-theme #chat-history {
    border-bottom-color: #555;
}

#chat-input {
    width: 100%;
    padding: 10px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    resize: none;
}

.dark-theme #chat-input {
    background: #333;
    color: #e0e0e0;
}

.chat-message {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: #CC7C97;
    color: white;
    margin-left: auto;
    text-align: right;
}

.bot-message {
    background: #f1f1f1;
    color: #333;
    margin-right: auto;
}

.dark-theme .bot-message {
    background: #444;
    color: #e0e0e0;
}

.error-message {
    background: #ffe6e6;
    color: #d8000c;
    text-align: center;
    font-style: italic;
}

.dark-theme .error-message {
    background: #4a2c2c;
    color: #ff6b6b;
}

/* Button Enhancements */
.theme-toggle {
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(204, 124, 151, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(204, 124, 151, 0.4);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Navigation Enhancements */
.navb ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: stretch;
}

.navb ul li {
    margin: 0 10px;
    display: flex;
    align-items: center;
}

.navb a {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.navb a:hover {
    background-color: rgba(204, 124, 151, 0.1);
}

.dark-theme .navb a:hover {
    background-color: rgba(224, 224, 224, 0.1);
}

.navb a.current,
.navb a.currentb {
    color: #CC7C97;
    font-weight: bold;
}

.dark-theme .navb a.current,
.dark-theme .navb a.currentb {
    color: #e0a3b8;
}

/* Accessibility improvements */
.theme-toggle:focus,
#chat-icon:focus {
    outline: 2px solid #CC7C97;
    outline-offset: 2px;
}

.dark-theme .theme-toggle:focus,
.dark-theme #chat-icon:focus {
    outline-color: #e0a3b8;
}

/* Smooth animations for non-critical elements */
.content-container {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* External link indicators */
a[href^="http"]:not([href*="desigley.space"]):not([href*="192.168"]):after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.6;
}

/* Responsive adjustments for components */
@media (max-width: 768px) {
    #chat-box {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    #chat-icon {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
