/**
 * Estilos para o sistema de Perguntas e Respostas (Q&A)
 */

/* Container principal */
.qa-container {
    margin: 2rem 0;
    font-family: 'Roboto', Arial, sans-serif;
}

.qa-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
}

.qa-title i {
    margin-right: 0.5rem;
    color: #0066cc;
}

.qa-count {
    font-size: 0.9rem;
    color: #666;
    margin-left: 0.5rem;
}

/* Formulário de pergunta */
.qa-form {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qa-form-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #333;
}

.qa-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.qa-textarea:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.qa-char-count {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    margin-top: 0.25rem;
}

.qa-char-count.error {
    color: #dc3545;
}

.qa-submit-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.qa-submit-btn:hover {
    background-color: #0055aa;
}

.qa-submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.qa-login-message {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.qa-login-btn {
    display: inline-block;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    transition: background-color 0.2s;
}

.qa-login-btn:hover {
    background-color: #0055aa;
    text-decoration: none;
    color: white;
}

/* Lista de perguntas */
.qa-list {
    margin-top: 2rem;
}

.qa-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.qa-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.qa-item.pending {
    border-left: 3px solid #ffc107;
}

.qa-item.rejected {
    border-left: 3px solid #dc3545;
    opacity: 0.7;
}

.qa-question {
    padding: 1.25rem;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.qa-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.qa-user {
    font-weight: 500;
    color: #333;
}

.qa-date {
    font-size: 0.85rem;
    color: #777;
}

.qa-question-text {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.qa-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.qa-status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.qa-status-badge.rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.qa-answer {
    padding: 1.25rem;
    background-color: #fff;
}

.qa-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.qa-vendor {
    font-weight: 500;
    color: #0066cc;
    display: flex;
    align-items: center;
}

.qa-vendor i {
    margin-right: 0.5rem;
}

.qa-answer-text {
    line-height: 1.5;
    color: #333;
}

.qa-no-answer {
    padding: 1.25rem;
    background-color: #fff;
    color: #666;
    font-style: italic;
}

.qa-answer-form {
    padding: 1.25rem;
    background-color: #f0f8ff;
}

.qa-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.qa-action-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.qa-action-btn i {
    margin-right: 0.25rem;
}

.qa-action-btn:hover {
    color: #0066cc;
}

.qa-action-btn.report:hover {
    color: #dc3545;
}

/* Paginação */
.qa-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.qa-pagination-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.qa-pagination-btn:hover {
    background-color: #f5f5f5;
}

.qa-pagination-btn.active {
    background-color: #0066cc;
    border-color: #0066cc;
    color: white;
}

.qa-pagination-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Modal de denúncia */
.qa-report-modal .modal-header {
    background-color: #f8d7da;
    color: #721c24;
}

.qa-report-modal .modal-header i {
    margin-right: 0.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .qa-question-header,
    .qa-answer-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qa-date {
        margin-top: 0.25rem;
    }
    
    .qa-actions {
        justify-content: space-between;
    }
    
    .qa-action-btn {
        margin-left: 0;
    }
}

/* Animações */
.qa-item {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-submit-btn {
    position: relative;
    overflow: hidden;
}

.qa-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.qa-submit-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Mensagens de alerta */
.qa-alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.qa-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.qa-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.qa-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.qa-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Sem perguntas */
.qa-empty {
    text-align: center;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 1rem;
}

.qa-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

.qa-empty-text {
    color: #666;
    font-size: 1.1rem;
}
