/* RoraiLink - Notificacoes ONT */

#rl-notif-root {
  position: relative;
  margin-left: auto;
  z-index: 100;
}

#rl-notif-root[hidden],
#rl-notif-contador[hidden],
#rl-notif-painel[hidden] {
  display: none !important;
}

#rl-notif-botao {
  position: relative;
  border: 1px solid #38506b;
  border-radius: 12px;
  background: #18283c;
  color: #ffffff;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 19px;
}

#rl-notif-contador {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 20px;
  background: #dc3545;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

#rl-notif-painel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, 88vw);
  max-height: 460px;
  overflow-y: auto;
  background: #142236;
  color: #f1f5f9;
  border: 1px solid #344860;
  border-radius: 14px;
  box-shadow: 0 12px 30px #0006;
  padding: 16px;
}

.rl-notif-titulo {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.rl-notif-item {
  padding: 12px 0;
  border-bottom: 1px solid #344860;
}

.rl-notif-item:last-child {
  border-bottom: 0;
}

.rl-notif-item strong {
  display: block;
  margin-bottom: 5px;
}

.rl-notif-item small {
  display: block;
  color: #aebed0;
  line-height: 1.6;
}

.rl-notif-queda {
  color: #ff7777;
}

.rl-notif-recuperacao {
  color: #63d49a;
}

.rl-notif-vazio {
  color: #b7c5d5;
  font-size: 13px;
}

/* Integracao com o cabecalho */
#rl-notif-root {
  flex-shrink: 0;
}

#rl-notif-botao {
  min-width: 44px;
  min-height: 44px;
}

#rl-notif-botao:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

/* Tema claro */
html:not([data-sgp-theme="escuro"]) #rl-notif-botao {
  background: #f8fafc;
  color: #20334b;
  border-color: #cbd5e1;
}

html:not([data-sgp-theme="escuro"]) #rl-notif-painel {
  background: #ffffff;
  color: #172438;
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px #0002;
}

html:not([data-sgp-theme="escuro"]) .rl-notif-item {
  border-bottom-color: #e2e8f0;
}

html:not([data-sgp-theme="escuro"]) .rl-notif-item small,
html:not([data-sgp-theme="escuro"]) .rl-notif-vazio {
  color: #475569;
}

/* Tema escuro */
html[data-sgp-theme="escuro"] #rl-notif-botao {
  background: #203249;
  color: #e6f3ff;
  border-color: #405c7c;
}

html[data-sgp-theme="escuro"] #rl-notif-painel {
  background: #142236;
  color: #f1f5f9;
  border-color: #344860;
}

/* Telas menores */
@media (max-width: 640px) {
  #rl-notif-root {
    margin-left: 0;
  }

  #rl-notif-painel {
    position: fixed;
    top: 90px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}
