/**
 * Estilos Frontend - Oráculo Tainacan
 * @package Oraculo_Tainacan
 */

/* Container Principal do Shortcode */
.oraculo-search-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Formulário de Busca */
.oraculo-search-form {
    margin-bottom: 30px;
}

.oraculo-search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.oraculo-search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

.oraculo-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.oraculo-search-button {
    padding: 6px 26px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.oraculo-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.oraculo-search-button:disabled,
.oraculo-search-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Exemplos */
.oraculo-examples {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.oraculo-examples p {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.oraculo-examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oraculo-example {
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.oraculo-example:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

/* Resultados */
.oraculo-results {
    min-height: 100px;
    position: relative;
}

.oraculo-results:empty::after {
    content: 'Os resultados aparecerão aqui';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-style: italic;
}

.oraculo-results.has-results:empty::after {
    display: none;
}

/* Loading */
.oraculo-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.oraculo-loading::before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: oraculo-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes oraculo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Wrapper de Resultados */
.oraculo-results-wrapper {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resposta da IA */
.oraculo-answer {
    padding: 25px;
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-left: 4px solid #667eea;
    border-radius: 10px;
    margin-bottom: 30px;
}

.oraculo-answer h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.oraculo-answer-content {
    color: #555;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Lista de Itens */
.oraculo-items {
    margin-top: 30px;
}

.oraculo-items h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.oraculo-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oraculo-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.oraculo-item:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102,126,234,0.1);
}

.oraculo-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.oraculo-snippet {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.oraculo-similarity {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.oraculo-item-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.oraculo-item-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Feedback */
.oraculo-feedback {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.oraculo-feedback p {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.oraculo-feedback-btn {
    padding: 10px 20px;
    margin: 0 5px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.oraculo-feedback-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.oraculo-feedback-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.oraculo-feedback-message {
    margin-top: 15px;
}

.oraculo-feedback-message .success {
    color: #28a745;
    font-weight: 600;
}

.oraculo-feedback-message .error {
    color: #dc3545;
}

/* Erro */
.oraculo-error {
    padding: 20px;
    background: #dc354510;
    border: 1px solid #dc3545;
    border-radius: 10px;
    color: #dc3545;
    text-align: center;
}

.oraculo-error button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.oraculo-error button:hover {
    opacity: 0.9;
}

/* Sem Resultados */
.oraculo-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsividade */
@media (max-width: 768px) {
    .oraculo-search-container {
        padding: 20px;
        margin: 20px;
    }
    
    .oraculo-search-wrapper {
        flex-direction: column;
    }
    
    .oraculo-search-button {
        width: 100%;
    }
    
    .oraculo-item {
        padding: 15px;
    }
}