/* ------------------ meu código -----------------------------*/

.select-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 0.8rem;
}

.fancy-select {
  position: relative;
  /*width: 16.5rem;*/
  max-width: 100%;
  font-size: 1.0rem;
  color: #000;
  margin-top: 1.2rem;
  z-index: 1025;
}

.discipline-select{
  width: 21rem;
}

.semester-select{
  width: 9rem;
}

.select-button {
  width: 100%;
  font-size: 1.0rem;
  background-color: #fff;
  padding: 0.675em 1em;
  border: 1px solid #caced1;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-value {
  text-align: left;
}

.arrow {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #000;
  transition: transform ease-in-out 0.3s;
}

.select-dropdown {
  position: absolute;
  list-style: none;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  border: 1px solid #caced1;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  transition: 0.5s ease;

  transform: scaleY(0);
  opacity: 0;
  visibility: hidden;
  z-index: 1026;
}

.select-dropdown:focus-within {
  box-shadow: 0 10px 25px rgba(94, 108, 233, 0.6);
}

.select-dropdown li {
  position: relative;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.select-dropdown li label {
  width: 100%;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.select-dropdown::-webkit-scrollbar {
  width: 7px;
}
.select-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 25px;
}

.select-dropdown::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 25px;
}

.select-dropdown li:hover,
.select-dropdown input:checked ~ label {
  background-color: #f2f2f2;
}

.select-dropdown input:focus ~ label {
  background-color: #dfdfdf;
}

.select-dropdown input[type="radio"] {
  position: absolute;
  left: 0;
  opacity: 0;
}


/* interactivity */

.fancy-select.active .arrow {
  transform: rotate(180deg);
}

.fancy-select.active .select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: scaleY(1);
}

.warning{
  color:red;
  font-size: 12px;
  padding-left: 2px;
  display: none;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.25rem;
    padding-top: 1.25rem;
    margin-left: 0.25rem;
}

.form-input {
    /* Estilos base (sem foco) */
    width: 100%;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    border: 1px solid #d1d5db; /* border border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition: all 0.15s ease-in-out; /* transition duration-150 ease-in-out */
}

/* Estilos para a área de texto (textarea) */
.form-textarea {
    /* Herda os estilos base do input para manter a consistência */
    width: 100%;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    border: 1px solid #d1d5db; /* border border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition: all 0.15s ease-in-out; /* transition duration-150 ease-in-out */
    resize: none; /* remove a opção de redimensionamento do textarea */
}

/* Estilos para o botão */
.form-button {
    /* Estilos base */
    width: 100%; /* w-full */
    background-color: #4f46e5; /* bg-indigo-600 */
    color: #fff; /* text-white */
    font-weight: 600; /* font-semibold */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    transition: all 0.2s ease-in-out; /* transition duration-200 ease-in-out */
    border: none; /* Para remover a borda padrão do botão */
    cursor: pointer;
}

/* Estilos para o botão ao passar o mouse */
.form-button:hover {
    background-color: #4338ca; /* hover:bg-indigo-700 */
}

/* Estilos quando o campo está em foco */
.form-input:focus,
.form-textarea:focus,
.form-button:focus {
    outline: none; /* focus:outline-none */
    border-color: #6366f1; /* focus:border-indigo-500 */
    /*
     * Esta box-shadow emula o efeito de "anel" de foco (focus:ring-2 focus:ring-indigo-500)
     * O primeiro box-shadow é o anel interno e o segundo, o anel externo
     */
    box-shadow: 0 0 0 2px #fff, 0 0 0 2px #6366f1;
}


/* Listas hierárquicas */
.unit-list { 
  list-style: none; 
  padding-left: 20px;   /* indentação dos subníveis */
  margin: 0;
}

/* Cada item da hierarquia */
.unit-item { 
  margin: 6px 0; 
}

/* Cabeçalho com input + botões */
.unit-header {
  display: flex;
  align-items: center;
  gap: 8px;        /* espaço entre input e botões */
}

/* Subníveis aparecem embaixo */
.unit-item > ul {
  margin-left: 20px;  /* indentação extra para filhos */
  margin-top: 6px;
}

/* Campo de texto */
.form-input { 
  flex: 1;        /* ocupa o máximo de espaço disponível */
  padding: 4px 6px;
  font-size: 14px;
}

/* Botões + e - */
.btn-add, .btn-remove { 
  padding: 2px 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f8f8;
}

.btn-add:hover { 
  background: #d4fcd4;   /* verde claro */
  border-color: #6c6; 
}

.btn-remove:hover { 
  background: #fcd4d4;   /* vermelho claro */
  border-color: #c66; 
}

/*---------------------------------------------------------------*/
@media (max-width: 550px) {
  .select-wrapper{
    flex-direction: column;
  }

  .fancy-select {
    margin-top: 0;
    z-index: unset;
    width: 80vw;
  }


}