
body.notifications-open {
  overflow: hidden;
}

.icon-button {
  position: relative;
}

.icon-button.has-unread-notifications::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--coral);
}

.notifications-overlay {
  position: fixed;
  inset: 0;
  z-index: 6500;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 68px 10px 84px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.17s ease;
}

.notifications-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.notifications-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 38, 36, 0.26);
}

.notifications-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 402px;
  max-height: min(590px, calc(100dvh - 162px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 46px rgba(23, 56, 52, 0.22);
  transform: translateY(-8px) scale(0.985);
  transition: transform 0.17s ease;
}

.notifications-overlay.is-visible .notifications-panel {
  transform: translateY(0) scale(1);
}

.notifications-panel-header {
  min-height: 66px;
  padding: 12px 12px 10px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notifications-panel-header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notifications-panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.notifications-panel-header > div > span {
  color: var(--muted);
  font-size: 0.63rem;
}

.notifications-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.notifications-actions {
  padding: 7px 12px 2px;
  display: flex;
  justify-content: flex-end;
}

.notifications-actions button {
  min-height: 32px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 800;
}

.notifications-list {
  max-height: calc(min(590px, calc(100dvh - 162px)) - 102px);
  overflow-y: auto;
  padding: 5px 8px 9px;
}

.notification-item {
  position: relative;
  width: 100%;
  min-height: 70px;
  padding: 10px 25px 10px 8px;
  border: 0;
  border-bottom: 1px solid #edf1f0;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  text-align: left;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.unread {
  border-radius: 13px;
  background: #f0f8f6;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon.lost {
  background: #fff0ec;
  color: var(--coral);
}

.notification-icon.found {
  background: var(--found-soft);
  color: var(--found);
}

.notification-icon.abandoned {
  background: #fff7e8;
  color: var(--gold);
}

.notification-icon.adoption {
  background: #f4eefb;
  color: var(--purple);
}

.notification-icon.sighting {
  background: #edf5fc;
  color: var(--blue);
}

.notification-icon.sheltered {
  background: var(--sheltered-soft);
  color: var(--sheltered);
}

.notification-icon.report {
  background: var(--primary-soft);
  color: var(--primary);
}

.notification-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.notification-title-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.notification-title-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-title-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 500;
}

.notification-text {
  color: #52615f;
  font-size: 0.63rem;
  line-height: 1.38;
}

.unread-dot {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--coral);
}

.notifications-empty,
.notifications-loading {
  min-height: 220px;
  padding: 30px 22px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notifications-empty > span,
.notifications-auth-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 17px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notifications-empty strong,
.notifications-auth-box strong {
  color: var(--text);
  font-size: 0.78rem;
}

.notifications-empty p,
.notifications-auth-box p,
.notifications-loading p {
  max-width: 240px;
  margin: 5px 0 0;
  font-size: 0.64rem;
  line-height: 1.4;
}

.notifications-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: notifications-spin .7s linear infinite;
}

@keyframes notifications-spin {
  to { transform: rotate(360deg); }
}

.auth-notifications-panel {
  max-width: 380px;
}

.notifications-auth-box {
  min-height: 290px;
  padding: 24px 22px 28px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.notifications-auth-actions {
  width: 100%;
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.notifications-auth-actions .auth-primary,
.notifications-auth-actions .auth-secondary {
  width: 100%;
  min-height: 46px;
}

.notifications-legacy-page {
  min-height: 75vh;
  padding-top: 18px;
}

.notifications-legacy-back {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
}

.notifications-legacy-message {
  margin-top: 60px;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.notifications-legacy-message > span {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ==========================================================
   V33 — una ficha abierta desde Notificaciones se coloca encima.
   El panel de Notificaciones permanece abierto detrás.
   ========================================================== */

body.notification-report-open #feed-report-overlay,
#feed-report-overlay.above-notifications {
  z-index: 6600;
}

body.notification-report-open #feed-image-viewer {
  z-index: 6700;
}


/* ==========================================================
   V76 — notificaciones sociales y de mensajes
   ========================================================== */

.notification-icon.social-love{
  background:rgba(214,79,115,.11);
  color:#D64F73;
}

.notification-icon.social-comment{
  background:rgba(76,134,214,.11);
  color:#4C86D6;
}

.notification-icon.social-follow{
  background:rgba(126,87,194,.11);
  color:#7E57C2;
}

.notification-icon.social-message{
  background:rgba(29,151,141,.11);
  color:#168f84;
}

.notification-icon.social-message-accepted{
  background:rgba(64,166,111,.11);
  color:#3E9D69;
}

.notification-icon.admin-status{
  background:rgba(83,104,121,.11);
  color:#526b7b;
}

html[data-theme="dark"] .notification-icon.social-love{
  background:rgba(214,79,115,.15);
  color:#EE7597;
}

html[data-theme="dark"] .notification-icon.social-comment{
  background:rgba(76,134,214,.15);
  color:#78A7E5;
}

html[data-theme="dark"] .notification-icon.social-follow{
  background:rgba(126,87,194,.16);
  color:#A88BE0;
}

html[data-theme="dark"] .notification-icon.social-message{
  background:rgba(46,157,146,.15);
  color:#62C5BA;
}

html[data-theme="dark"] .notification-icon.social-message-accepted{
  background:rgba(64,166,111,.15);
  color:#72C996;
}

html[data-theme="dark"] .notification-icon.admin-status{
  background:rgba(108,137,158,.14);
  color:#9BB8C9;
}
.notification-icon.moderation{background:rgba(214,79,115,.11);color:#D64F73}
