@import url('./core/variables.css');
@import url('./core/reset.css');
@import url('./core/animations.css');
@import url('./core/layouts.css');
@import url('./components/buttons.css');
@import url('./components/links.css');
@import url('./components/inputs.css');
@import url('./components/dialog.css');

:root {
  --icon-fill: currentColor;
  --icon-fill-accent: var(--clr-brand-500);
  --icon-stroke: currentColor;
}

body {
  font-family: var(--font-sans);
  background-color: var(--clr-background-body);
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
}

svg,
path {
  transition: color 300ms ease-out, fill 300ms ease-out, stroke 300ms ease-out;
}

.default-bg {
  background-image: url('/assets/images/misc_bg.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}


.bbg::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 800px;

  background-size: cover;
  background-position-y: 0;
  background-position-x: center;
  background-repeat: no-repeat;

  -webkit-mask-image: -webkit-linear-gradient(
          to bottom,
          rgba(0, 0, 0, 0),
          rgba(0, 0, 0, 1),
          rgba(0, 0, 0, 0)
  );
  mask-image: linear-gradient(
          to bottom,
          rgba(0, 0, 0, 0),
          rgba(0, 0, 0, 1),
          rgba(0, 0, 0, 0)
  );
}

.has-tooltip {
  position: relative;
}

/* .has-tooltip > .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;

  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
}
.has-tooltip:hover > .tooltip-text {
  visibility: visible;
}

*/

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.no-scroll {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--clr-background-body);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden; /* Adicionado para desativar o scroll sem mexer no body */
}

.loading-bar-container {
  width: 50%; /* Define o tamanho fixo desejado */
  height: 5px;
  background: var(--clr-background-body); /* Ajuste conforme necessário */
  overflow: hidden; /* Garante que a barra de carregamento não ultrapasse os limites */
  position: relative; /* Necessário para o posicionamento da barra de carregamento */
}

.loading-bar {
  height: 100%;
  background: var(--clr-accent-brand);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: load 1s infinite ease-in-out; /* Ajusta a duração e suaviza a animação */
}

@keyframes load {
  0%, 100% {
    width: 25%;
  }
  50% {
    width: 100%;
  }
}


.text-center {
  text-align: center;
}

.responsive-table {
  width: 100%;
  container-type: inline-size;
  overflow-x: auto;
}

.default-table {
  --_row-radius: var(--radius-2);

  max-width: 100%;
  width: 100%;
  border-collapse: collapse;

  th,
  td {
    padding: var(--spacing-3);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1rem;
    text-align: left;
    border: 1px solid var(--clr-base-600--30);
  }

  th {
    background-color: var(--clr-surface-01);
    color: var(--clr-onSurface-01--subtle);
  }

  td {
    background: var(--clr-surface-02);
    color: var(--clr-onSurface-02);
  }

  tr:first-child > th:first-child {
    border-top-left-radius: var(--_row-radius);
  }

  tr:first-child > th:last-child {
    border-top-right-radius: var(--_row-radius);
  }

  tr:last-child > td:first-child {
    border-bottom-left-radius: var(--_row-radius);
  }

  tr:last-child > td:last-child {
    border-bottom-right-radius: var(--_row-radius);
  }
}

/* Container fixo */
#lang-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  font-family: sans-serif;
}

/* Botão principal */
#lang-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 0px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
#lang-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

/* Caret (setinha) */
#lang-toggle .caret {
  font-size: 0.7em;
  color: #ccc;
  transition: transform .2s;
}

/* Dropdown fechado por padrão */
#lang-list {
  display: none;
  list-style: none;
  padding: 5px;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0px;
  overflow: hidden;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Itens do dropdown */
#lang-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  color: #ddd;
  cursor: pointer;
  transition: background .15s, color .15s;
}
#lang-list li:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Bandeiras */
#lang-current-flag,
#lang-list li img {
  width: 30px;
  height: auto;
  display: block;
}

/* Quando estiver aberto (.open):
   - esconde completamente o botão (incluindo a seta)
   - mostra o dropdown */
#lang-widget.open #lang-toggle {
  display: none !important;
}
#lang-widget.open #lang-list {
  display: block !important;
}
/* Gira a seta se quiser manter o toggle visível (opcional) */
#lang-widget.open #lang-toggle .caret {
  transform: rotate(180deg) !important;
}

