/* =========================================================
   SBB NOTIFY — CLEAN (sem regras sobrescritas)
   ========================================================= */

/* tipografia final (era override) */
:root{
  --notify-title: 15px;
  --notify-sub: 12px;
  --notify-btn: 12px;
  --notify-item-title: 13.5px;
  --notify-item-msg: 13.5px;
  --notify-item-date: 11.5px;
}

.sbb-notify{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* =========================================================
   BOTÃO
   ========================================================= */

.sbb-notify-btn{
  width: 66px;
  height: 66px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: var(--shadow-soft);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
  user-select: none;
}

.sbb-notify-btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(255,179,0,.28);
}

.sbb-notify-btn:active{
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.sbb-notify-btn .icon{
  font-size: 18px;
  line-height: 1;
  transform: translateY(1px);
}

/* highlight quando tem unread */
.sbb-notify.has-unread .sbb-notify-btn{
  border-color: rgba(255,179,0,.38);
  box-shadow: var(--shadow-soft), 0 0 0 4px rgba(255,179,0,.10);
}

body:not(.theme-light) .sbb-notify-btn{
  background: #131722;
  border-color: rgba(230,233,242,.10);
  color: #e9ecf6;
}

/* BADGE */
.sbb-notify-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  display: grid;
  place-items: center;
  border: 2px solid var(--panel);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

body:not(.theme-light) .sbb-notify-badge{
  border-color: #131722;
}

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

.sbb-notify-panel{
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 400px;                 /* valor final */
  max-height: 460px;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: none;
}

.sbb-notify.open .sbb-notify-panel{ display: block; }

body:not(.theme-light) .sbb-notify-panel{
  background: #0f1320;
  border-color: rgba(230,233,242,.10);
  box-shadow: 0 18px 55px rgba(0,0,0,.40), 0 6px 18px rgba(0,0,0,.25);
}

/* =========================================================
   HEADER
   ========================================================= */

.sbb-notify-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;      /* valor final */
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
}

body:not(.theme-light) .sbb-notify-head{
  background: rgba(255,255,255,.03);
  border-bottom-color: rgba(230,233,242,.10);
}

.sbb-notify-head strong{
  font-size: var(--notify-title);
  font-weight: 950;
  letter-spacing: .2px;
  line-height: 1.15;
  color: var(--ink);
}

body:not(.theme-light) .sbb-notify-head strong{
  color: #eef2ff;
}

.sbb-notify-head small{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--notify-sub);
  font-weight: 700;
  letter-spacing: .1px;
  line-height: 1.1;
  opacity: .9;
}

.sbb-notify-head small::before{
  content: "";
  width: 6px;                   /* valor final */
  height: 6px;                  /* valor final */
  border-radius: 999px;
  background: rgba(255,179,0,.95);
  box-shadow: 0 0 0 3px rgba(255,179,0,.12); /* valor final */
}

body:not(.theme-light) .sbb-notify-head small{
  color: rgba(233,236,246,.72);
}

body:not(.theme-light) .sbb-notify-head small::before{
  box-shadow: 0 0 0 3px rgba(255,179,0,.10);
}

