/**
 * GuiaZaap - Estilos CSS
 * Busca inteligente
 */

/* ===== PÁGINA HOME ===== */
.guiazaap-home {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.guiazaap-home-header {
    margin-bottom: 40px;
}

.guiazaap-logo {
    margin-bottom: 20px;
}

.logo-image {
    max-width: 120px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.guiazaap-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    background: #4CAF50;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guiazaap-tagline {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 400;
}

.guiazaap-home-search {
    margin-bottom: 50px;
}

.guiazaap-home-search .guiazaap-search-box {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.guiazaap-home-search .guiazaap-search-input {
    font-size: 18px;
    padding: 20px 25px;
}

.guiazaap-home-search .guiazaap-search-btn {
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* FORÇAR SUGESTÕES A FICAREM SEMPRE ESCONDIDAS */
.guiazaap-suggestions,
#guiazaap-suggestions,
.suggestions-header,
.suggestion-item,
.suggestions-grid {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Garantir que não apareçam em nenhum lugar */
div[class*="suggestion"],
div[id*="suggestion"] {
    display: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .guiazaap-home {
        padding: 20px 15px;
    }
    
    .guiazaap-title {
        font-size: 2rem;
    }
    
    /* Estilos de sugestões removidos */
}

.guiazaap-busca {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Container da busca */
.guiazaap-search-box {
    position: relative;
    display: flex;
    margin-bottom: 20px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.guiazaap-search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.guiazaap-search-input::placeholder {
    color: #999;
    font-style: italic;
}

.guiazaap-search-btn {
    padding: 15px 25px;
    background: #4CAF50 !important;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guiazaap-search-btn:hover {
    background: #45a049 !important;
    transform: translateY(-1px);
}

.search-icon {
    font-size: 18px;
}

/* Forçar estilos do botão de busca (movido do template) */
#guiazaap-search-btn {
    background-color: #4CAF50 !important;
    background: #4CAF50 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
    position: relative !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 108px !important;
    height: 108px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

#guiazaap-search-btn:hover {
    background-color: #45a049 !important;
    background: #45a049 !important;
}

#guiazaap-search-btn:active {
    background-color: #3d8b40 !important;
    background: #3d8b40 !important;
}

#guiazaap-search-btn .search-icon {
    width: 51px !important;
    height: 51px !important;
    color: white !important;
    stroke-width: 2.5 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
    fill: none !important;
}

/* Sobrescrever qualquer CSS do tema */
.guiazaap-search-btn,
button.guiazaap-search-btn,
button#guiazaap-search-btn {
    background-color: #4CAF50 !important;
    background: #4CAF50 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
    position: relative !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 108px !important;
    height: 108px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

/* Loading */
.guiazaap-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.loading-spinner {
    width: 120px; /* 40px * 3 = 120px */
    height: 120px; /* 40px * 3 = 120px */
    border: 12px solid #f3f3f3; /* 4px * 3 = 12px */
    border-top: 12px solid #4CAF50; /* 4px * 3 = 12px */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 45px; /* 15px * 3 = 45px */
}

.guiazaap-loading span {
    font-size: 48px; /* 16px * 3 = 48px */
    font-weight: 600;
    color: #333;
}

/* Responsividade para mensagem de loading */
@media screen and (max-width: 768px) {
    .guiazaap-loading {
        min-height: 40vh;
        padding: 20px 15px;
    }
    
    .loading-spinner {
        width: 80px; /* 120px * 0.67 para mobile */
        height: 80px; /* 120px * 0.67 para mobile */
        border: 8px solid #f3f3f3; /* 12px * 0.67 para mobile */
        border-top: 8px solid #4CAF50; /* 12px * 0.67 para mobile */
        margin: 0 auto 30px; /* 45px * 0.67 para mobile */
    }
    
    .guiazaap-loading span {
        font-size: 32px; /* 48px * 0.67 para mobile */
    }
}

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

/* Resultados */
.guiazaap-results {
    display: grid;
    gap: 15px;
}

.guiazaap-result-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #4CAF50;
    transition: all 0.3s ease;
    position: relative;
}

.guiazaap-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.guiazaap-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.guiazaap-result-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.guiazaap-result-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
}

.stars {
    color: #ffc107;
    font-size: 16px;
}

.guiazaap-result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.guiazaap-result-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 8px;
}

