/* =============================================================
   widgets.css — Поиск с автодополнением и инбокс
   ============================================================= */

/* === ВИДЖЕТ ПОИСКА === */

#search-widget {
    position: relative;
    margin-top: 15px;
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid var(--blood-red);
    padding: 10px 15px;
    font-family: monospace;
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(138, 3, 3, 0.2);
    display: inline-block;
    clear: both;
    pointer-events: auto;
}

#terminal-search {
    background: transparent;
    border: none;
    color: var(--blood-red);
    font-family: monospace;
    font-size: 14px;
    outline: none;
    text-transform: uppercase;
    width: 150px;
}

#terminal-search::placeholder {
    color: #555;
    animation: blink 1s infinite;
}

/* === ВЫПАДАЮЩИЕ ПОДСКАЗКИ === */

#search-suggestions {
    position: absolute;
    top: 100%;
    left: -1px;
    width: calc(100% + 2px);
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--blood-red);
    border-top: none;
    list-style: none;
    padding: 0; margin: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 3000;
    box-shadow: 0 10px 20px rgba(138, 3, 3, 0.3);
}

#search-suggestions.hidden { display: none; }

#search-suggestions li {
    padding: 8px 15px;
    font-family: monospace;
    font-size: 13px;
    color: #a8a8a8;
    cursor: pointer;
    border-bottom: 1px dashed #222;
    transition: background 0.2s, color 0.2s;
    display: flex;
    justify-content: space-between;
}

#search-suggestions li:last-child { border-bottom: none; }

#search-suggestions li:hover {
    background: #1a0505;
    color: var(--blood-red);
}

.sugg-type {
    font-size: 10px;
    color: #555;
    letter-spacing: 1px;
}

/* === ИНБОКС (ПОЧТА) === */

#inbox-widget {
    margin-top: 15px;
    margin-bottom: 15px;
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid var(--blood-red);
    padding: 8px 15px;
    font-family: monospace;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(138, 3, 3, 0.2);
    pointer-events: auto;
}

#inbox-widget.hidden { display: none !important; }

#inbox-widget:hover {
    background: #1a0808;
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(138, 3, 3, 0.5);
}

/* Мигающий индикатор нового письма */
.blink-text {
    color: var(--blood-red);
    font-weight: bold;
    animation: textBlink 1.5s infinite;
    margin-right: 10px;
}

@keyframes textBlink {
    0%, 100% { opacity: 1;   text-shadow: 0 0 8px var(--blood-red); }
    50%       { opacity: 0.3; text-shadow: none; }
}
