/* ===== GERAL ===== */
.checkbox-question-widget {
  font-family: inherit;
  max-width: 100%;
  box-sizing: border-box;
  margin: auto;
}

.checkbox-question-main-text {
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.2em;
  color: #333;
}

.checkbox-question-table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
}

.checkbox-question-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* ===== HEADER ===== */
.checkbox-question-header {
  background-color: #f5f5f5;
  font-weight: bold;
}

.checkbox-question-header th {
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid #ddd;
}

.checkbox-question-header .description-col {
  text-align: left;
  padding-left: 20px;
  width: 60%;
}

.checkbox-question-header .option-col {
  width: 20%;
}

/* ===== LINHAS ===== */
.checkbox-question-row {
  border-bottom: 1px solid #eee;
}

.checkbox-question-row td {
  padding: 15px;
  vertical-align: middle;
}

.description-col {
  text-align: left;
  padding-left: 20px;
}

.option-col {
  text-align: center;
}

/* ===== CHECKBOX STYLES ===== */
.checkbox-question-option {
  position: relative;
  display: inline-flex; /* Garante que os elementos dentro do label fiquem lado a lado */
  align-items: center;
  justify-content: center; /* Centraliza o radio e o ícone dentro do label */
  cursor: pointer;
}

.checkbox-question-input {
  position: absolute;
  opacity: 0;
  height: 100%;
  width: 100%;
  z-index: 2;
  cursor: pointer; /* Garante que o cursor de "clique" apareça em toda a área */
}

.checkbox-question-custom-radio {
  flex-shrink: 0; /* Impede que o rádio encolha */
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #aaa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.checkbox-question-custom-radio:after {
  content: "";
  display: none;
  width: 10px;
  height: 10px;
  background: #2196f3;
  border-radius: 50%;
}

.checkbox-question-input:checked ~ .checkbox-question-custom-radio {
  border-color: #2196f3;
}

.checkbox-question-input:checked ~ .checkbox-question-custom-radio:after {
  display: block;
}

.checkbox-question-check-button{
  border:none;
}

.checkbox-question-solve-button{
  border:none;
}

.checkbox-question-reset-button{
  border:none;
}

/* ===== MOBILE STYLES ===== */
/* Esconde as opções mobile por padrão, serão exibidas via media query */
.mobile-options-row {
  display: none;
}

.mobile-options-container {
  padding: 0 !important;
  display: flex; /* Adicionado: Garante que os divs mobile-option sejam flex item */
  flex-wrap: wrap; /* Adicionado: Permite que as opções quebrem linha se necessário */
}

/* Por padrão, esconde a opção mobile para desktop */
.mobile-option {
  display: none;
  padding: 10px;
  border-top: 1px solid #eee;
  box-sizing: border-box; /* Garante que padding e border sejam incluídos na largura */
}

.mobile-option-label-true,
.mobile-option-label-false {
  margin-left: 10px; /* Espaçamento entre o rádio/ícone e o texto */
  font-size: 14px;
}

@media (max-width: 767px) {
  /* Esconde elementos desktop */
  .desktop-label,
  .desktop-option {
    display: none !important;
  }
  
  /* Mostra linha de opções mobile */
  .mobile-options-row {
    display: table-row;
  }
  
  /* Mostra as opções mobile individualmente com flex */
  .mobile-option {
    display: flex; /* Agora ele é 'flex' em mobile */
    align-items: center; /* Alinha o rádio, ícone e texto verticalmente */
    justify-content: center; /* Centraliza horizontalmente dentro dos 50% */
    width: 50%; /* Mantém a divisão em duas colunas */
    /* Removido float: left; pois display: flex; já lida com o layout */
  }
  
  /* Ajusta largura das colunas */
  .description-col {
    width: 100% !important;
  }
  
  /* Ajusta padding para mobile */
  .checkbox-question-row td {
    padding: 12px 15px;
  }
  
  /* Remove borda da última linha */
  .checkbox-question-row:last-child {
    border-bottom: none;
  }
  
  /* Ajusta estilo do radio button para mobile */
  .checkbox-question-custom-radio {
    width: 22px;
    height: 22px;
  }
  
  .checkbox-question-custom-radio:after {
    width: 12px;
    height: 12px;
  }

  /* Garante que o label da opção no mobile seja flex para alinhar o rádio e o ícone */
  .mobile-option .checkbox-question-option {
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza o rádio e o ícone dentro do label */
    padding-right: 5px; /* Pequeno espaçamento entre o ícone e o texto "Sim/Não" */
  }

  .checkbox-question-option {
        overflow: visible;
    }
    
    .checkbox-question-row.checked + .mobile-options-row .mobile-option-label-true,
.checkbox-question-row.checked + .mobile-options-row .mobile-option-label-false {
  display: none !important;
}

/* Como agora só fica o ícone colorido, centralize sem margem extra */
.checkbox-question-row.checked + .mobile-options-row .checkbox-question-option .checkbox-question-feedback-icon {
  margin-left: 0 !important;
}

}

/* ===== FEEDBACK STYLES ===== */
.checkbox-question-feedback {
    display: none; /* Mantemos oculto para remover o feedback de texto */
}

.checkbox-question-feedback-icon {
    margin-left: 8px; /* Espaçamento padrão para desktop */
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0; /* Impede que o ícone encolha se houver pouco espaço */
}

.checkbox-question-feedback-icon.correct {
    color: #2e7d32;
}

.checkbox-question-feedback-icon.incorrect {
    color: #c62828;
}

/* Ajustes para mobile */
@media (max-width: 767px) {
    .checkbox-question-feedback-icon {
        margin-left: 5px; /* Espaçamento ajustado para mobile */
        font-size: 14px;
    }
}