/* ----- Top Bar ----- */
#header-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* height: 3rem; */
  background-color: var(--bg-color-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  transform: translateY(-100%);
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
  z-index: 1000;
}

/* Sombra com ::after */
#header-top-bar::after {
  content: "";
  position: absolute;
  bottom: -0.5rem; /* desce um pouco para parecer sombra */
  left: 0;
  width: 100%;
  height: 1rem; /* espessura da sombra */
  background: linear-gradient(
    180deg,
    var(--bg-color-2) 25% /* sombra mais forte próxima da barra */,
    var(--bg-color-1) 100% /* desaparece gradualmente */
  );
  pointer-events: none; /* evita bloquear cliques */
  z-index: -1; /* fica atrás do conteúdo da barra */
}

#header-top-bar.show {
  transform: translateY(0);
}

#header-top-bar h1 {
  line-height: 1;
  margin: 0;
}

#header-top-bar div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

#header-top-bar a {
  font-size: 1.25rem;
  text-decoration: none;
}

#header-top-bar button {
  background-color: transparent;
  padding: 0;
  width: 1.5rem;
  height: auto;
}

#header-top-bar button svg {
  fill: var(--bg-color-4);
}

#header-top-bar button:hover svg,
#header-top-bar button:focus-visible svg {
  fill: var(--accent-color-2);
}

#header-top-bar #button-expand-collapse {
  display: none;
}

/* ----- Modal Settings Panel ----- */
#div-settings-panel {
  display: none; /* inicialmente escondido */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

#div-settings-panel.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

#div-settings-panel .modal-content {
  background-color: var(--bg-color-2);
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#div-settings-panel .modal-title-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#div-settings-panel h2 {
  margin: 0;
}

#div-settings-panel .close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#div-settings-panel .close:hover {
  color: var(--accent-color-5);
}

#div-settings-panel .modal-content div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

#div-settings-panel button {
  background-color: var(--bg-color-4);
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  padding: 0.75rem;
}

#div-settings-panel button:hover,
#div-settings-panel button:focus-visible {
  background-color: var(--accent-color-5);
}

#div-settings-panel button span {
  color: var(--bg-color-1);
  line-height: 1;
  font-size: 1.5rem;
  width: 100%;
  height: 100%;
}

/* Animação fade */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Responsividade ----- */
/* Responsividade: tablets */
@media (max-width: 768px) {
  /* Oculta todos os links inicialmente */
  #header-top-bar div {
    display: none;
  }

  /* Mostra o botão de expandir/recolher */
  #header-top-bar #button-expand-collapse {
    display: block;
  }

  /* Mostra os links quando a Top Bar estiver expandida */
  #header-top-bar[show-top-bar-options="true"] div {
    position: absolute;
    left: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg-color-2);
    padding: 0.75rem 1.5rem;
    align-items: center;
  }
}

/* Responsividade: celulares */
@media (max-width: 480px) {
}
