/* Barra de Pesquisa CEAC - Visual Limpo e Moderno */

.pesquisa-ceac-widget {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Container principal - ÚNICO campo arredondado */
.pesquisa-ceac-form {
    position: relative;
    width: 100%;
    margin: 0;
}

.pesquisa-ceac-input-container {
    position: relative;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.pesquisa-ceac-input-container:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pesquisa-ceac-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ícone de lupa */
.pesquisa-ceac-input-container::before {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('../search-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    pointer-events: none;
    opacity: 0.5;
    filter: brightness(0) saturate(100%) invert(60%) sepia(8%) saturate(564%) hue-rotate(202deg) brightness(92%) contrast(86%);
    transition: opacity 0.2s ease;
}

/* Ocultar ícone quando há texto */
.pesquisa-ceac-widget.has-text .pesquisa-ceac-input-container::before {
    opacity: 0;
}

/* Campo de input - SEM bordas, fundo limpo */
.pesquisa-ceac-input {
    width: 100%;
    height: 56px;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 56px 0 32px;
    font-size: 16px;
    color: #374151;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 50px;
    box-sizing: border-box;
    transition: padding-right 0.2s ease;
    z-index: 1;
    position: relative;
}

/* Ajustar padding quando há texto (ícone oculto) */
.pesquisa-ceac-widget.has-text .pesquisa-ceac-input {
    padding-right: 24px;
}

.pesquisa-ceac-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
    opacity: 1;
}

.pesquisa-ceac-input:focus {
    outline: none;
    color: #111827;
}

/* Botão de pesquisa - oculto */
.pesquisa-ceac-button {
    display: none;
}

/* Sugestões - Design limpo */
.pesquisa-ceac-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    padding: 8px 0;
}

.suggestions-header {
    padding: 8px 16px 8px 16px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 4px;
}

.suggestions-header::before {
    content: "";
    width: 12px;
    height: 12px;
    background-image: url('../search-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    filter: brightness(0) saturate(100%) invert(50%) sepia(9%) saturate(613%) hue-rotate(186deg) brightness(94%) contrast(88%);
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 14px;
}

.suggestion-item::before {
    content: "📄";
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: #f9fafb;
}

.suggestion-item .suggestion-text {
    flex: 1;
    color: #374151;
}

.suggestion-item .suggestion-type {
    font-size: 10px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.25px;
}

/* Resultados - Design limpo */
.pesquisa-ceac-results {
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.results-header {
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.results-content {
    max-height: 350px;
    overflow-y: auto;
}

.result-section {
    border-bottom: 1px solid #f3f4f6;
}

.result-section:last-child {
    border-bottom: none;
}

.section-title {
    padding: 10px 16px;
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
    cursor: pointer;
    background: #ffffff;
}

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

.result-item:hover {
    background: #f9fafb;
}

.result-title {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 3px;
    line-height: 1.4;
}

.result-excerpt {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #9ca3af;
}

.result-date,
.result-category,
.result-type {
    padding: 1px 6px;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 500;
}

.result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    float: left;
}

.no-results {
    padding: 32px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.no-results-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Responsivo */
@media (max-width: 768px) {
    .pesquisa-ceac-input-container {
        min-height: 52px;
    }
    
    .pesquisa-ceac-input {
        height: 52px;
        padding: 0 52px 0 28px;
        font-size: 16px;
    }
    
    .pesquisa-ceac-input-container::before {
        right: 18px;
        width: 18px;
        height: 18px;
    }
    
    .pesquisa-ceac-widget.has-text .pesquisa-ceac-input {
        padding-right: 20px;
    }
    
    .pesquisa-ceac-suggestions {
        border-radius: 10px;
    }
    
    .result-item {
        padding: 10px 14px;
    }
    
    .result-image {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .pesquisa-ceac-input-container {
        min-height: 48px;
    }
    
    .pesquisa-ceac-input {
        height: 48px;
    }
    
    .pesquisa-ceac-suggestions {
        max-height: 250px;
    }
    
    .suggestion-item {
        padding: 8px 12px;
    }
    
    .result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Estados de loading */
.pesquisa-ceac-widget.loading .pesquisa-ceac-input-container {
    opacity: 0.7;
}

/* Animações suaves */
@media (prefers-reduced-motion: reduce) {
    .pesquisa-ceac-input-container,
    .pesquisa-ceac-input,
    .suggestion-item,
    .result-item {
        transition: none;
    }
}

/* Força estilos limpos - Remove qualquer interferência de temas */
.pesquisa-ceac-widget,
.pesquisa-ceac-widget *,
.pesquisa-ceac-form,
.pesquisa-ceac-input-container,
.pesquisa-ceac-input,
.pesquisa-ceac-suggestions,
.pesquisa-ceac-results {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pesquisa-ceac-widget {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.pesquisa-ceac-input-container {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pesquisa-ceac-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #374151 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.pesquisa-ceac-input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.pesquisa-ceac-suggestions,
.pesquisa-ceac-results {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.results-header,
.section-title {
    background: #f9fafb !important;
    color: #374151 !important;
}

.suggestion-item:hover,
.result-item:hover {
    background: #f9fafb !important;
}

.result-title {
    color: #111827 !important;
}

.result-excerpt {
    color: #6b7280 !important;
}

.result-meta {
    color: #9ca3af !important;
} 