/**
 * Tanglish Autocomplete Dropdown Styles
 * Minimal Black & White Design - Clean, Modern UI
 */

.tanglish-dropdown {
    position: fixed;
    z-index: 10000;
    min-width: 200px;
    max-width: 280px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: dropdownFade 0.12s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header - Clean minimal header */
.tanglish-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
}

.tanglish-dropdown .header-icon {
    font-size: 12px;
    opacity: 0.6;
}

.tanglish-dropdown .header-label {
    font-size: 11px;
    color: #888888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tanglish-dropdown .header-word {
    font-size: 12px;
    font-weight: 600;
    color: #333333;
    font-family: 'SF Mono', 'Consolas', monospace;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Suggestions List */
.tanglish-dropdown .dropdown-list {
    max-height: 220px;
    overflow-y: auto;
}

.tanglish-dropdown .dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.tanglish-dropdown .dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.tanglish-dropdown .dropdown-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.tanglish-dropdown .dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Dropdown Items */
.tanglish-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.08s ease;
}

.tanglish-dropdown .dropdown-item:hover {
    background: #f5f5f5;
}

.tanglish-dropdown .dropdown-item.selected {
    background: #f0f0f0;
}

/* Item Number - Subtle badge */
.tanglish-dropdown .item-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: transparent;
    color: #999999;
    border: 1px solid #e0e0e0;
}

.tanglish-dropdown .dropdown-item.selected .item-num {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Tamil Text - Large and clear */
.tanglish-dropdown .item-text {
    flex: 1;
    font-size: 17px;
    font-weight: 500;
    color: #222222;
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
}

.tanglish-dropdown .dropdown-item.selected .item-text {
    color: #000000;
    font-weight: 600;
}

/* Enter indicator */
.tanglish-dropdown .item-enter {
    font-size: 10px;
    padding: 3px 6px;
    background: #eeeeee;
    border-radius: 3px;
    color: #666666;
    font-weight: 500;
}

.tanglish-dropdown .dropdown-item.selected .item-enter {
    background: #000000;
    color: #ffffff;
}

/* Footer - Keyboard hints */
.tanglish-dropdown .dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 12px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    font-size: 10px;
    color: #888888;
}

.tanglish-dropdown .dropdown-footer kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-family: inherit;
    font-size: 9px;
    font-weight: 600;
    color: #555555;
    box-shadow: 0 1px 0 #d0d0d0;
}

.tanglish-dropdown .dropdown-footer span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tanglish-dropdown {
        background: #1c1c1e;
        border-color: #3a3a3c;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .tanglish-dropdown .dropdown-header {
        background: #2c2c2e;
        border-bottom-color: #3a3a3c;
    }

    .tanglish-dropdown .header-label {
        color: #8e8e93;
    }

    .tanglish-dropdown .header-word {
        color: #ffffff;
        background: #3a3a3c;
    }

    .tanglish-dropdown .dropdown-item:hover {
        background: #2c2c2e;
    }

    .tanglish-dropdown .dropdown-item.selected {
        background: #3a3a3c;
    }

    .tanglish-dropdown .item-num {
        color: #8e8e93;
        border-color: #48484a;
    }

    .tanglish-dropdown .dropdown-item.selected .item-num {
        background: #ffffff;
        color: #000000;
        border-color: #ffffff;
    }

    .tanglish-dropdown .item-text {
        color: #e5e5e7;
    }

    .tanglish-dropdown .dropdown-item.selected .item-text {
        color: #ffffff;
    }

    .tanglish-dropdown .item-enter {
        background: #48484a;
        color: #aeaeb2;
    }

    .tanglish-dropdown .dropdown-item.selected .item-enter {
        background: #ffffff;
        color: #000000;
    }

    .tanglish-dropdown .dropdown-footer {
        background: #2c2c2e;
        border-top-color: #3a3a3c;
        color: #8e8e93;
    }

    .tanglish-dropdown .dropdown-footer kbd {
        background: #3a3a3c;
        border-color: #48484a;
        color: #aeaeb2;
        box-shadow: 0 1px 0 #48484a;
    }

    .tanglish-dropdown .dropdown-list::-webkit-scrollbar-thumb {
        background: #48484a;
    }

    .tanglish-dropdown .dropdown-list::-webkit-scrollbar-thumb:hover {
        background: #636366;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .tanglish-dropdown {
        min-width: 180px;
        max-width: 260px;
        border-radius: 10px;
    }

    .tanglish-dropdown .dropdown-item {
        padding: 12px;
    }

    .tanglish-dropdown .item-text {
        font-size: 18px;
    }

    .tanglish-dropdown .dropdown-footer {
        gap: 8px;
        padding: 8px 10px;
    }
}