/* ------------------------------------------------------------------------------------------ */
/* System Banner — aviso de assinatura/período de teste no topo do sistema ------------------ */
/* ------------------------------------------------------------------------------------------ */

.systemBanner {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 24px;
  border-bottom: 1px solid transparent;
  animation: systemBanner_slideDown 280ms ease-out;
  /* Acima da sidebar (z-index: 999999 em css/elements/sidebar.css) — o
     banner precisa ficar sempre visível por cima dela, nunca por trás. */
  z-index: 1000000;
}

/* Rolagem automática (âncoras, foco em campo inválido, scrollIntoView)
   para abaixo da tarja em vez de deixar o elemento escondido atrás dela.
   Sem tarja a var não existe e o valor cai para 0. */
html {
  scroll-padding-top: var(--system-banner-height, 0px);
}

@keyframes systemBanner_slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.systemBanner_icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 36px;
  width: 36px;
  border-radius: 50%;
}

.systemBanner_icon img {
  height: 20px;
  width: 20px;
}

.systemBanner_text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  flex-grow: 1;
  min-width: 0;
}

.systemBanner_title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.systemBanner_description {
  font-size: 14px;
  opacity: 0.86;
  overflow: hidden;
  text-overflow: ellipsis;
}

.systemBanner_cta {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--default-border-radius);
  white-space: nowrap;
  transition: 150ms;
}

.systemBanner_cta:hover {
  filter: brightness(0.94);
}

.systemBanner_cta:active {
  scale: 0.98;
}

/* -------------------------------------------------------------------- */
/* Tipo: info (período de teste em andamento) -------------------------- */
/* -------------------------------------------------------------------- */

.systemBanner.info {
  background-color: #e8f1ff;
  border-bottom-color: #c3d9f7;
  color: #1a3a63;
}
.systemBanner.info .systemBanner_icon {
  background-color: #d3e4fc;
}
.systemBanner.info .systemBanner_icon img {
  filter: invert(22%) sepia(37%) saturate(2248%) hue-rotate(200deg) brightness(97%) contrast(86%);
}
.systemBanner.info .systemBanner_cta {
  background-color: #2f6fd6;
  color: #fff;
}

body.darkmode .systemBanner.info {
  background-color: #14233d;
  border-bottom-color: #1f345a;
  color: #cfe0fb;
}
body.darkmode .systemBanner.info .systemBanner_icon {
  background-color: #1f345a;
}
body.darkmode .systemBanner.info .systemBanner_icon img {
  filter: invert(70%) sepia(20%) saturate(1200%) hue-rotate(190deg) brightness(105%) contrast(100%);
}

/* -------------------------------------------------------------------- */
/* Tipo: danger (teste acabou / pagamento pendente) --------------------- */
/* -------------------------------------------------------------------- */

.systemBanner.danger {
  background-color: #fdecec;
  border-bottom-color: #f6c8c8;
  color: #6e1a1a;
}
.systemBanner.danger .systemBanner_icon {
  background-color: #f8d4d4;
}
.systemBanner.danger .systemBanner_icon img {
  filter: invert(23%) sepia(74%) saturate(2848%) hue-rotate(347deg) brightness(90%) contrast(96%);
}
.systemBanner.danger .systemBanner_cta {
  background-color: #d63a3a;
  color: #fff;
}

body.darkmode .systemBanner.danger {
  background-color: #3a1414;
  border-bottom-color: #5a1f1f;
  color: #fbd6d6;
}
body.darkmode .systemBanner.danger .systemBanner_icon {
  background-color: #5a1f1f;
}
body.darkmode .systemBanner.danger .systemBanner_icon img {
  filter: invert(70%) sepia(40%) saturate(2000%) hue-rotate(320deg) brightness(105%) contrast(100%);
}

/* -------------------------------------------------------------------- */
/* Responsivo ------------------------------------------------------------ */
/* -------------------------------------------------------------------- */

@media only all and (max-width: 620px) {
  .systemBanner {
    padding: 12px 16px;
    gap: 12px;
  }
  .systemBanner_text {
    flex-direction: column;
    gap: 0px;
  }
  .systemBanner_description {
    white-space: normal;
  }
  .systemBanner_cta {
    padding: 8px 12px;
  }
}
