/**
 * Frontend File Explorer - Search Addon
 * Estilos compartilhados entre frontend e admin: destaque dos termos
 * pesquisados e modal de visualização de PDF/imagem.
 */

.ffes-search-highlight {
    background-color: #fff3a3;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* Preview modal (visualização de PDF/imagem sem sair da página) */
.ffes-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.ffes-preview-overlay.ffes-preview-open {
    display: flex;
}

.ffes-preview-box {
    background: #fff;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ffes-preview-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.ffes-preview-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ffes-preview-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: #525659;
}

.ffes-preview-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.ffes-preview-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 480px) {
    .ffes-preview-overlay {
        padding: 10px;
    }
}
