/* Sino de avisos — começa FECHADO; mobile = sheet */

#portalHeaderActions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

#portalCbNotifyHost {
  display: inline-flex;
  align-items: center;
}

.portal-cb-notify {
  position: relative;
}

.portal-cb-notify__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 210, 120, 0.2);
  background: rgba(255, 200, 90, 0.06);
  color: rgba(255, 210, 140, 0.85);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portal-cb-notify__btn:hover,
.portal-cb-notify.is-open .portal-cb-notify__btn {
  background: rgba(255, 200, 90, 0.12);
  border-color: rgba(255, 210, 120, 0.35);
  color: rgba(255, 228, 170, 0.98);
}

.portal-cb-notify__btn svg {
  width: 20px;
  height: 20px;
}

.portal-cb-notify__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935;
  border: 2px solid rgba(12, 10, 8, 0.95);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-cb-notify__badge[hidden],
.portal-cb-notify__panel[hidden],
.portal-cb-notify__backdrop[hidden] {
  display: none !important;
}

.portal-cb-notify__backdrop {
  display: none;
}

.portal-cb-notify__panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 1.5rem));
  max-height: min(70vh, 420px);
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 210, 120, 0.18);
  background: rgba(18, 14, 10, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 40;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.portal-cb-notify.is-open .portal-cb-notify__panel:not([hidden]) {
  display: grid;
}

.portal-cb-notify__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.portal-cb-notify__head strong {
  font-size: 0.86rem;
  color: rgba(255, 236, 200, 0.95);
}

.portal-cb-notify__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.portal-cb-notify__link {
  border: 0;
  background: transparent;
  color: rgba(255, 210, 140, 0.8);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.portal-cb-notify__link:hover {
  color: rgba(255, 228, 170, 1);
  text-decoration: underline;
}

.portal-cb-notify__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 200, 90, 0.08);
  color: rgba(255, 228, 170, 0.9);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.portal-cb-notify__close:hover {
  background: rgba(255, 200, 90, 0.16);
}

.portal-cb-notify__list {
  display: grid;
  gap: 0.4rem;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-cb-notify__item {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 210, 120, 0.08);
  background: rgba(255, 200, 90, 0.04);
  color: rgba(255, 236, 200, 0.88);
  cursor: pointer;
}

.portal-cb-notify__item.is-unread {
  border-color: rgba(255, 180, 60, 0.28);
  background: rgba(255, 180, 60, 0.1);
}

.portal-cb-notify__item strong {
  font-size: 0.8rem;
}

.portal-cb-notify__item span {
  font-size: 0.74rem;
  color: rgba(255, 220, 170, 0.72);
  line-height: 1.35;
}

.portal-cb-notify__empty {
  margin: 0;
  padding: 0.75rem 0.25rem;
  font-size: 0.8rem;
  color: rgba(255, 220, 170, 0.55);
  text-align: center;
}

.portal-cb-notify__cta {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 180, 60, 0.9);
  color: #1a1208;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.portal-cb-notify__cta:hover {
  background: rgba(255, 196, 90, 1);
}

@media (max-width: 720px) {
  .portal-cb-notify__backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0, 0, 0, 0.55);
  }

  .portal-cb-notify.is-open .portal-cb-notify__panel:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: min(78vh, 560px);
    border-radius: 18px 18px 0 0;
    z-index: 121;
    padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  body.portal-cb-notify-open {
    overflow: hidden;
  }
}
