/* Listas */
.config-list {
  list-style: none;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}
.config-list li {
  background: var(--table-stripe);
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Quando a lista está bloqueada, apaga o botão de deletar */
.config-list.locked .delete-subject {
  opacity: 0.3; /* Deixa transparente */
  filter: grayscale(100%); /* Tira a cor vermelha */
  cursor: not-allowed; /* Mostra cursor de bloqueio no PC */
}

/* Icone de arrastar (Handle) */
.drag-handle {
  cursor: grab;
  color: #ccc;
  margin-right: 10px;
  font-size: 20px;
  font-weight: bold;
  user-select: none; /* Impede seleção de texto ao arrastar */
}

.drag-handle:active {
  cursor: grabbing;
}

/* --- CHECKBOXES PERSONALIZADOS (DIAS DE DESCANSO) --- */
/* Esconde o checkbox original feio */
.rest-day-selector input[type="checkbox"] {
  display: none;
}

/* Estilo do Label que age como botão */
.rest-day-selector {
  display: inline-block;
  cursor: pointer;
  padding: 10px 15px;
  margin: 5px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  user-select: none;
  box-shadow: 0 2px 4px var(--shadow-color);
}

/* Quando selecionado (checked) */
.rest-day-selector:has(input:checked) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Container Mobile */
.mobile-lock-container {
  display: none; /* Desktop esconde */
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.lock-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lock-label-text {
  font-weight: 600;
  color: var(--text-color);
}

/* --- ESTILO DO SWITCH --- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc; /* Cor Desligado */
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}

/* Quando ligado (Checked) */
input:checked + .slider {
  background-color: var(--primary-color); /* Cor Ligado */
}

/* Animação da bolinha */
input:checked + .slider:before {
  transform: translateX(24px);
}

/* Arredondado */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Mostra apenas no Mobile */
@media (max-width: 768px) {
  .mobile-lock-container {
    display: block;
  }
}

/* Feedback visual na lista */
.config-list.locked .drag-handle {
  opacity: 0.1;
  cursor: default;
}

/* --- NOVA ÁREA DE ADICIONAR MATÉRIA --- */
.add-subject-row {
  display: flex;
  gap: 10px; /* Espaço entre input e botão */
  align-items: center;
  margin-bottom: 20px;
}

.add-subject-row input {
  flex: 1; /* Ocupa todo o espaço sobrando */
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 15px;
  transition: border-color 0.2s;
  height: 45px; /* Altura fixa para alinhar com o botão */
  box-sizing: border-box;
}

.add-subject-row input:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* Botão Quadrado com + */
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px; /* Largura fixa */
  height: 45px; /* Altura fixa (igual ao input) */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 24px; /* Tamanho do símbolo + */
  cursor: pointer;
  transition:
    transform 0.2s,
    background-color 0.2s;
  box-shadow: 0 2px 5px var(--shadow-color);
  padding: 0;
  line-height: 0; /* Centraliza verticalmente o texto */
}

.btn-add:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-add:active {
  transform: scale(0.95);
}

.tip-rest-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--table-stripe);
  color: var(--text-color);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bolder;
}