/* botão X */
.sbb-notify-x{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.sbb-notify-x:hover{
  background: rgba(148,163,184,.14);
  border-color: var(--line);
  color: var(--ink);
}

body:not(.theme-light) .sbb-notify-x:hover{
  border-color: rgba(230,233,242,.10);
  color: #eef2ff;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.sbb-notify-actions{
  display: flex;
  gap: 10px;
  padding: 10px 16px 12px;      /* valor final */
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

body:not(.theme-light) .sbb-notify-actions{
  border-bottom-color: rgba(230,233,242,.10);
  background: transparent;
}

.sbb-notify-actions button{
  flex: 1;
  height: 34px;                 /* valor final */
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--ink);
  font-weight: 850;
  font-size: var(--notify-btn); /* valor final */
  letter-spacing: .15px;
  line-height: 1;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

.sbb-notify-actions button:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(255,179,0,.25);
  background: #fff;
}

body:not(.theme-light) .sbb-notify-actions button{
  background: rgba(255,255,255,.04);
  border-color: rgba(230,233,242,.10);
  color: rgba(233,236,246,.86);
}

body:not(.theme-light) .sbb-notify-actions button:hover{
  background: rgba(255,255,255,.07);
}

/* =========================================================
   LISTA
   ========================================================= */

.sbb-notify-list{
  padding: 12px 14px 14px;      /* valor final */
  overflow: auto;
  max-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: rgba(120,130,160,.35) transparent;
}

.sbb-notify-list::-webkit-scrollbar{ width: 10px; }
.sbb-notify-list::-webkit-scrollbar-thumb{
  background: rgba(120,130,160,.25);
  border-radius: 999px;
}
.sbb-notify-list::-webkit-scrollbar-track{ background: transparent; }

/* =========================================================
   ITEM
   ========================================================= */

.sbb-notify-item{
  position: relative;
  display: block;
  padding: 12px 12px 11px;      /* valor final */
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(10,20,60,.05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
  margin-bottom: 10px;
}

body:not(.theme-light) .sbb-notify-item{
  background: rgba(255,255,255,.03);
  border-color: rgba(230,233,242,.10);
  box-shadow: none;
}

.sbb-notify-item:hover{
  transform: translateY(-1px);
  border-color: rgba(255,179,0,.22);
  box-shadow: 0 12px 28px rgba(10,20,60,.10);
  background: var(--panel2);
}

body:not(.theme-light) .sbb-notify-item:hover{
  background: rgba(255,255,255,.06);
}

/* título */
.sbb-notify-item .t{
  font-size: var(--notify-item-title);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 6px;
}

/* mensagem */
.sbb-notify-item .m{
  display: block;
  font-size: var(--notify-item-msg);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .05px;
  color: var(--muted);
}

body:not(.theme-light) .sbb-notify-item .m{
  color: rgba(233,236,246,.78); /* valor final */
}

/* data */
.sbb-notify-item small{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: var(--notify-item-date);
  color: var(--muted2);
  font-weight: 750;
  letter-spacing: .12px;
  opacity: .95;
}

body:not(.theme-light) .sbb-notify-item small{
  color: rgba(233,236,246,.55);
}

/* UNREAD */
.sbb-notify-item.unread{
  border-color: rgba(255,179,0,.35);
}

.sbb-notify-item.unread::before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255,179,0,.95);
  box-shadow: 0 0 0 3px rgba(255,179,0,.12);
}

body:not(.theme-light) .sbb-notify-item.unread::before{
  box-shadow: 0 0 0 3px rgba(255,179,0,.10);
}

.sbb-notify-item.unread::after{
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;                   /* valor final */
  height: 6px;                  /* valor final */
  border-radius: 999px;
  background: rgba(255,179,0,.95);
}

/* EMPTY */
.sbb-notify-empty{
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(120,130,160,.30);
  background: var(--panel2);
  color: var(--muted);
  font-weight: 850;
}

body:not(.theme-light) .sbb-notify-empty{
  background: rgba(255,255,255,.03);
  border-color: rgba(230,233,242,.10);
  color: rgba(233,236,246,.70);
}

/* RESPONSIVO */
@media (max-width: 480px){
  .sbb-notify{ right: 12px; bottom: 12px; }
  .sbb-notify-panel{ width: min(400px, calc(100vw - 24px)); } /* valor final */
}

/* SHAKE */
@keyframes sbb-shake {
  0%   { transform: rotate(0deg) translateX(0); }
  10%  { transform: rotate(-8deg) translateX(-1px); }
  20%  { transform: rotate(8deg) translateX(1px); }
  30%  { transform: rotate(-8deg) translateX(-1px); }
  40%  { transform: rotate(8deg) translateX(1px); }
  50%  { transform: rotate(-5deg) translateX(-1px); }
  60%  { transform: rotate(5deg) translateX(1px); }
  70%  { transform: rotate(-3deg) translateX(-1px); }
  80%  { transform: rotate(3deg) translateX(1px); }
  90%  { transform: rotate(-1deg) translateX(0); }
  100% { transform: rotate(0deg) translateX(0); }
}

.sbb-notify-shake{
  animation: sbb-shake .7s ease-in-out;
  transform-origin: 50% 20%;
}

@media (prefers-reduced-motion: reduce){
  .sbb-notify-shake{ animation: none; }
}
