
/* =========================================================
   REGIÃO RANGO V2
   CLIENTE — NOTIFICAÇÕES COMPARTILHADAS

   Compatível com tema claro e escuro.
   Não altera o layout dos produtos ou pedidos.
========================================================= */

.rrnc-raiz {
  position: relative;
  flex: 0 0 auto;
  z-index: 10010;
}

.rrnc-sino {
  position: relative;

  display: grid;
  place-items: center;

  width: 45px;
  height: 45px;

  padding: 0;

  border: 1px solid var(--cor-borda, #dfe3e8);
  border-radius: 12px;

  background: var(--cor-superficie, #fff);
  color: var(--cor-texto, #182433);

  font-size: 20px;

  cursor: pointer;
  touch-action: manipulation;
}

.rrnc-sino:hover,
.rrnc-sino:focus-visible {
  border-color: #ff6b35;
  outline-color: #ff6b35;
}

.rrnc-badge {
  position: absolute;

  top: -6px;
  right: -6px;

  min-width: 19px;
  height: 19px;

  display: grid;
  place-items: center;

  padding: 0 4px;

  border-radius: 20px;
  background: #ec4f4f;

  color: #fff;
  font-size: 10px;
  font-weight: 850;

  line-height: 1;
}

.rrnc-badge[hidden] {
  display: none !important;
}

/* =========================================================
   PAINEL

   Usa posicionamento independente da página,
   evitando cortes por containers do cabeçalho.
========================================================= */

.rrnc-painel {
  position: fixed;

  top: 76px;
  right: 16px;
  left: auto;

  z-index: 10020;

  width: min(390px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(600px, calc(100dvh - 95px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 0;

  border: 1px solid var(--cor-borda, #dfe3e8);
  border-radius: 16px;

  background: var(--cor-superficie, #fff);
  color: var(--cor-texto, #182433);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.rrnc-painel[hidden] {
  display: none !important;
}

.rrnc-topo,
.rrnc-painel .painel-notificacoes-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  padding: 16px;

  border-bottom: 1px solid var(--cor-borda, #dfe3e8);
}

.rrnc-topo strong {
  font-size: 0.95rem;
}

.rrnc-fechar {
  width: 34px;
  height: 34px;

  border: 1px solid var(--cor-borda, #dfe3e8);
  border-radius: 9px;

  background: transparent;
  color: inherit;

  font-size: 22px;
  cursor: pointer;
}

/* =========================================================
   ATIVAÇÃO E LEITURA
========================================================= */

.rrnc-controles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  padding: 12px 15px;

  border-bottom: 1px solid var(--cor-borda, #dfe3e8);
}

.rrnc-botao-push,
.rrnc-marcar-todas {
  min-height: 34px;
  padding: 7px 10px;

  border: 1px solid var(--cor-borda, #dfe3e8);
  border-radius: 9px;

  font-family: inherit;
  font-size: 0.69rem;
  font-weight: 800;

  cursor: pointer;
}

.rrnc-botao-push {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
}

.rrnc-botao-push[data-ativo="true"] {
  color: #ed7070;
  border-color: rgba(235, 90, 90, 0.3);
  background: rgba(235, 90, 90, 0.08);
}

.rrnc-marcar-todas {
  background: transparent;
  color: inherit;
}

.rrnc-botao-push:disabled,
.rrnc-marcar-todas:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rrnc-estado-push {
  flex: 1 0 100%;
  margin: 0;

  color: var(--cor-texto-secundario, #64748b);
  font-size: 0.67rem;
  line-height: 1.5;
}

/* =========================================================
   LISTA E NOTIFICAÇÕES
========================================================= */

.rrnc-lista {
  flex: 1 1 auto;
  min-height: 0;

  display: grid;
  align-content: start;
  gap: 7px;

  padding: 12px;
  overflow-y: auto;

  overscroll-behavior: contain;
}

.rrnc-item {
  display: grid;
  gap: 5px;

  width: 100%;
  padding: 13px;

  border: 1px solid var(--cor-borda, #dfe3e8);
  border-radius: 11px;

  background: transparent;
  color: inherit;

  font-family: inherit;
  text-align: left;

  cursor: pointer;
}

.rrnc-item:hover {
  border-color: #ff6b35;
}

.rrnc-item.rrnc-nao-lida {
  background: rgba(255, 107, 53, 0.07);
  border-color: rgba(255, 107, 53, 0.35);
}

.rrnc-item strong {
  font-size: 0.78rem;
  line-height: 1.4;
}

.rrnc-item span {
  font-size: 0.72rem;
  line-height: 1.5;
}

.rrnc-item small {
  color: var(--cor-texto-secundario, #64748b);
  font-size: 0.64rem;
}

.rrnc-mensagem {
  margin: 0;
  padding: 24px 14px;

  color: var(--cor-texto-secundario, #64748b);
  font-size: 0.73rem;
  line-height: 1.65;
  text-align: center;
}

/* =========================================================
   TEMA ESCURO
========================================================= */

html[data-tema="escuro"] .rrnc-painel,
html[data-tema="escuro"] .rrnc-sino {
  background: #171d26;
  color: #f1f4f8;
  border-color: #34404f;
}

html[data-tema="escuro"] .rrnc-item,
html[data-tema="escuro"] .rrnc-fechar,
html[data-tema="escuro"] .rrnc-marcar-todas {
  border-color: #34404f;
  color: #f1f4f8;
}

html[data-tema="escuro"] .rrnc-topo,
html[data-tema="escuro"]
.rrnc-painel .painel-notificacoes-topo,
html[data-tema="escuro"] .rrnc-controles {
  border-color: #34404f;
}

html[data-tema="escuro"] .rrnc-estado-push,
html[data-tema="escuro"] .rrnc-item small,
html[data-tema="escuro"] .rrnc-mensagem {
  color: #a5b0bf;
}

/* =========================================================
   CELULAR E TABLET
========================================================= */

@media (max-width: 900px) {
  .rrnc-painel {
    top: 68px;
    right: 10px;

    width: min(390px, calc(100vw - 20px));
    max-height: calc(100dvh - 88px);
  }

  .rrnc-sino {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
}

.rrnc-flutuante {
  position: fixed;
  top: 12px;
  right: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .rrnc-sino,
  .rrnc-item {
    transition: none;
  }
}

/* =========================================================
   NOTIFICAÇÕES DO CLIENTE
   AJUSTE VISUAL DOS BOTÕES E FEEDBACK DE TOQUE
========================================================= */

.rr-notificacoes-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rr-notificacoes-acoes button {
  position: relative;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #d9dee7;
  background: #ffffff;
  color: #253043;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
  box-shadow:
    0 8px 20px rgba(28, 39, 60, 0.08);
}

.rr-notificacoes-acoes button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(28, 39, 60, 0.12);
}

.rr-notificacoes-acoes button:active:not(:disabled),
.rr-notificacoes-acoes button.rr-botao-pressionado {
  transform: scale(0.97);
  box-shadow:
    0 4px 10px rgba(28, 39, 60, 0.10);
}

.rr-notificacoes-acoes button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 107, 53, 0.18),
    0 8px 20px rgba(28, 39, 60, 0.10);
}

/* =========================================================
   BOTÃO PRINCIPAL — ATIVAR PUSH
========================================================= */

#botaoAtivarPushCliente {
  border-color: #ffb18f;
  background:
    linear-gradient(180deg, #ffb694 0%, #ff996b 100%);
  color: #ffffff;
}

#botaoAtivarPushCliente:hover:not(:disabled) {
  background:
    linear-gradient(180deg, #ffad87 0%, #ff8f5c 100%);
}

#botaoAtivarPushCliente.rr-botao-carregando {
  opacity: 0.92;
  cursor: wait;
}

/* =========================================================
   BOTÃO SECUNDÁRIO — MARCAR TODAS COMO LIDAS
========================================================= */

#botaoMarcarTodasLidasCliente {
  border-color: #d6dde8;
  background: #ffffff;
  color: #2a3446;
}

#botaoMarcarTodasLidasCliente:hover:not(:disabled) {
  background: #f7f9fc;
}

#botaoMarcarTodasLidasCliente.rr-botao-sucesso {
  border-color: #a6e4bf;
  background: #eafaf0;
  color: #16794a;
}

/* =========================================================
   ESTADO DESABILITADO
========================================================= */

.rr-notificacoes-acoes button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   PAINEL VAZIO
========================================================= */

.rr-notificacoes-vazio {
  border-top: 1px solid #eceff5;
  padding-top: 18px;
  color: #7a8598;
  line-height: 1.55;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 560px) {
  .rr-notificacoes-acoes {
    flex-direction: column;
  }

  .rr-notificacoes-acoes button {
    width: 100%;
  }
}


/* =========================================================
   REGIÃO RANGO V2
   CLIENTE — PROTEGER ATIVAÇÃO DO PUSH

   Depois da ativação, esconde o botão para
   evitar desativações acidentais.
========================================================= */

.rrnc-controles
.rrnc-botao-push[data-ativo="true"] {
  display: none !important;
}

/* Confirmação visual permanece visível */

.rrnc-estado-push {
  line-height: 1.5;
  font-weight: 600;
}