/* ================================================= */
/* 1. BARRA DE PESQUISA (CONTAINER E INPUT)          */
/* ================================================= */

.cge-search-wrapper {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.cge-search-form {
    display: flex;
    border: 1px solid #d1d5db;
    background: #fff;
    position: relative;
    border-radius: 0; 
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cge-search-form:focus-within {
    border-color: #002352;
    box-shadow: 0 0 0 1px #002352;
}

.cge-search-field {
    width: 100%;
    border: none !important;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #1f2937;
    height: 50px;
    box-shadow: none !important;
}

.cge-search-form.loading::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #002352;
    border-radius: 50%;
    animation: cge-spin 1s linear infinite;
    pointer-events: none;
}

@keyframes cge-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================= */
/* 2. DROPDOWN DE RESULTADOS (ESTILIZADO)            */
/* ================================================= */

.cge-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15); /* Sombra mais profunda */
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0;
    z-index: 99999;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    line-height: normal;
}

.cge-search-dropdown li {
    margin: 0 !important;
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
    list-style: none !important;
    background: none !important;
}
.cge-search-dropdown li:last-child {
    border-bottom: none;
}

/* --- Item Clicável --- */
.cge-item-clicavel {
    display: block !important;
    padding: 14px 20px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    
    background-color: #fff !important;
    color: #374151 !important; /* Cinza escuro */
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: sans-serif !important;
    text-decoration: none !important;
    border: none !important;
    
    /* CORREÇÃO DO HOVER: 
       Adicionamos uma borda transparente AGORA para ocupar o espaço.
       Assim, quando o mouse passar, o texto não "pula". */
    border-left: 4px solid transparent !important; 
    
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Removemos o ícone conforme solicitado */
.cge-item-clicavel::before {
    content: none !important;
    display: none !important;
}

/* --- Efeito Hover --- */
.cge-item-clicavel:hover {
    background-color: #f8fafc !important; /* Azul muito pálido */
    color: #002352 !important; /* Texto Azul */
    
    /* Apenas mudamos a cor da borda, o espaço já estava lá */
    border-left-color: #002352 !important; 
	transform: none !important; 
    box-shadow: none !important;
}

/* Mensagem de "Nenhum Resultado" */
.cge-search-dropdown li.no-results {
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
    text-align: center;
    background-color: #fff;
}

/* --- Botão "Mostrar mais opções" (Elegante) --- */
.cge-load-more {
    display: block !important;
    width: 100%;
    padding: 16px !important;
    
    background-color: #f9fafb !important; /* Fundo cinza bem claro */
    color: #002352 !important; /* Texto azul */
    
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase; /* Caixa alta elegante */
    letter-spacing: 1px; /* Espaçamento entre letras */
    
    cursor: pointer;
    border-top: 1px solid #e5e7eb !important;
    transition: all 0.3s ease;
}

/* Hover do botão carregar mais: Inverte as cores */
.cge-load-more {
    /* Mesma altura/padding dos itens normais */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Centraliza o conteúdo */
    padding: 16px 20px !important;
    
    background-color: #f3f4f6 !important;
    color: #002352 !important;
    
    /* Tipografia */
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    
    cursor: pointer;
    border-top: 1px solid #e5e7eb !important;
    transition: all 0.2s ease;
}

/* Ícone de Seta (Dashicon) */
.cge-load-more::before {
    content: "\f347"; /* Código da seta para baixo (arrow-down-alt2) */
    font-family: "dashicons";
    font-size: 18px;
    margin-right: 8px; /* Espaço entre ícone e texto */
    font-weight: normal;
    vertical-align: middle;
}

/* Hover */
.cge-load-more:hover {
    background-color: #002352 !important; /* Fundo Azul */
    color: #ffffff !important; /* Texto Branco */
	transform: none !important;
    box-shadow: none !important;
}

/* ================================================= */
/* 3. PÁGINA DE RESULTADOS (SHORTCODE)               */
/* ================================================= */

.cge-results-container {
    max-width: 900px;
    margin: 50px auto;
    font-family: inherit;
}

.cge-results-heading {
    font-size: 28px;
    margin-bottom: 40px;
    color: #111;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.cge-result-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 0;
}

.cge-result-link {
    text-decoration: none;
    display: block;
}

.cge-result-link:hover .cge-result-title {
    color: #004085;
    text-decoration: underline;
}

.cge-result-title {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #002352;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.cge-result-excerpt {
    display: block;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.cge-pagination {
    margin-top: 50px;
    text-align: center;
}

.cge-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}

.cge-pagination .page-numbers.current,
.cge-pagination .page-numbers:hover {
    background-color: #002352;
    color: #fff;
    border-color: #002352;
}