/* Overlay Ricerca (riutilizza logica settings-overlay ma con ID specifico) */
#search-overlay {
    display: none; /* Gestito via classe .hidden o display */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

#search-overlay:not(.hidden) {
    display: flex;
}

.search-box {
    background: #1f1f1f;
    padding: 30px;
    border-radius: 12px;
    width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.search-title {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
}

.search-input-container {
    position: relative;
    margin-bottom: 20px;
}

#global-search-input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #141414;
    color: white;
    font-size: 18px;
    outline: none;
    box-sizing: border-box;
}

#search-history-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #252525;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.search-history-item {
    padding: 10px 15px;
    text-align: left;
    color: #ddd;
    cursor: pointer;
    border-bottom: 1px solid #333;
}

.search-history-item:hover {
    background: rgba(255,255,255,0.1);
}

.search-toggle-row {
    background: transparent;
    padding: 10px;
    margin-bottom: 25px;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.search-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.search-btn {
    border: none;
    padding: 10px 25px;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

#search-confirm-btn { background: #2196F3; }
#search-cancel-btn { background: #444; }