/**
 * Notifications CSS
 * Estilos para o sistema de notificações
 */

/* ==================== CONTAINER ==================== */

.notification-container {
  position: relative;
  display: inline-block;
  margin-right: 1rem;
}

/* ==================== BELL BUTTON ==================== */

.notification-bell {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.notification-bell:hover {
  color: var(--text-primary, #fff);
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
}

.notification-bell:focus {
  outline: none;
}

/* ==================== BADGE ==================== */

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ==================== DROPDOWN ==================== */

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--bg-primary, #1a1a2e);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 9999;
}

/* Header */
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
}

.notification-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.notification-header .btn-link {
  background: none;
  border: none;
  color: var(--primary, #667eea);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.notification-header .btn-link:hover {
  text-decoration: underline;
}

/* List */
.notification-list {
  max-height: 380px;
  overflow-y: auto;
}

/* Empty State */
.notification-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-tertiary, rgba(255, 255, 255, 0.4));
}

.notification-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.notification-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* ==================== NOTIFICATION ITEM ==================== */

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notification-item:hover {
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
}

.notification-item.unread {
  background: rgba(102, 126, 234, 0.08);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

/* Icon */
.notification-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #667eea);
  font-size: 1rem;
}

/* Content */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  line-height: 1.4;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-time {
  font-size: 0.7rem;
  color: var(--text-tertiary, rgba(255, 255, 255, 0.4));
}

/* Close button */
.notification-close {
  background: none;
  border: none;
  color: var(--text-tertiary, rgba(255, 255, 255, 0.4));
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.notification-item:hover .notification-close {
  opacity: 1;
}

.notification-close:hover {
  color: var(--danger, #ef4444);
}

/* ==================== LIGHT MODE ==================== */

[data-theme="light"] .notification-bell {
  color: #666;
}

[data-theme="light"] .notification-bell:hover {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .notification-dropdown {
  background: white;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-header {
  background: #f8f9fa;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .notification-header h4 {
  color: #1a1a2e;
}

[data-theme="light"] .notification-item {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .notification-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .notification-item.unread {
  background: rgba(102, 126, 234, 0.05);
}

[data-theme="light"] .notification-icon {
  background: rgba(102, 126, 234, 0.1);
}

[data-theme="light"] .notification-title {
  color: #1a1a2e;
}

[data-theme="light"] .notification-message {
  color: #666;
}

[data-theme="light"] .notification-time {
  color: #999;
}

[data-theme="light"] .notification-empty {
  color: #999;
}

[data-theme="light"] .notification-close {
  color: #999;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
  .notification-dropdown {
    width: 100vw;
    right: -60px;
    border-radius: 0;
    max-height: 70vh;
  }
}
