/* =============================================================================
   Chosen - Estilo Bootstrap 4.3
   ========================================================================== */

/* @group Base */
.chzn-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  font-size: 1rem; /* Tamanho da fonte do Bootstrap */
  width: 100%; /* Ocupa a largura total como um form-control */
  zoom: 1;
  *display: inline;
}

.chzn-container .chzn-drop {
  background: #fff;
  border: 1px solid #ced4da; /* Borda padrão do Bootstrap */
  border-top: 0;
  position: absolute;
  top: 100%; /* Alinha com a parte de baixo do input */
  left: -1px; /* Compensa a borda */
  right: -1px; /* Compensa a borda */
  z-index: 1060; /* z-index comum para dropdowns no Bootstrap */
  -webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  border-radius: 0 0 .25rem .25rem;
}
/* @end */

/* @group Single Chosen */
.chzn-container-single .chzn-single {
  /* Reset e Estilo base do form-control */
  display: block;
  width: 100%;
  height: calc(1.5em + .75rem + 2px); /* Altura padrão do Bootstrap */
  padding: .375rem .75rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  /* -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); */
  -webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
  transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}

.chzn-container-single .chzn-default {
  color: #6c757d; /* Cor do placeholder do Bootstrap */
}

.chzn-container-single .chzn-single span {
  display: block;
  overflow: hidden;
  margin-right: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Oculta o 'x' de limpar */
.chzn-container-single .chzn-single abbr {
  display: block;
  position: absolute;
  top: 50%;
  right: 26px;
  margin-top: -7px;
  width: 12px;
  height: 13px;
  font-size: 1px;
  background: url('chosen-sprite.png') right top no-repeat;
}
.chzn-container-single .chzn-single abbr:hover {
  background-position: right -11px;
}

/* Seta do dropdown (estilo Bootstrap 4) */
.chzn-container-single .chzn-single div {
  position: absolute;
  right: 0;
  top: 0;
  display: block;
  height: 100%;
  width: 40px; /* Área de clique maior */
}
.chzn-container-single .chzn-single div b {
  display: block;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;
}

.chzn-container-single .chzn-search {
  padding: .375rem .375rem;
  position: relative;
  margin: 0;
  white-space: nowrap;
  z-index: 1010;
}

.chzn-container-single .chzn-search input {
  /* Estilo do input de busca */
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  outline: 0;
  margin: 0;
}

.chzn-container-single .chzn-drop {
  width: 100% !important;
  -moz-background-clip: padding;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}

.chzn-container-single-nosearch .chzn-search {
  display: none;
}
/* @end */

/* @group Multi Chosen */
.chzn-container-multi .chzn-choices {
  /* Estilo base do form-control */
  display: block;
  width: 100%;
  min-height: calc(1.5em + .75rem + 2px);
  padding: .2rem .75rem; /* Padding menor para caber as tags */
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  -webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  position: relative;
  overflow: hidden;
  margin: 0;
  cursor: text;
}

.chzn-container-multi .chzn-choices li {
  float: left;
  list-style: none;
}

.chzn-container-multi .chzn-choices .search-field {
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.chzn-container-multi .chzn-choices .search-field input {
  color: #495057;
  background: transparent !important;
  border: 0 !important;
  font-family: inherit;
  font-size: 100%;
  height: auto;
  padding: 5px;
  margin: 2px 0;
  outline: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.chzn-container-multi .chzn-choices .default {
  color: #6c757d;
}

.chzn-container-multi .chzn-choices .search-choice {
  /* Estilo de "badge" do Bootstrap */
  padding: .25em .6em;
  font-size: 85%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25rem;
  color: #212529;
  background-color: #e9ecef;
  border: 1px solid #ddd;
  margin: 3px 5px 3px 0;
  position: relative;
  cursor: default;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.chzn-container-multi .chzn-choices .search-choice span {
  cursor: default;
}

.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
  display: block;
  position: absolute;
  right: 3px;
  top: 50%;
  margin-top: -6px;
  width: 12px;
  height: 13px;
  font-size: 1px;
  background: url('chosen-sprite.png') right top no-repeat;
}
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
  background-position: right -11px;
}

.chzn-container-multi .chzn-choices .search-choice-focus {
  background: #d4d4d4;
}
/* @end */

/* @group Results */
.chzn-container .chzn-results {
  color: #495057;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: .5rem 0; /* Espaçamento do dropdown do Bootstrap */
  max-height: 240px;
  -webkit-overflow-scrolling: touch;
}

.chzn-container .chzn-results li {
  display: none;
  margin: 0;
  padding: .25rem 1.5rem; /* Espaçamento dos itens do dropdown */
  line-height: 1.5;
  list-style: none;
  word-wrap: break-word;
}

.chzn-container .chzn-results .active-result {
  cursor: pointer;
  display: list-item;
}

/* Item destacado/hover */
.chzn-container .chzn-results .highlighted {
  color: #ffffff;
  background-color: #1967D2; /* Cor primária do Bootstrap */
  text-decoration: none;
}

.chzn-container .chzn-results li em {
  background: transparent;
  font-style: normal;
  text-decoration: underline;
}
.chzn-container .chzn-results .highlighted em {
  background: transparent;
}

.chzn-container .chzn-results .no-results {
  color: #6c757d;
  display: list-item;
  padding: .25rem 1.5rem;
  background: #f8f9fa;
}

.chzn-container .chzn-results .group-result {
  cursor: default;
  color: #999;
  font-weight: bold;
}

.chzn-container .chzn-results .group-option {
  padding-left: 15px;
}

.chzn-container-multi .chzn-drop .result-selected {
  display: none;
}
/* @end */

/* @group Active/Focus State */
.chzn-container-active .chzn-single,
.chzn-container-active .chzn-choices {
  /* Estilo de foco do Bootstrap */
  border-color: #80bdff;
  outline: 0;
  -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.chzn-container-active.chzn-container-single .chzn-single {
  border: 1px solid #80bdff;
  background-color: #fff; /* Sem gradiente no foco */
  -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
  border-bottom-left-radius: .25rem;
  border-bottom-right-radius: .25rem;
}

.chzn-container-active.chzn-container-single .chzn-single-with-drop {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.chzn-container-active.chzn-container-single .chzn-single-with-drop div b {
  /* Girar a seta para cima (opcional, mas comum) */
  transform: rotate(180deg);
}

.chzn-container-active .chzn-choices .search-field input {
  color: #111 !important;
}
/* @end */

/* @group Disabled Support */
.chzn-disabled {
  cursor: not-allowed;
  opacity: .65 !important;
}
.chzn-disabled .chzn-single {
  cursor: not-allowed;
  background-color: #e9ecef; /* Cor de fundo desabilitado do Bootstrap */
}
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
  cursor: default;
}
/* @end */

/* RTL (Right To Left) - Ajustes básicos */
.chzn-rtl { text-align: right; }
.chzn-rtl .chzn-single { padding: 0 8px 0 0; }
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
.chzn-rtl .chzn-single abbr { left: 26px; right: auto; }
.chzn-rtl .chzn-choices li { float: right; }
.chzn-rtl .chzn-choices .search-choice { margin: 3px 5px 3px 0; padding: 3px 5px 3px 19px; }
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
.chzn-rtl .chzn-search input { direction: rtl; }
/* @end */