/* =========================[ NOTIFY COMPONENT ]========================= */

/* Container geral (fica ao lado da foto do usuário) */
.notify-wrapper {
  position: relative;
  display: inline-block;   /* volta pro inline-block */
  margin-left: 8px;
  margin-right: 8px;
  vertical-align: middle;
  height: 32px;            /* mesma altura da foto */
  width: 32px;             /* garante largura fixa também */
}

/* Botão do sininho */
#notify-button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-dark);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s ease;
  box-shadow: none;
}
#notify-button:hover { color: var(--color-blue-light); }

.btn-icon {
  box-shadow: none;
}

.btn-icon:hover {
  box-shadow: none;
}

/* Badge (contador vermelho) */
#notify-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-red);
  color: var(--color-text-light);
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  line-height: 1;
  display: none;
}
#notify-badge:not(.hidden) { display: inline-block; }

/* Dropdown de notificações */
#notify-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-tiny);
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 999;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}
#notify-dropdown:not(.hidden) { display: block; }

/* =========================[ HEADER ]========================= */
.notify-header {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: var(--color-gray-medium);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  margin: -10px -10px 10px -10px;
}
.notify-title-header { display:flex; align-items:center; gap:10px; color: white; }
.notify-icon {
  width: 28px; height: 28px;
  display: flex;
  align-items: center; justify-content: center;
  border-radius: var(--radius-tiny);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.notify-icon i {
  font-size: 14px;
  color: var(--color-gray-medium);
  font-weight: 900;
  font-style: normal;
}

/* =========================[ LISTA / TIMELINE ]========================= */
#notify-list {
  --notify-axis: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: calc(var(--notify-axis) + 18px);
}

/* Eixo vertical */
#notify-list::before {
  content: "";
  position: absolute;
  left: var(--notify-axis);
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-gray-light);
  border-radius: var(--radius-tiny);
  z-index: 0;
}

/* =========================[ ITEM ]========================= */
.notify-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "title date"
    "message message";
  row-gap: 4px;

  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-gray-light);
  border-radius: var(--radius-tiny);
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 1;
}

.notify-item:hover {
  background: var(--color-gray-medium-hover);
  border-radius: var(--radius-tiny);
}

/* Bolinha */
.notify-item::before {
  content: "";
  position: absolute;
  left: calc(var(--notify-axis) - 43px);
  top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-gray-medium);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--color-gray-light);
  z-index: 1;
}
.notify-item.unread::before { background: var(--color-blue-primary); }

/* =========================[ TEXTOS ]========================= */
.notify-title {
  grid-area: title;
  display: block;                  /* deixa o título ocupar a linha toda */
  color: var(--color-dark);
  font-weight: 600;
  font-size: 12.5px;               /* levemente menor */
  margin: 0;
  line-height: 1.0;
  word-break: break-word;          /* quebra se for gigante */
  overflow: hidden;
  text-overflow: ellipsis;         /* reticências */
  white-space: normal;             /* permite quebra de linha */
  max-width: calc(100% - 30px);    /* evita colar na data */
}

.notify-message {
  grid-area: message;
  font-size: 12px;
  color: var(--color-gray);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notify-date {
  grid-area: date;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* =========================[ VAZIO / FOOTER ]========================= */
.notify-empty {
  padding: 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}
.notify-footer {
  padding: 8px;
  text-align: center;
  border-top: 1px solid var(--color-gray-light);
  background: #f9f9f9;
}
.notify-footer button {
  background: none;
  border: none;
  color: var(--color-blue);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}
.notify-footer button:hover { color: var(--color-dark); }

/* =============================[ NOTIFY VIEW ]============================= */
.notify-view {
  background: #fff;
  padding: 24px 28px;
  border-radius: var(--radius-tiny);
  font-family: 'Roboto', sans-serif;
  margin: 0 auto;
  border: 1px solid var(--color-border-default);
}

.notify-field { margin-bottom: 20px; }
.notify-field label {
  display: block;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 6px;
  border-left: 2px solid var(--color-blue);
  padding-left: 8px;
}
.notify-field.name span,
.notify-field.description span {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius-tiny);
  line-height: 1.5;
  white-space: pre-line;
  overflow-y: auto;
}
