/**
 * Busca PostTypes - CSS Principal
 * 
 * Sistema de busca avançada para múltiplos post types do JetEngine
 * com interface moderna e responsiva
 * 
 * @package BuscaPostTypes
 * @version 1.0
 * @author Francisco Souza <fransouzaweb@gmail.com>
 * @copyright 2025 Francisco Souza
 * @link https://fransouzaweb.com.br
 * @since 1.0.0
 */

/* ============================================
   RESET E BASE
   ============================================ */
.bps-container {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bps-full-width {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   HEADER DA BUSCA
   ============================================ */
.bps-container .bps-search-header,
div.bps-container .bps-search-header,
#bps-container .bps-search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 60px 30px 70px 30px !important;
    text-align: center !important;
    position: relative !important;
    margin: 0 !important;
    border: none !important;
}

.bps-search-header-content {
    max-width: 900px; /* Ligeiramente maior */
    margin: 0 auto;
    padding: 0 20px; /* Padding interno para respiro */
}

.bps-search-title {
    margin: 0 0 25px 0; /* Mais espaço embaixo */
    color: white;
    font-size: 38px; /* Ligeiramente maior */
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -0.5px; /* Melhora o espaçamento das letras */
}

.bps-search-subtitle {
    margin: 0 0 40px 0; /* Mais espaço embaixo */
    color: rgba(255,255,255,0.95);
    font-size: 19px; /* Ligeiramente maior */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    line-height: 1.4; /* Melhora legibilidade */
    max-width: 500px; /* Limita largura do texto */
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   CAMPO DE BUSCA
   ============================================ */
.bps-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px; /* Adiciona respiro lateral */
}

.bps-container .bps-search-input,
div.bps-container .bps-search-input,
#bps-container .bps-search-input,
.bps-container input.bps-search-input,
div.bps-container input.bps-search-input,
#bps-container input.bps-search-input,
input#bps-search.bps-search-input {
    width: 100% !important;
    padding: 25px 60px 25px 25px !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 18px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    outline: none !important;
    background: white !important;
    background-color: white !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    color: #333 !important;
    display: block !important;
    margin: 0 !important;
    min-height: 60px !important;
    max-width: none !important;
    border-width: 0 !important;
    border-style: none !important;
}

.bps-container .bps-search-input:focus,
div.bps-container .bps-search-input:focus,
#bps-container .bps-search-input:focus,
.bps-container input.bps-search-input:focus,
div.bps-container input.bps-search-input:focus,
#bps-container input.bps-search-input:focus,
input#bps-search.bps-search-input:focus {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
    transform: translateY(-2px) !important;
    border-radius: 50px !important;
    border: none !important;
    outline: none !important;
}

.bps-search-icon {
    position: absolute;
    right: 40px; /* Ajustado para compensar o padding da wrapper */
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 24px;
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   SELETOR DE POST TYPES
   ============================================ */
.bps-filter-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

.bps-filter-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.bps-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #e9ecef;
}

.bps-filter-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bps-toggle-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bps-toggle-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.bps-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.bps-toggle-btn.active .bps-toggle-icon {
    transform: rotate(180deg);
}

.bps-filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.bps-filter-panel.active {
    max-height: 800px;
    opacity: 1;
    padding: 30px 0;
}

.bps-filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.bps-control-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bps-control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bps-select-all:hover {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.bps-clear-all:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.bps-post-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.bps-post-type-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bps-post-type-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.bps-post-type-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.bps-post-type-item.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #667eea;
}

.bps-post-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bps-post-type-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.bps-post-type-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.bps-post-type-item.selected .bps-post-type-icon {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.bps-post-type-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.3;
}

.bps-post-type-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bps-post-type-item.selected .bps-post-type-checkbox {
    background: #667eea;
    border-color: #667eea;
}

.bps-post-type-item.selected .bps-post-type-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.bps-post-type-counter {
    background: #f8f9fa;
    color: #666;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.bps-post-type-item.selected .bps-post-type-counter {
    background: #667eea;
    color: white;
}

.bps-post-type-counter.loading {
    background: #e3f2fd;
    color: #1976d2;
}

.bps-post-type-counter.loading::after {
    content: '...';
    animation: bps-loading-dots 1.5s infinite;
}

