/* ==========================================================================
   CNVC FAQs - Estilos Frontend
   ========================================================================== */

.cnvc-faqs-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Buscador */
.cnvc-faqs-search-box {
    margin-bottom: 30px;
    position: relative;
}

.cnvc-faqs-search-box input[type="text"] {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cnvc-faqs-search-box input[type="text"]:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.cnvc-faqs-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* Filtro de categorías */
.cnvc-faqs-category-filter {
    margin-bottom: 20px;
}

.cnvc-faqs-category-filter select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cnvc-faqs-category-filter select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Lista de FAQs */
.cnvc-faqs-list {
    margin-top: 20px;
}

.cnvc-faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cnvc-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.cnvc-faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8f9fa, white);
    transition: background 0.3s ease;
}

.cnvc-faq-question:hover {
    background: linear-gradient(to right, #e9ecef, #f8f9fa);
}

.cnvc-faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    padding-right: 20px;
}

.cnvc-faq-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0066cc;
    color: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.cnvc-faq-item.active .cnvc-faq-toggle {
    transform: rotate(45deg);
    background: #004999;
}

.cnvc-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cnvc-faq-item.active .cnvc-faq-answer {
    padding: 0 20px 20px 20px;
    max-height: 2000px;
}

.cnvc-faq-answer-content {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #555;
    line-height: 1.6;
}

.cnvc-faq-answer-content p {
    margin: 0 0 15px 0;
}

.cnvc-faq-answer-content ul,
.cnvc-faq-answer-content ol {
    margin: 10px 0 15px 20px;
    padding: 0;
}

.cnvc-faq-answer-content li {
    margin-bottom: 8px;
}

.cnvc-faq-answer-content strong {
    color: #333;
}

/* Categoría badge */
.cnvc-faq-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Sistema de calificación */
.cnvc-faq-rating {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cnvc-faq-rating-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.cnvc-faq-rating-buttons {
    display: flex;
    gap: 10px;
}

.cnvc-faq-rating-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cnvc-faq-rating-btn:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
}

.cnvc-faq-rating-btn.helpful:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.cnvc-faq-rating-btn.not-helpful:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.cnvc-faq-rating-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cnvc-faq-rating-count {
    font-weight: 600;
}

.cnvc-faq-rating-thank-you {
    color: #4caf50;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: 6px;
}

/* Estados de carga */
.cnvc-faqs-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cnvc-faqs-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: cnvc-spin 1s linear infinite;
}

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

/* Sin resultados */
.cnvc-faqs-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.cnvc-faqs-no-results-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.cnvc-faqs-no-results p {
    font-size: 18px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cnvc-faqs-container {
        padding: 15px;
    }
    
    .cnvc-faq-question h3 {
        font-size: 16px;
    }
    
    .cnvc-faq-rating {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cnvc-faq-rating-buttons {
        width: 100%;
    }
    
    .cnvc-faq-rating-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnvc-faq-item {
    animation: fadeIn 0.3s ease;
}