.guiazaap-result-location {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.guiazaap-result-address {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.guiazaap-result-phone {
    color: #25d366;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.guiazaap-result-phone:hover {
    color: #128c7e;
    text-decoration: underline;
}

.guiazaap-result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.guiazaap-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.guiazaap-btn-whatsapp {
    background: #25d366;
    color: white;
}

.guiazaap-btn-whatsapp:hover {
    background: #128c7e;
    color: white;
}

.guiazaap-btn-maps {
    background: #4285f4;
    color: white;
}

.guiazaap-btn-maps:hover {
    background: #3367d6;
    color: white;
}

/* Informações da IA */
.guiazaap-ai-info {
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ai-correction {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-label {
    font-weight: 600;
    font-size: 16px;
}

.ai-text {
    flex: 1;
}

.ai-source {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.8;
}

.ai-source-label {
    font-weight: 500;
}

.ai-source-text {
    color: #ffd700;
    font-weight: 600;
}

/* Detalhes de correspondência */
.guiazaap-match-details {
    background: #f8f9fa;
    border-left: 3px solid #4CAF50;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #666;
}

.guiazaap-match-details strong {
    color: #333;
    font-weight: 600;
}

/* Melhorias na interface da IA */
.guiazaap-ai-info {
    background: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.guiazaap-ai-info strong {
    color: #ffd700;
    font-weight: 600;
}

/* Indicador de relevância melhorado */
.guiazaap-relevance-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.guiazaap-relevance-high {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.guiazaap-relevance-medium {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.guiazaap-relevance-low {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

/* Responsividade */
@media (max-width: 768px) {
    .guiazaap-busca {
        padding: 15px;
    }
    
    .guiazaap-result-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .guiazaap-result-actions {
        flex-direction: column;
    }
    
    .guiazaap-btn {
        justify-content: center;
    }
}

/* Estados vazios */
.guiazaap-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.guiazaap-no-results-icon {
    font-size: 144px; /* 48px * 3 = 144px */
    margin-bottom: 45px; /* 15px * 3 = 45px */
    opacity: 0.5;
}

.guiazaap-no-results-text {
    font-size: 48px; /* 16px * 3 = 48px */
    margin-bottom: 30px; /* 10px * 3 = 30px */
    font-weight: 600;
}

.guiazaap-no-results-suggestion {
    font-size: 42px; /* 14px * 3 = 42px */
    color: #999;
}

/* Responsividade para mensagem "Nenhum resultado encontrado" */
@media screen and (max-width: 768px) {
    .guiazaap-no-results {
        min-height: 40vh;
        padding: 20px 15px;
    }
    
    .guiazaap-no-results-icon {
        font-size: 96px; /* 144px * 0.67 para mobile */
        margin-bottom: 30px;
    }
    
    .guiazaap-no-results-text {
        font-size: 32px; /* 48px * 0.67 para mobile */
        margin-bottom: 20px;
    }
    
    .guiazaap-no-results-suggestion {
        font-size: 28px; /* 42px * 0.67 para mobile */
    }
}

/* Animações */
.guiazaap-result-item {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias de acessibilidade */
.guiazaap-search-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.guiazaap-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Indicador de relevância */
.guiazaap-relevance-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.guiazaap-relevance-high {
    background: #4caf50;
}

.guiazaap-relevance-medium {
    background: #ff9800;
}

.guiazaap-relevance-low {
    background: #f44336;
}

/* Status de abertura */
.guiazaap-opening-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.guiazaap-status-aberto {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.guiazaap-status-fechado {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.guiazaap-status-indisponivel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ccc;
}

.status-icon {
    font-size: 14px;
}

.status-text {
    font-weight: 500;
}

/* Sugestões Inteligentes */
.guiazaap-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestions-header {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

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

.suggestion-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.suggestion-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.suggestion-type {
    font-size: 10px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animações para sugestões */
.guiazaap-suggestions {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Correção Automática */
.guiazaap-correcao-automatica {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #2196f3;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
    animation: slideInFromTop 0.5s ease;
}

.correcao-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.correcao-icon {
    font-size: 24px;
    color: #2196f3;
}

.correcao-title {
    font-size: 18px;
    font-weight: 700;
    color: #1976d2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correcao-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.correcao-original {
    background: #ffebee;
    color: #c62828;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid #f44336;
}

.correcao-arrow {
    font-size: 20px;
    color: #2196f3;
    font-weight: bold;
}

.correcao-corrigido {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid #4caf50;
}

.correcao-message {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
