/* --- SIMULADO MODAL STYLES --- */
/* Botão para abrir o modal */
#btn-adicionar-simulado {
  padding: 10px 18px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  margin-left: 0;
}

#btn-adicionar-simulado:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* --- MODAL OVERLAY --- */
.modal-overlay-simulado {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay-simulado.active {
  opacity: 1;
  visibility: visible;
}

#modalContentSimulado {
  background: var(--card-bg);
  width: 900px;
  max-width: 95%;
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--shadow-color);
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-header h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: 28px;
}

.close-icon {
  color: var(--primary-color); /* Cor azul clara do X */
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}

.close-icon:hover {
  color: var(--primary-color);
}

/* Top Form Grid */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  justify-content: space-between;
  align-items: center;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group input {
  background-color: var(--input-bg);
  border-radius: 5px;
  color: var(--text-color);
  padding: 10px;
}

.input-group label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
  text-align: left;
}

/* Estilo Material Design Input (apenas linha embaixo) */
.mat-input {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 16px;
  color: #333;
  outline: none;
  transition: border-color 0.3s;
}

.mat-input:focus {
  border-bottom: 2px solid var(--primary-color);
}

/* Table Styling */
.table-container {
  margin-bottom: 20px;
}

.simulado-table {
  width: 100%;
  border-collapse: collapse;
}

.simulado-table th {
  padding: 10px;
  color: white;
  font-weight: bold;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

/* Ícones do cabeçalho */
.header-icon {
  font-size: 16px;
  color: white;
}
.icon-edit {
  color: white;
}
.icon-check {
  color: var(--green-badge);
}
.icon-times {
  color: var(--red-badge);
}

.simulado-table td {
  padding: 10px;
  vertical-align: middle;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

.simulado-table tr:nth-child(odd) {
  /* background-color: var(--table-stripe); */
}

.simulado-table tr:hover {
  background-color: var(--table-hover);
}

/* Inputs dentro da tabela */
.table-input {
  width: 50px;
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  font-size: 15px;
  color: var(--text-color);
  outline: none;
}
.table-input:focus {
  border-bottom: 2px solid var(--primary-color);
}

/* Input de corretas verde, erradas vermelho */
.input-correct {
  color: var(--green-badge);
  font-weight: bold;
  border-bottom: 1px solid var(--green-badge);
}
.input-wrong {
  color: var(--red-badge);
  font-weight: bold;
  border-bottom: none;
  pointer-events: none;
} /* Erradas calculado auto */

/* Badges de porcentagem */
.badge-percent {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  font-size: 12px;
  min-width: 30px;
  text-align: center;
}

.badge-red {
  background-color: var(--red-badge);
}
.badge-yellow {
  background-color: var(--yellow-badge);
}
.badge-green {
  background-color: var(--green-badge);
}

.btn-delete {
  background: none;
  border: none;
  color: #bdbdbd;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}
.btn-delete:hover {
  color: #ef5350;
}

/* Totais Bar */
.results-bar {
  background-color: var(--primary-light);
  border-radius: 5px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
  color: #444;
  font-weight: bold;
}

.results-label {
  margin-right: 20px;
  font-size: 12px;
  color: var(--text-color);
  text-transform: uppercase;
}

.result-item {
  width: 60px;
  text-align: center;
  font-size: 16px;
  color: var(--text-color);
}

.result-total {
  color: var(--text-color);
}
.result-correct {
  color: var(--green-badge);
}
.result-wrong {
  color: var(--red-badge);
}
.result-points {
  color: var(--text-color);
}
.result-percent {
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.results-items {
  display: flex;
  background-color: var(--table-stripe);
  padding: 10px;
  border-radius: 10px;
}

/* Result Item Wrapper */
.result-item-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.result-item-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Comments Area */
.comments-section {
  margin-top: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.comments-section label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.comments-input {
  border: none;
  border-bottom: 2px solid var(--primary-color);
  background-color: var(--input-bg);
  margin-top: 10px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  color: var(--text-color);
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
}

/* Footer Buttons */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}

.btn-solid {
  background: #80cbc4; /* Um tom mais claro de teal para o botão desabilitado/normal */
  border: none;
  color: white;
}

.btn-solid.active-save {
  background: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.right-buttons {
  display: flex;
  gap: 10px;
}

/* Responsive */
@media (max-width: 950px) {
  #modalContentSimulado {
    width: 80%;
    padding: 20px;
    height: 80vh;
  }

  .btn-delete {
    font-size: 13px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 20px;
  }

  .input-group {
    width: 100%;
  }

  .simulado-table th,
  .simulado-table td {
    padding: 8px 5px;
  }

  .simulado-table td {
    font-size: 11px;
  }

  .simulado-table th {
    width: auto !important;
    font-size: 11px;
  }

  .table-input {
    width: 40px;
    font-size: 11px;
  }

  .header-icon {
    font-size: 13px;
  }

  .results-bar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 5px;
  }

  .results-label {
    text-align: center;
    margin-bottom: 10px;
  }

  .results-items {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .result-item-wrapper {
    padding: 10px;
    background-color: var(--badge-bg);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .result-item-label {
    font-size: 10px;
  }

  .result-item {
    font-size: 20px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }

  .right-buttons {
    width: 100%;
  }

  .right-buttons button {
    flex: 1;
  }
}
