/* ========================================================================
   Notifications Screen & Widget Styles
   ======================================================================== */

/* Full notifications screen */
.afadir-notifications-screen {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.afadir-notifications-screen .tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.afadir-notifications-screen .tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.afadir-notifications-screen .tab:hover {
  color: #111827;
}

.afadir-notifications-screen .tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.tab-content.hidden {
  display: none;
}

/* Notifications list - full screen */
.notifications-list-full {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notification-item-full {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notification-item-full:hover {
  background: #f9fafb;
}

.notification-item-full.unread {
  background: #eff6ff;
}

.notification-item-full.unread:hover {
  background: #dbeafe;
}

.notification-icon-large {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.notification-body-full {
  flex: 1;
  min-width: 0;
}

.notification-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.notification-body-full h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.notification-time {
  color: #6b7280;
  font-size: 13px;
  flex-shrink: 0;
}

.notification-body-full p {
  margin: 0 0 8px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.notification-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
}

.notification-link:hover {
  text-decoration: underline;
}

.btn-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: #e5e7eb;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-icon:hover {
  background: #d1d5db;
  transform: scale(1.1);
}

/* Preferences section */
.preferences-container {
  max-width: 700px;
}

.preferences-section {
  margin-bottom: 32px;
}

.preferences-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #111827;
}

.preferences-section > p.muted {
  color: #6b7280;
  margin: 0 0 24px 0;
}

.push-status {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.status-row:last-child {
  border-bottom: none;
}

.status-row span {
  color: #6b7280;
}

.status-row strong {
  color: #111827;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.alert-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #78350f;
}

.alert-info {
  background: #dbeafe;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.alert strong {
  display: block;
  margin-bottom: 8px;
}

.alert ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.help-text {
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
}

/* Preference items */
.preference-category {
  margin-bottom: 24px;
}

.preference-category h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #111827;
}

.preference-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 8px;
}

.preference-item:hover {
  background: #f9fafb;
}

.preference-item input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.preference-info {
  flex: 1;
}

.preference-info strong {
  display: block;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
}

.preference-info .muted {
  font-size: 13px;
  color: #6b7280;
}

.preferences-form .form-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* Widget styles */
.afadir-widget-notifications {
  max-width: 400px;
}

.afadir-widget-notifications .afadir-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.afadir-widget-notifications .afadir-widget-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.badge-unread {
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.mark-all-read {
  border: none;
  background: #e5e7eb;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.mark-all-read:hover {
  background: #d1d5db;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notification-item.unread {
  background: #eff6ff;
}

.notification-item:hover {
  background: #e5e7eb;
}

.notification-item.unread:hover {
  background: #dbeafe;
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #111827;
}

.notification-message {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  font-size: 12px;
  color: #9ca3af;
}

.notification-item .mark-read {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: #e5e7eb;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.notification-item .mark-read:hover {
  background: #d1d5db;
  transform: scale(1.1);
}

/* Empty/error states */
.empty-state,
.error-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .icon,
.error-state .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.empty-state h3,
.error-state h3 {
  margin: 0 0 8px 0;
  color: #111827;
}

.empty-state p,
.error-state p {
  color: #6b7280;
  margin: 0;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.notifications-header p {
  margin: 0;
  font-size: 14px;
}

.btn-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .afadir-notifications-screen {
    padding: 16px;
  }
  
  .notification-item-full {
    flex-direction: column;
    gap: 12px;
  }
  
  .notification-icon-large {
    font-size: 24px;
  }
  
  .notification-header-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .btn-icon {
    position: static;
    margin-top: 12px;
    align-self: flex-start;
  }
}
