/*
 * TorrentPier – Bull-powered BitTorrent tracker engine
 *
 * @copyright Copyright (c) 2005-2026 TorrentPier (https://torrentpier.com)
 * @link      https://github.com/torrentpier/torrentpier for the canonical source repository
 * @license   https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
 *
 * MOD: AJAX Tracker Live Search – dropdown styles
 */

.ls-dropdown {
    display: none;
    position: absolute;
    z-index: 5000;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #b5b5b5;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    padding: 4px 0;
    font-size: 12px;
    box-sizing: border-box;
}

.ls-status {
    padding: 10px 14px;
    color: #888;
    font-style: italic;
}

.ls-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    text-decoration: none;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
}

.ls-item:last-child {
    border-bottom: none;
}

.ls-item:hover,
.ls-item.ls-active {
    background: #eef4fb;
    text-decoration: none;
}

.ls-poster {
    flex: 0 0 auto;
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
    background: #e6e6e6;
    border: 1px solid #d4d4d4;
}

.ls-poster-empty {
    display: inline-block;
    background: #e6e6e6 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b0b0b0' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.6'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center no-repeat;
}

.ls-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.ls-title {
    font-weight: bold;
    line-height: 1.25;
    color: #2b2b2b;
    /* allow up to two lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ls-hl {
    color: #c0392b;
    background: transparent;
}

.ls-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: #777;
}

.ls-seed {
    color: #006600;
    font-weight: bold;
    white-space: nowrap;
}

.ls-leech {
    color: #800000;
    font-weight: bold;
    white-space: nowrap;
}

.ls-size {
    color: #555;
    white-space: nowrap;
}

.ls-forum {
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* ---------- Dark mode ---------- */

body.dark-mode .ls-dropdown {
    background: #1e1e1e;
    border-color: #3a3a3a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

body.dark-mode .ls-item {
    color: #d8d8d8;
    border-bottom-color: #2a2a2a;
}

body.dark-mode .ls-item:hover,
body.dark-mode .ls-item.ls-active {
    background: #2c3540;
}

body.dark-mode .ls-title {
    color: #e8e8e8;
}

body.dark-mode .ls-poster,
body.dark-mode .ls-poster-empty {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .ls-hl {
    color: #ff7b6b;
}

body.dark-mode .ls-seed {
    color: #66cc66;
}

body.dark-mode .ls-leech {
    color: #ff6b6b;
}

body.dark-mode .ls-size {
    color: #a8a8a8;
}

body.dark-mode .ls-forum {
    color: #888;
}
