/* lexicon.css */

/* Search input focus - remove black border */
#searchInput:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}

/* Placeholder styling */
#searchInput::placeholder {
    color: #9ca3af !important;
    opacity: 0.6;
}

/* Custom scrollbar for dropdown */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #2563eb, #7c3aed);
}

/* Dropdown animations */
#alphabetMenu {
    transform-origin: top;
    transition: all 0.3s ease;
}

#alphabetMenu.show {
    animation: dropdownSlide 0.3s ease forwards;
}

#alphabetMenu.hide {
    animation: dropdownSlideOut 0.2s ease forwards;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dropdownSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Alphabet option hover - make text visible */
.alphabet-option:hover {
    color: white !important;
}

/* Alphabet option active state */
.alphabet-option.active {
    background: linear-gradient(to bottom right, #3b82f6, #8b5cf6);
    color: white !important;
}

/* Dropdown icon rotation */
#dropdownIcon.rotate {
    transform: translateY(-50%) rotate(180deg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 0);
    }
    to {
        transform: translate(-50%, -100%);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-fadeOut {
    animation: fadeOut 0.2s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease-out;
}

.animate-slideDown {
    animation: slideDown 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

/* Table row hover effect - lift like cards */
.hover-lift-row {
    cursor: pointer;
    position: relative;
}

.hover-lift-row:hover {
    background: linear-gradient(to left, #eff6ff, #ede9fe, #faf5ff);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Source button cursor pointer */
.source-btn {
    cursor: pointer;
}

.source-btn:active {
    transform: scale(0.95) translateY(-1px) !important;
}

#termsTableBody tr:last-child {
    border-bottom: none;
}

/* Active nav indicator */
nav a[href="lexicon"] {
    position: relative;
}

nav a[href="lexicon"]::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #146c94, #19a7ce);
    border-radius: 3px 3px 0 0;
}

/* Table responsive adjustments */
table {
    table-layout: fixed;
}

table th,
table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Alphabet dropdown selected state */
.alphabet-dropdown.has-selection {
    color: #1f2937 !important;
    border-color: #3b82f6 !important;
    background: linear-gradient(to right, #eff6ff, #ede9fe) !important;
}
