/* sininho.css — Painel de notificações flutuante */

/* Wrapper do sino — fixo no canto superior direito */
.notification-wrapper {
  position: absolute;
  top: 20px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
}

#btn-sino {
  cursor: pointer;
  transition: transform 0.15s ease;
}

#btn-sino:hover {
  transform: scale(1.15);
}

/* Badge de contagem */
#notif-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e63946;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* Painel flutuante */
.notif-painel {
  position: fixed;
  top: 60px;       /* abaixo da navbar */
  right: 12px;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 480px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: top right;
  animation: notif-open 0.18s ease;
}

@keyframes notif-open {
  from { opacity: 0; transform: scale(0.92) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.notif-painel.hidden {
  display: none;
}

/* Cabeçalho do painel */
.notif-painel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #4cc9f0;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.notif-painel-header button {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-painel-header button:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Lista de notificações */
#notif-lista {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 4px 0;
}

.notif-item {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

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

.notif-destaque {
  background: #eaf6ff;
  border-left: 3px solid #4cc9f0;
}

.notif-lida {
  background: #f8f8f8;
  border-left: 3px solid #ccc;
  opacity: 0.72;
}

.notif-titulo {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notif-mensagem {
  font-size: 12px;
  color: #555;
  margin: 0 0 4px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notif-data {
  display: block;
  font-size: 11px;
  color: #aaa;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notif-acoes {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}

.notif-btn-lida,
.notif-btn-ver {
  display: inline-block;
  font-size: 11px;
  background: none;
  border: 1px solid #4cc9f0;
  color: #4cc9f0;
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

.notif-btn-lida:hover,
.notif-btn-ver:hover {
  background: #4cc9f0;
  color: #fff;
}

.notif-btn-ver {
  border-color: #2a9d8f;
  color: #2a9d8f;
}

.notif-btn-ver:hover {
  background: #2a9d8f;
  color: #fff;
}

.notif-vazia,
.notif-carregando,
.notif-erro {
  text-align: center;
  padding: 24px 16px;
  font-size: 13px;
  color: #aaa;
}

/* Celular: move o sininho para a esquerda */
@media (max-width: 480px) {
  .notif-painel {
    right: 4px;
    width: calc(100vw - 8px);
    transform: translateX(90%);
  }

  .notification-wrapper {
    position: absolute;
    left: 12px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;         /* remove margens que possam causar deslocamento */
  }

  /* Ajuste fino do badge (contador) para não ficar cortado */
  #notif-count {
    top: -9px;
    right: -10px;
    left: auto;
    transform: none;
  }
}
