/* ================== Campos e Formulários ================== */
.campo-especifique {
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.form-group span {
  display: block;
  margin-top: 5px;
}


.form-group input[type="text"],
.form-dados-group input[type="text"],
.form-dados-group select,
.form-dados-group textarea {
  font-family: 'Poppins', sans-serif;
  width: 100%;
  padding: 8px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.form-group textarea,
.form-dados-group textarea {
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}

.form-group-botao {
  text-align: right;
}

/* ================== Layout de Dados ================== */
.form-section {
  background: #fff;
  border: 1px solid #ccc;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 5px;
}

.form-dados-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.form-dados-row .form-dados-group.full-width {
  flex: 0 0 100%;
  max-width: 100%;
}

.form-dados-group {
  display: flex;
  flex-direction: column;
}

/*Para autorizações*/
.form-dados-group.autorizacao p {
  margin-bottom: 2px;
}

/* ================== Checkbox Customizado ================== */
.checkbox-custom {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  margin-bottom: 10px;
  user-select: none;
}

.checkbox-custom input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  z-index: 2;
}

.checkbox-custom label {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  z-index: 1;
}

.checkbox-custom .checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #f68028;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

.checkbox-custom input[type="checkbox"]:checked + label .checkmark:after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 3px;
  height: 6px;
  border: solid #f68028;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-custom:hover .checkmark {
  background-color: #ffe9d6;
}

.checkbox-custom .checkbox-text {
  margin-left: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
}

/* ================== Estado Desabilitado ================== */
.checkbox-custom input[type="checkbox"]:disabled + label {
  cursor: not-allowed;
  opacity: 0.6;
}

.checkbox-custom input[type="checkbox"]:disabled + label .checkmark {
  border-color: #ccc;
  background-color: #f5f5f5;
}

.checkbox-custom input[type="checkbox"]:disabled + label .checkbox-text {
  color: #999;
}

.checkbox-custom input[type="checkbox"]:disabled + label:hover .checkmark {
  background-color: #f5f5f5; /* mantém o mesmo no hover */
}


/* ================== Radio Customizado ================== */
.radio-custom {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  margin-bottom: 10px;
  margin-right: 20px;
  user-select: none;
}

.radio-custom input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.radio-custom label {
  position: relative;
  padding-left: 26px;
  display: flex;
  align-items: center;
  z-index: 1;
}

.radio-custom label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 2px solid #f68028;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
}

.radio-custom input[type="radio"]:checked + label::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f68028;
}

.radio-custom:hover label::before {
  background-color: #ffe9d6;
}

/* ================== Espaçamento para campos "Especifique" ================== */
#deficiencia-esp,
#outros-esp,
#LabelDefTrans,
#LabelRelSaude {
  margin-top: 10px;
  margin-bottom: 15px;
}

/* ================== Responsividade ================== */
@media (max-width: 480px) {
  .form-group input[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .form-section {
    padding: 20px;
  }
}

@media (min-width: 600px) {
  .form-dados-row {
    flex-direction: row;
  }

  .form-dados-row .form-dados-group {
    flex: 1;
  }
}

/* Feedback do CPF */
#cpf-feedback {
  font-size: 12px;
  margin-top: 4px;
  transition: color 0.3s, opacity 0.3s;
  opacity: 0;
}

#cpf-feedback.show {
  opacity: 1;
}

#cpf-feedback.invalid {
  color: red;
}

#cpf-feedback.valid {
  color: green;
}

/* Input do CPF */
#Cpf.cpf-invalido {
  border-color: red;
}

#Cpf.cpf-valido {
  border-color: green;
}



/* ================== Programação Integral ================== */
/* Container principal */
.container-programacao {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* desktop: 5 colunas fixas */
  gap: 10px;
  width: 100%;
}

/* Cabeçalho dos dias */
.dias {
  display: contents; /* cada coluna do dia ocupa a posição do grid */
}

.coluna-dia {
  text-align: left;
  font-weight: 600;
  color: #666; /* cinza */
  font-size: 13px;
  padding-bottom: 4px;
}

/* Períodos */
.periodos {
  display: contents; /* mantém os períodos nas colunas do dia */
}

.coluna-periodo {
  text-align: left;
  margin-bottom: 8px;
}

.textocinza {
  color: #aaa;
}

.checkbox-custom {
  justify-content: flex-start;
}

/* ================== Responsivo ================== */

/* ----- DESKTOP (mantém o grid) ----- */
@media (min-width: 769px) {
  /* Esconde o nome do dia dentro do bloco (usado só no celular) */
  .day-block .coluna-dia {
    display: none;
  }

  /* Mantém o grid de 5 colunas como antes */
  .container-programacao {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }

  .linha.dias {
    display: contents;
  }

  .linha.periodos {
    display: contents;
  }
}

/* ----- MOBILE (até 768px) ----- */
@media (max-width: 768px) {
  /* Esconde o cabeçalho de dias do grid */
  .linha.dias {
    display: none;
  }

  /* Container principal vira lista vertical */
  .container-programacao {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  /* Cada dia é um bloco separado com seus períodos */
  .day-block {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }

  /* Nome do dia */
  .day-block .coluna-dia {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
  }

  /* Lista de períodos dentro de cada dia */
  .day-block .linha.periodos {
    display: flex;
    flex-direction: column;
    gap: 3px; /* <<< diminui o espaço entre Integral e Semi-integral */
  }

  .day-block .coluna-periodo {
    margin-left: 8px; /* menor recuo */
    margin-bottom: 2px; /* <<< menos espaço abaixo de cada item */
  }

  .checkbox-custom {
    justify-content: flex-start;
  }
}

/* Ajuste extra para telas muito pequenas */
@media (max-width: 480px) {
  .day-block {
    padding: 8px 10px;
  }

  .day-block .coluna-dia {
    font-size: 14px;
  }

  .day-block .coluna-periodo {
    margin-left: 6px;
  }
}