@keyframes bps-loading-dots {
    0%, 20% { content: '...'; }
    40% { content: '..'; }
    60% { content: '.'; }
    80%, 100% { content: '...'; }
}

/* ============================================
   CONTEÚDO PRINCIPAL
   ============================================ */
.bps-content-wrapper {
    width: 100%;
    padding: 40px 30px; /* Mais padding para respiro */
    box-sizing: border-box;
}

.bps-content-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px; /* Padding interno adicional */
}

/* ============================================
   STATUS E MENSAGENS
   ============================================ */
.bps-status {
    padding: 25px 30px; /* Mais padding */
    border-radius: 15px;
    display: none;
    margin-bottom: 35px; /* Mais margem */
    text-align: center;
    font-weight: 500;
    font-size: 17px; /* Ligeiramente maior */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Sombra mais suave */
    line-height: 1.4; /* Melhora legibilidade */
}

.bps-status.loading {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.bps-status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.bps-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

/* ============================================
   RESUMO DE RESULTADOS
   ============================================ */
.bps-summary {
    display: none;
    margin-bottom: 45px; /* Mais margem */
    padding: 30px 35px; /* Mais padding */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 18px; /* Bordas mais arredondadas */
    border-left: 6px solid #007cba; /* Borda lateral mais grossa */
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); /* Sombra mais suave */
}

.bps-summary-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px; /* Mais espaço */
    font-size: 21px; /* Ligeiramente maior */
    line-height: 1.3;
}

.bps-summary-content {
    color: #666;
    font-size: 16px;
    line-height: 1.5; /* Melhora legibilidade */
}

.bps-summary-tag {
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    display: inline-block;
}

/* ============================================
   CARDS DE RESULTADOS
   ============================================ */
.bps-results-section {
    margin-bottom: 35px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: white;
}

.bps-section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
}

.bps-section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.bps-section-count {
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 15px;
    margin-left: 15px;
    font-weight: 500;
}

.bps-section-content {
    padding: 0;
}

/* ============================================
   CARDS INDIVIDUAIS
   ============================================ */
.bps-card {
    padding: 30px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.bps-card:last-child {
    border-bottom: none;
}

.bps-card:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.bps-card-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.bps-card-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bps-card-image-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f0f4f8, #d6e8f5);
    border-radius: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bps-card-text {
    flex: 1;
    min-width: 0;
}

.bps-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
}

.bps-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bps-card-title a:hover {
    color: #667eea;
}

.bps-card-excerpt {
    margin: 0 0 18px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    max-height: 75px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.bps-card-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: #888;
    flex-wrap: wrap;
}

.bps-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.bps-card-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    padding: 8px 16px;
    background: #f8f9ff;
    border-radius: 20px;
    border: 1px solid #e3f2fd;
}

.bps-card-link:hover {
    color: white;
    background: #667eea;
    transform: translateY(-1px);
}

/* ============================================
   ESTADO VAZIO
   ============================================ */
.bps-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bps-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.bps-empty-title {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 20px;
}

