/* Modal de Visualização Detalhada */

.detailed-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
  overflow-y: auto;
}

.detailed-view-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.detailed-view-container {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--border-color);
}

.detailed-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.detailed-view-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-color);
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.btn-close-modal:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.1));
}

.detailed-view-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;

  /* Esconde scrollbars mantendo funcionalidade */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Webkit browsers (Chrome, Safari) */
.detailed-view-content::-webkit-scrollbar {
  display: none;
}

.detailed-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;

  /* Esconde scrollbars mantendo funcionalidade */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Webkit browsers (Chrome, Safari) */
.detailed-table-wrapper::-webkit-scrollbar {
  display: none;
}

/* Tabela de Disciplinas */
.detailed-subjects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.detailed-subjects-table thead {
  background: var(--header-bg, rgba(0, 0, 0, 0.02));
  position: sticky;
  top: 0;
  z-index: 10;
}

.detailed-subjects-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  background-color: #2c3e50;
  color: white;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.detailed-subjects-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  vertical-align: middle;
}

.detailed-subjects-table tbody tr {
  transition: background 0.2s ease;
}

.detailed-subjects-table tbody tr:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.02));
}

.detailed-subjects-table tbody tr:last-child td {
  border-bottom: none;
}

/* Coluna de Disciplina */
.detailed-subjects-table .subject-name {
  font-weight: 600;
  font-size: 16px;
  text-transform: capitalize;
  color: var(--primary-color);
}

/* Coluna de Tempo */
.detailed-subjects-table .time-spent {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-color);
  min-width: 100px;
}

/* Coluna de Acertos (✓) */
.detailed-subjects-table .correct-count {
  text-align: center;
  color: #2ecc71;
  font-weight: 700;
  font-size: 16px;
  min-width: 60px;
}

/* Coluna de Erros (✗) */
.detailed-subjects-table .error-count {
  text-align: center;
  color: #ff5252;
  font-weight: 700;
  font-size: 16px;
  min-width: 60px;
}

/* Coluna de Questions (📝) */
.detailed-subjects-table .questions-icon {
  text-align: center;
  font-size: 16px;
  min-width: 60px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* Coluna de Performance (%) */
.detailed-subjects-table .performance-badge {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  min-width: 70px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  color: white;
}

.detailed-subjects-table .performance-badge.excellent {
  background: #2ecc71;
}

.detailed-subjects-table .performance-badge.good {
  background: #ffc107;
}

.detailed-subjects-table .performance-badge.poor {
  background: #ff5252;
}

.detailed-subjects-table .performance-badge.no-data {
  background: #9e9e9e;
  color: #fff;
}

/* Responsivo para Mobile */
@media (max-width: 768px) {
  .detailed-view-container {
    width: 95%;
    max-height: 85vh;
  }

  .detailed-view-header h2 {
    font-size: 1.1rem;
  }

  .detailed-subjects-table th,
  .detailed-subjects-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .detailed-subjects-table th {
    font-size: 10px;
  }

  .detailed-subjects-table .performance-badge {
    padding: 3px 8px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .detailed-view-container {
    width: 90%;
    border-radius: 8px;
    margin: 10px 0;
  }

  .detailed-view-header {
    padding: 15px;
  }

  .detailed-view-header h2 {
    font-size: 1rem;
  }

  .detailed-view-content {
    padding: 15px;
  }

  .detailed-subjects-table th,
  .detailed-subjects-table td {
    padding: 8px 6px;
    font-size: 11px;
  }

  .detailed-subjects-table .error-count,
  .detailed-subjects-table .correct-count,
  .detailed-subjects-table .time-spent,
  .detailed-subjects-table .subject-name,
  .detailed-subjects-table .questions-icon {
    font-size: 14px;
  }

  .btn-close-modal {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
