/* ------ Helpers ----- */

.align-center {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.content-right {
  text-align: right;
  flex-direction: row-reverse;
}

.break {
  flex-basis: 100%;
  height: 0;
}

/* ----- Checkbox estilizado ----- */

.checkbox-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: relative;
  height: 20px;
  width: 20px;
  background-color: transparent;
  border: 2px solid #555;
  border-radius: 4px;
  transition: all 0.1s;
}

.checkbox-label {
  margin-left: 10px;
}

.checkbox-container:hover .checkmark {
  border-color: #207834;
}

.checkbox:checked~.checkmark {
  background-color: #28a745;
  border-color: #207834;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox:checked~.checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ----- Botões ----- */

.botoes {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button:is(.abrir-modais, .botao) {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  color: #fff;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
}

button.abrir-modais:focus,
.botao:focus {
  outline: 0;
}

button.abrir-modais:hover,
.botao:hover {
  filter: brightness(110%);
}

button.abrir-modais:before,
button.botao:before {
  font: normal 1rem/1 dashicons;
}

button.anexos:before {
  content: "\f546";
}

button.movimentacoes:before {
  content: "\f163";
}

button.lotes:before {
  content: "\f203";
}

button.laranja {
  background: #d1a02e !important;
  border: 1px solid #d1a02e !important;
}

button.verde {
  background: #28a745 !important;
  border: 1px solid #28a745 !important;
}

button.azul {
  background: #093c75 !important;
  border: 1px solid #093c75 !important;
}

button.vermelho {
  background: #dc3545 !important;
  border: 1px solid #b72836 !important;
}

button.cinza {
  background: #fff !important;
  border: 1px solid #dbdbdb !important;
  color: #00457a !important;
}

button.cinza:hover {
  border: 1px solid #ababab !important;
  color: #022947;
}

button.center {
  margin: 0 auto;
}

button.loading:before {
  content: "\f460";
  animation: spin 1s linear infinite;
}

button.botao.pdf {
  color: #b72836 !important;
}

.botao.pdf:hover {
  color: #ad1322 !important;
}

.botao.excel {
  color: #28a745 !important;
}

.botao.excel:hover {
  color: #14872e !important;
}

/* ----- Aviso ----- */

.aviso {
  margin: 1rem 0;
  background: #f5f5f5;
  border: 1px dashed #00457a;
  padding: 1rem 2rem;
  border-radius: 6px;
}

.aviso-titulo {
  color: #00457a;
}

.aviso-titulo .dashicons {
  vertical-align: middle;
}

/* ----- Filtros ----- */

form.licitacoes-filtros {
  margin-bottom: 30px;
}

.licitacoes-filtros-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
  background: #ffffff;
  border: 1px dashed #ddd;
  padding: 1rem 2rem;
  border-radius: 6px;
}

.licitacoes-filtros-wrapper input[type="text"],
.licitacoes-filtros-wrapper input[type="number"] {
  display: inline-block;
  width: 100%;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  color: #303030;
  background: linear-gradient(to bottom, #fefefe, #f2f2f2);
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.add-new-line {
  grid-template-rows: repeat(4, 1fr);
}

.center-item-botoes-licitacoes {
  grid-area: 4 / 2 / 5 / 3;
}

.licitacoes-filtros-wrapper .item label {
  font-weight: bold;
}

.licitacoes-filtros-wrapper .item.botoes {
  padding-top: 0.5rem;
}

.licitacoes-filtros-wrapper .item.botoes button {
  width: 100%;
  border-radius: 6px;
}

.licitacoes-filtros-wrapper .item.botoes button[type="submit"]:before {
  content: "\f536";
}

.licitacoes-filtros-wrapper .item.botoes button[type="reset"]:before {
  content: "\f463";
}

.licitacoes-filtros-wrapper .item.botoes button:hover {
  filter: brightness(110%);
}

/* ----- Sidebar ----- */

.menu-item.ativo {
  background: #d1a02e;
}

.menu-item.ativo a {
  color: #fff;
  font-weight: 600;
}

.menu-item:first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ----- Tabela: Licitações ----- */

table.licitacoes {
  margin-bottom: 2rem;
  border: 0;
}

table.licitacoes th {
  text-align: right;
}

thead.cabecalho {
  background: #00457a;
  color: #fff;
  border: 1px solid #dbdbdb;
}

thead.cabecalho.laranja {
  background: #d1a02e;
}

thead.cabecalho th {
  text-align: center;
}

.table-bordered thead.cabecalho th {
  border: 0;
}

thead.cabecalho a {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 400;
}

thead.cabecalho span.editar-licitacao-icone {
  font-size: 1rem;
  vertical-align: middle;
}

thead.cabecalho .post-edit-link:hover {
  text-decoration: underline;
}

.licitacoes-highlight {
  background: #eddaaf;
  padding: 0 0.2rem;
}

td.licitacao-objeto {
  text-align: justify;
}

table.licitacao-item-lote {
  margin-bottom: 1rem;
}

table.licitacao-item-lote .cabecalho {
  background: #d1a02e38 !important;
}

table.licitacao-item-lote .cabecalho th,
table.licitacao-item-lote .cabecalho td {
  border: 1px solid #e3cf96;
}

/* ----- Ações ----- */

.licitacoes-acoes {
  margin-bottom: 1rem;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.licitacoes-acoes span.dashicons {
  vertical-align: middle;
}

.gerar-relatorio:before {
  content: "\f316";
}

.licitacoes-acoes .botoes ul {
  display: flex;
  gap: 5px
}

/* ------ Anexos da licitação ----- */

.licitacao-anexos .destacar-primeiro tr:first-child {
  background: #d1a02e;
  border-color: #d1a02e;
  color: #fff;
}

.licitacao-anexos .destacar-primeiro tr:first-child td {
  border-color: #b9840a;
}

.licitacao-anexos .destacar-primeiro tr:first-child a {
  color: #fff;
  text-decoration: underline;
}

.licitacao-anexos .destacar-primeiro tr:first-child a:hover {
  font-weight: bold;
}

.licitacao-anexos .destacar-primeiro tr:first-child .tamanho-arquivo {
  color: #fff;
}

.licitacoes .tamanho-arquivo {
  font-size: 13px;
  color: #6e6e6e;
}

/* ----- Tabela de Detalhamento dos lotes ----- */

table.detalhamento-lote thead.cabecalho.inferior th,
table.detalhamento-lote thead.cabecalho.inferior tr {
  background: #fff;
  color: #333;
  border: 1px solid #dee2e6;
}

table.detalhamento-lote .cabecalho span,
table.detalhamento-lote-itens .cabecalho span {
  vertical-align: sub
}

table.detalhamento-lote-itens .cabecalho th {
  border: 1px solid #dee2e6;
}

table.detalhamento-lote-itens .cabecalho.inferior th {
  background: #fff;
  text-align: left;
  color: #333;
  white-space: nowrap
}

table.detalhamento-lote-itens .cabecalho.inferior th.numero {
  width: 60px;
}

table.detalhamento-lote-itens .valores {
  width: min-content;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 0.175rem;
  column-gap: 0.5rem
}

table.detalhamento-lote-itens .largura-do-conteudo {
  width: 1%;
  white-space: nowrap;
}

/* ---- Tabela dos modais ----- */

table.modal-table,
.modal table.licitacoes {
  font-size: 0.9rem;
}

table.modal-table th {
  text-align: left;
}

/* ----- Adicional para Modais ------ */

.modal {
  overflow-y: auto;
}

.modal-xl {
  max-width: 90%;
}

.modal .badge {
  font-size: 100%;
}

.modal h4 {
  font-size: 1.3rem;
}

.modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #ddd;
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: #c5c5c5;
  border-radius: 10px;
  border: 1px solid #bfbfbf;
}

.modal-header-botoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1.25rem;
  text-align: center;
}

.modal-header .modal-header-botoes .close {
  margin: 0;
  padding: 0;
}

.texto-aguardando-vencedor:before {
  font-family: "dashicons";
  content: "\f469";
  font-size: 20px;
  vertical-align: sub;
  margin-right: 4px;
}

.badge-numero-licitacao {
  color: #fff;
  background-color: #d1a02e;
}

.modal-error-message {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: 1px solid #f1e0bc;
  background: #fff5df;
  gap: 3px;
  color: #a9313d;
}

.modal-error-message span {
  color: #e76d79;
}

.modal-loading {
  margin: 50px 0;
  text-align: center;
}

.loader {
  color: #6a6a6a;
  animation: spin 1s linear infinite;
  vertical-align: text-top;
  font-size: 32px;
  width: 32px;
  height: 32px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.modal-header-lotes {
  background: #093c75;
  color: #fff;
  border-bottom-color: #5a7593;
}

.table-bordered .modal-header-lotes td,
.table-bordered .modal-header-lotes th {
  border-color: #5a7593;
}

/* ----- Paginação ----- */

div.pagination {
  margin: 10px 0;
}

/* ------ Geração de Relatórios ------ */

.licitacoes-relatorio button {
  white-space: nowrap;
}

.licitacoes-relatorio .header,
.licitacoes-relatorio .footer {
  display: flex;
  align-items: center
}

.licitacoes-relatorio .header {
  margin-bottom: 15px;
}

.licitacoes-relatorio .footer {
  border-top: 1px solid #ddd;
  margin-top: 25px;
  padding-top: 25px;
}

.licitacoes-relatorio .header .alinhar-a-direita,
.licitacoes-relatorio .footer .alinhar-a-direita {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.licitacoes-relatorio button.download:before {
  content: "\f316";
}

.licitacoes-relatorio button.imprimir:before {
  content: "\f193";
}

/* ----- Contratos ----- */

.lista-contrato-anexos {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.lista-contrato-anexos li:not(:first-child) {
  border-top: 1px solid #ddd;
  padding-top: 10px
}

.center-item-botoes {
  grid-area: 3 / 2 / 4 / 3;
}

@media (max-width: 920px) {
  .licitacoes-filtros-wrapper {

    display: block !important;
  }
}

@media (max-width: 768px) {
  .filtros-contratacao-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .filtros-contratacao-wrapper br {
    display: none;
  }

  .filtros-contratacao-wrapper .item {
    margin-bottom: 1rem;
  }

  .filtros-contratacao-wrapper .item.botoes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .filtros-contratacao-wrapper .item.botoes button {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .filtros-contratacao-wrapper .item.botoes button:last-child {
    margin-bottom: 0;
  }

  .center-item-botoes {
    grid-area: auto;
    justify-content: center;
  }
}