.bps-empty-text {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* ============================================
   FILTROS AVANÇADOS
   ============================================ */
.bps-advanced-filters {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.bps-advanced-filters-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bps-advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.bps-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bps-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bps-filter-select,
.bps-filter-input {
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bps-filter-select:hover,
.bps-filter-input:hover {
    border-color: #667eea;
}

.bps-filter-select:focus,
.bps-filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bps-filter-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Wrapper para autocomplete de autor */
.bps-autocomplete-wrapper {
    position: relative;
}

.bps-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bps-suggestions-dropdown.visible {
    display: block;
}

.bps-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
    color: #495057;
}

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

.bps-suggestion-item:hover,
.bps-suggestion-item.active {
    background: #f8f9ff;
    color: #667eea;
}

/* Botão de limpar filtros */
.bps-filter-actions {
    display: flex;
    align-items: flex-end;
}

.bps-clear-filters {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #6c757d;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.bps-clear-filters:hover {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    transform: translateY(-1px);
}

/* Estados ativos dos filtros */
.bps-filter-select.active,
.bps-filter-input.active {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Indicador de filtros ativos */
.bps-filter-group.has-active-filter .bps-filter-label::after {
    content: "●";
    color: #667eea;
    margin-left: 4px;
    font-size: 12px;
}

/* Scrollbar personalizada para sugestões */
.bps-suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

.bps-suggestions-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bps-suggestions-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bps-suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

/* Tablets e Desktops pequenos */
@media (max-width: 1024px) {
    .bps-content-inner {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .bps-card {
        padding: 25px 20px;
    }
    
    .bps-card-content {
        gap: 20px;
    }
    
    .bps-card-image,
    .bps-card-image-placeholder {
        width: 100px !important;
        height: 100px !important;
    }
}

/* ============================================
   CSS DE FORÇA MÁXIMA - PARA TEMAS PROBLEMÁTICOS
   ============================================ */

/* Força máxima para o header */
body .bps-container .bps-search-header,
html body .bps-container .bps-search-header,
html body div.bps-container .bps-search-header {
    padding: 60px 30px 70px 30px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Força máxima para o input */
body .bps-container input.bps-search-input,
html body .bps-container input.bps-search-input,
html body div.bps-container input.bps-search-input,
body input#bps-search.bps-search-input,
html body input#bps-search.bps-search-input {
    padding: 25px 60px 25px 25px !important;
    border-radius: 50px !important;
    border: none !important;
    min-height: 60px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    background: white !important;
    font-size: 18px !important;
}

/* Força máxima para o focus */
body .bps-container input.bps-search-input:focus,
html body .bps-container input.bps-search-input:focus,
html body div.bps-container input.bps-search-input:focus,
body input#bps-search.bps-search-input:focus,
html body input#bps-search.bps-search-input:focus {
    border-radius: 50px !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
}

/* Tablets */
@media (max-width: 768px) {
    .bps-search-title {
        font-size: 28px;
    }
    
    .bps-search-subtitle {
        font-size: 16px;
    }
    
    .bps-search-input {
        font-size: 16px;
        padding: 18px 50px 18px 20px;
    }
    
    .bps-filter-content {
        padding: 0 20px;
    }
    
    .bps-filter-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 20px 0;
    }
    
    .bps-filter-controls {
        justify-content: center;
        width: 100%;
    }
    
    .bps-post-types-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
    
    .bps-advanced-filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .bps-post-type-item {
        padding: 15px;
    }
    
    .bps-card {
        padding: 20px 15px;
    }
    
    .bps-card-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .bps-card-image,
    .bps-card-image-placeholder {
        width: 150px;
        height: 150px;
        margin: 0 auto 15px auto;
    }
    
    .bps-content-wrapper {
        padding: 15px;
    }
    
    .bps-summary {
        padding: 20px 15px;
    }
}

/* Celulares */
@media (max-width: 480px) {
    .bps-search-header {
        padding: 35px 15px;
    }
    
    .bps-search-title {
        font-size: 24px;
    }
    
    .bps-search-subtitle {
        font-size: 14px;
    }
    
    .bps-search-input {
        padding: 15px 45px 15px 18px;
        font-size: 15px;
    }
    
    .bps-filter-content {
        padding: 0 15px;
    }
    
    .bps-filter-header {
        padding: 15px 0;
    }
    
    .bps-filter-title {
        font-size: 18px;
    }
    
    .bps-toggle-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .bps-post-types-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .bps-advanced-filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bps-advanced-filters-title {
        font-size: 16px;
    }
    
    .bps-post-type-item {
        padding: 12px;
    }
    
    .bps-post-type-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .bps-post-type-label {
        font-size: 14px;
    }
    
    .bps-content-wrapper {
        padding: 10px;
    }
    
    .bps-card {
        padding: 18px 12px;
    }
    
    .bps-card-image,
    .bps-card-image-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .bps-summary {
        padding: 18px 12px;
    }
    
    .bps-summary-title {
        font-size: 18px;
    }
    
    .bps-summary-content {
        font-size: 14px;
    }
}

/* Celulares pequenos */
@media (max-width: 360px) {
    .bps-search-title {
        font-size: 20px;
    }
    
    .bps-search-input {
        padding: 12px 40px 12px 15px;
        font-size: 14px;
    }
    
    .bps-card-title {
        font-size: 16px;
    }
    
    .bps-card-excerpt {
        font-size: 14px;
    }
    
    .bps-card-image,
    .bps-card-image-placeholder {
        width: 100px !important;
        height: 100px !important;
    }
}

/* ============================================
   CSS DE FORÇA MÁXIMA - PARA TEMAS PROBLEMÁTICOS
   ============================================ */

/* Força máxima para o header */
body .bps-container .bps-search-header,
html body .bps-container .bps-search-header,
html body div.bps-container .bps-search-header {
    padding: 60px 30px 70px 30px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Força máxima para o input */
body .bps-container input.bps-search-input,
html body .bps-container input.bps-search-input,
html body div.bps-container input.bps-search-input,
body input#bps-search.bps-search-input,
html body input#bps-search.bps-search-input {
    padding: 25px 60px 25px 25px !important;
    border-radius: 50px !important;
    border: none !important;
    min-height: 60px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    background: white !important;
    font-size: 18px !important;
}

/* Força máxima para o focus */
body .bps-container input.bps-search-input:focus,
html body .bps-container input.bps-search-input:focus,
html body div.bps-container input.bps-search-input:focus,
body input#bps-search.bps-search-input:focus,
html body input#bps-search.bps-search-input:focus {
    border-radius: 50px !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
}
/* ============================================
   SISTEMA DE AUTOCOMPLETE
   ============================================ */
.bps-autocomplete {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 5px;
    max-height: 300px;
    overflow: hidden;
}

.bps-autocomplete.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bps-autocomplete-header {
    padding: 15px 20px 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
}

.bps-autocomplete-list {
    max-height: 250px;
    overflow-y: auto;
}

.bps-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

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

.bps-autocomplete-item:hover,
.bps-autocomplete-item.active {
    background: #f8f9ff;
    color: #667eea;
}

.bps-autocomplete-icon {
    margin-right: 12px;
    font-size: 14px;
    opacity: 0.6;
}

.bps-autocomplete-item:hover .bps-autocomplete-icon,
.bps-autocomplete-item.active .bps-autocomplete-icon {
    opacity: 1;
}

.bps-autocomplete-text {
    font-size: 14px;
    flex: 1;
}

/* Scrollbar personalizada para autocomplete */
.bps-autocomplete-list::-webkit-scrollbar {
    width: 6px;
}

.bps-autocomplete-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bps-autocomplete-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bps-autocomplete-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   MELHORIAS NO CAMPO DE BUSCA
   ============================================ */

/* Indicador visual para busca com operadores */
.bps-search-wrapper.has-operators .bps-search-input {
    border-left: 4px solid #28a745 !important;
}

.bps-search-wrapper.has-exact-phrase .bps-search-input {
    border-left: 4px solid #ffc107 !important;
}

.bps-search-wrapper.has-operators.has-exact-phrase .bps-search-input {
    border-left: 4px solid #17a2b8 !important;
}

/* Animação de digitação */
.bps-search-input.typing {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2) !important;
}

