/* Enhanced Input States */
.topic-input.dimmed {
    opacity: 0.5;
    background-color: #f9fafb !important;
    border-color: #e5e7eb !important;
    pointer-events: none;
}
.dark .topic-input.dimmed {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}
.topic-input.enhanced {
    border-width: 2px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.topic-input.enhanced:focus {
    ring-width: 3px;
    transform: scale(1.01);
}
/* Smooth Transitions */
.topic-input {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.topic-input:focus {
    outline: none;
}
.autocomplete-container {
    position: relative;
}
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
}
.dark .autocomplete-dropdown {
    background: #374151;
    border-color: #4b5563;
}
.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}
.dark .autocomplete-item {
    border-bottom-color: #4b5563;
}
.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f3f4f6;
}
.dark .autocomplete-item:hover,
.dark .autocomplete-item.highlighted {
    background-color: #4b5563;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-title {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.dark .autocomplete-title {
    color: #f9fafb;
}
.autocomplete-code {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.dark .autocomplete-code {
    color: #9ca3af;
}
.autocomplete-definition {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}
.dark .autocomplete-definition {
    color: #9ca3af;
}
.loading-indicator,
.error-indicator {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
}
.loading-indicator {
    color: #6b7280;
}
.error-indicator {
    color: #dc2626;
}
.dark .loading-indicator {
    color: #9ca3af;
}
.dark .error-indicator {
    color: #f87171;
}
/* Enhanced Button Styles */
button:not(:disabled) {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
button:not(:disabled):hover {
    transform: translateY(-2px);
}
button:not(:disabled):active {
    transform: translateY(0);
}
button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}
.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}
.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}
/* Enhanced Dropdown */
.autocomplete-dropdown {
    animation: fadeIn 0.15s ease-out;
}
/* Icon Hover Effects */
.icon-badge {
    transition: transform 0.2s ease;
}
.icon-badge:hover {
    transform: scale(1.05);
}
/* WHO Badge Hover */
a.badge-link {
    transition: all 0.2s ease;
}
a.badge-link:hover {
    transform: scale(1.02);
}
/* Loading Spinner Enhancement */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}
/* Form Focus Ring */
input:focus-visible {
    outline: none;
}
/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
