/* ============================================
   Feedback de Professores - Estilos
   ============================================ */

/* Layout */
.feedback-container {
  max-width: 1000px;
  margin: 0 auto;
}

.feedback-header {
  margin-bottom: 24px;
}

.feedback-header h1 {
  font-size: 22px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.feedback-header h1 i {
  color: #10b981;
}

.feedback-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Grid de professores */
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

@media (min-width: 1200px) {
  .feedback-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 800px) and (max-width: 1199px) {
  .feedback-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 500px) and (max-width: 799px) {
  .feedback-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feedback-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.feedback-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feedback-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.feedback-card-info h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0 0 4px;
}

.feedback-card-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.feedback-card-stars .star-filled {
  color: #f59e0b;
}

.feedback-card-stars .star-empty {
  color: #e2e8f0;
}

.feedback-card-media {
  font-weight: 700;
  color: #f59e0b;
  margin-left: 4px;
}

.feedback-btn-avaliar {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.feedback-btn-avaliar:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.feedback-btn-avaliar.ja-avaliou {
  border-color: #10b981;
  color: #059669;
  background: rgba(16, 185, 129, 0.05);
}

/* Modal de avaliacao */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.feedback-modal {
  background: var(--bg-surface);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-default);
}

.feedback-modal-header h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-modal-fechar {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.feedback-modal-body {
  padding: 24px;
}

/* Estrelas interativas */
.feedback-rating-section {
  margin-bottom: 24px;
}

.feedback-rating-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.feedback-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
}

.feedback-rating-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.feedback-stars {
  display: flex;
  gap: 4px;
  direction: rtl;
}

.feedback-stars .star-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #e2e8f0;
  cursor: pointer;
  padding: 2px;
  transition: all 0.15s;
  line-height: 1;
}

.feedback-stars .star-btn:hover,
.feedback-stars .star-btn.active {
  color: #f59e0b;
  transform: scale(1.15);
}

/* RTL trick: hover all stars to the right of hovered star */
.feedback-stars .star-btn:hover ~ .star-btn {
  color: #f59e0b;
}

.feedback-btn-salvar-nota {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 8px;
}

.feedback-btn-salvar-nota:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.feedback-btn-salvar-nota:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Secao de submit (botao unico no final) */
.feedback-submit-section {
  border-top: 1px solid var(--border-default);
  padding-top: 20px;
  margin-top: 8px;
}

/* Secao de comentarios */
.feedback-comment-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.feedback-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
  background: var(--bg-surface);
  color: var(--text-dark);
  box-sizing: border-box;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Lista de comentarios anteriores */
.feedback-comments-list {
  margin-top: 16px;
}

.feedback-comments-list h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.feedback-comment-item {
  padding: 12px 14px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 3px solid #10b981;
}

.feedback-comment-text {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.5;
  word-wrap: break-word;
}

.feedback-comment-date {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Loading / Empty states */
.feedback-loading,
.feedback-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.feedback-loading i,
.feedback-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.feedback-msg {
  font-size: 13px;
  font-weight: 600;
  min-height: 20px;
  margin-top: 8px;
  text-align: center;
}

.feedback-msg.success { color: #059669; }
.feedback-msg.error { color: #ef4444; }

/* Responsive */
@media (max-width: 499px) {
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .feedback-modal {
    max-width: 100%;
    margin: 10px;
    border-radius: 12px;
  }

  .feedback-modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .feedback-rating-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .feedback-stars {
    direction: rtl;
  }
}

/* Dark mode */
html[data-theme="dark"] .feedback-card-avatar {
  background: linear-gradient(135deg, #047857, #059669);
}