/* Estados de validação */
.bps-search-wrapper.invalid .bps-search-input {
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.2) !important;
}

.bps-search-wrapper.valid .bps-search-input {
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2) !important;
}

/* ============================================
   RESPONSIVIDADE PARA AUTOCOMPLETE
   ============================================ */
@media (max-width: 768px) {
    .bps-autocomplete {
        left: 10px;
        right: 10px;
        border-radius: 10px;
    }
    
    .bps-autocomplete-header {
        padding: 12px 15px 8px 15px;
        font-size: 11px;
    }
    
    .bps-autocomplete-item {
        padding: 10px 15px;
    }
    
    .bps-autocomplete-text {
        font-size: 13px;
    }
    
    .bps-autocomplete-icon {
        margin-right: 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .bps-autocomplete {
        margin-top: 3px;
        max-height: 250px;
    }
    
    .bps-autocomplete-list {
        max-height: 200px;
    }
}/*
 ============================================
   AJUDA DE BUSCA
   ============================================ */
.bps-search-help {
    text-align: center;
    margin-top: 15px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.4;
}

.bps-search-help strong {
    color: rgba(255,255,255,0.95);
}

@media (max-width: 768px) {
    .bps-search-help {
        font-size: 12px;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .bps-search-help {
        font-size: 11px;
        margin-top: 10px;
        padding: 0 10px;
    }
}/* =====
=======================================
   DESTAQUE DE TERMOS DE BUSCA
   ============================================ */
.bps-card-title mark,
.bps-card-excerpt mark {
    background: linear-gradient(120deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(253, 203, 110, 0.3);
}

.bps-card-title mark {
    font-weight: 700;
    background: linear-gradient(120deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

/* Animação sutil para destacar termos */
@keyframes highlight-pulse {
    0% { background-color: rgba(116, 185, 255, 0.3); }
    50% { background-color: rgba(116, 185, 255, 0.6); }
    100% { background-color: rgba(116, 185, 255, 0.3); }
}

.bps-card-title mark,
.bps-card-excerpt mark {
    animation: highlight-pulse 2s ease-in-out;
}

/* Estados especiais para diferentes tipos de busca */
.bps-search-wrapper.has-exact-phrase .bps-card mark {
    background: linear-gradient(120deg, #00b894 0%, #00a085 100%);
    color: white;
}

.bps-search-wrapper.has-operators .bps-card mark {
    background: linear-gradient(120deg, #e17055 0%, #d63031 100%);
    color: white;
}
/* ==
==========================================
   CONTROLES DE ORDENAÇÃO
   ============================================ */
.bps-sorting-controls {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.bps-sorting-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bps-sorting-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.bps-sorting-select {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.bps-sorting-select:hover {
    border-color: #667eea;
}

.bps-sorting-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================
   INDICADORES DE BUSCA AVANÇADA
   ============================================ */
.bps-search-wrapper.has-advanced::after {
    content: "🔍+";
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #667eea;
    pointer-events: none;
}

.bps-search-wrapper.has-exact-phrase::after {
    content: "\"\"";
    background: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.bps-search-wrapper.has-operators::after {
    content: "AND/OR";
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.bps-search-wrapper.has-exact-phrase.has-operators::after {
    content: "ADV";
    background: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* ============================================
   MELHORIAS NA EXIBIÇÃO DE RESULTADOS
   ============================================ */
.bps-results-section {
    margin-bottom: 30px;
}

.bps-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
    border-bottom: 2px solid #dee2e6;
}

.bps-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bps-section-count {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.bps-section-content {
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #dee2e6;
    border-top: none;
}

/* ============================================
   INDICADORES DE RELEVÂNCIA
   ============================================ */
.bps-card[data-relevance="high"] {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.bps-card[data-relevance="medium"] {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fffef8 0%, #ffffff 100%);
}

.bps-card[data-relevance="low"] {
    border-left: 4px solid #6c757d;
}

.bps-relevance-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.bps-relevance-high {
    background: #28a745;
    color: white;
}

.bps-relevance-medium {
    background: #ffc107;
    color: #212529;
}

.bps-relevance-low {
    background: #6c757d;
    color: white;
}

/* ============================================
   RESPONSIVIDADE PARA CONTROLES DE ORDENAÇÃO
   ============================================ */
@media (max-width: 768px) {
    .bps-sorting-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .bps-sorting-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .bps-sorting-select {
        min-width: 140px;
    }
    
    .bps-search-wrapper.has-advanced::after {
        right: 45px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bps-sorting-controls {
        padding: 12px;
        gap: 12px;
    }
    
    .bps-sorting-label {
        font-size: 13px;
    }
    
    .bps-sorting-select {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 120px;
    }
    
    .bps-section-title {
        font-size: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .bps-section-count {
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* ============================================
   ANIMAÇÕES PARA BUSCA AVANÇADA
   ============================================ */
@keyframes advanced-search-glow {
    0% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
    100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2); }
}

.bps-search-wrapper.has-advanced .bps-search-input {
    animation: advanced-search-glow 3s ease-in-out infinite;
}

.bps-search-wrapper.has-advanced .bps-search-input:focus {
    animation: none;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5) !important;
}

/* ============================================
   MELHORIAS NO DESTAQUE DE TERMOS
   ============================================ */
.bps-card-title mark,
.bps-card-excerpt mark {
    position: relative;
    overflow: hidden;
}

.bps-card-title mark::before,
.bps-card-excerpt mark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: highlight-shine 2s ease-in-out;
}

@keyframes highlight-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Estados especiais para diferentes tipos de busca */
.bps-search-wrapper.has-exact-phrase .bps-card mark {
    background: linear-gradient(120deg, #00b894 0%, #00a085 100%);
    color: white;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.bps-search-wrapper.has-operators .bps-card mark {
    background: linear-gradient(120deg, #e17055 0%, #d63031 100%);
    color: white;
    border: 1px solid rgba(225, 112, 85, 0.3);
}

.bps-search-wrapper.has-advanced .bps-card mark {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-weight: 700;
}