/**
 * Notification System Styles
 * Valentine's Theme - Pink & Modern
 */

/* ============================================
   NOTIFICATION BELL & BADGE
   ============================================ */

.notification-bell-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.notification-bell-container:hover {
  background: rgba(233, 30, 99, 0.1);
  transform: scale(1.05);
}

.notification-bell {
  font-size: 24px;
  color: #E91E63;
  transition: transform 0.3s ease;
}

.notification-bell.notification-pulse {
  animation: bellPulse 0.5s ease-in-out;
}

@keyframes bellPulse {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
  20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
  animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   NOTIFICATION PANEL/DROPDOWN
   ============================================ */

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  max-height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.notification-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-panel-actions {
  display: flex;
  gap: 8px;
}

.notification-panel-btn {
  background: none;
  border: none;
  color: #E91E63;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.notification-panel-btn:hover {
  background: rgba(233, 30, 99, 0.1);
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 500px;
  overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: rgba(233, 30, 99, 0.3);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: rgba(233, 30, 99, 0.5);
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: #fafafa;
}

.notification-item.unread {
  background: #FFF5F8;
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, #FF6B9D 0%, #E91E63 100%);
  border-radius: 0 2px 2px 0;
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  border-radius: 50%;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.2);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 0.9375rem;
}

.notification-message {
  color: #666;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #999;
}

.notification-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notification-action {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.notification-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.notification-empty {
  padding: 60px 20px;
  text-align: center;
  color: #999;
}

.notification-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.notification-empty-text {
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================
   ONBOARDING MODAL
   ============================================ */

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.onboarding-modal.show {
  opacity: 1;
}

.onboarding-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.onboarding-content {
  position: relative;
  background: white;
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.onboarding-modal.show .onboarding-content {
  transform: scale(1);
}

.onboarding-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.onboarding-close:hover {
  background: rgba(233, 30, 99, 0.1);
  color: #E91E63;
  transform: rotate(90deg);
}

.onboarding-header {
  padding: 48px 32px 32px;
  text-align: center;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  border-radius: 24px 24px 0 0;
}

.onboarding-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.onboarding-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  margin: 0;
}

.onboarding-body {
  padding: 32px;
}

.onboarding-step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.onboarding-step:last-child {
  margin-bottom: 0;
}

.onboarding-step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.onboarding-step-content {
  flex: 1;
}

.onboarding-step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.onboarding-step-text {
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.onboarding-footer {
  display: flex;
  gap: 12px;
  padding: 24px 32px 32px;
  border-top: 1px solid #f0f0f0;
}

.onboarding-footer .btn {
  flex: 1;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-footer .btn-primary {
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.onboarding-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.onboarding-footer .btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.onboarding-footer .btn-secondary:hover {
  background: #e0e0e0;
}

/* ============================================
   ADMIN BROADCAST FORM
   ============================================ */

.broadcast-form {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.broadcast-form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.broadcast-form-icon {
  font-size: 32px;
}

.broadcast-form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #E91E63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.broadcast-preview {
  background: #FFF5F8;
  padding: 16px;
  border-radius: 12px;
  border: 2px dashed #FFB3D1;
  margin-bottom: 16px;
}

.broadcast-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #E91E63;
  margin-bottom: 12px;
}

.broadcast-preview-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.broadcast-preview-icon {
  font-size: 24px;
}

.broadcast-preview-content h4 {
  margin: 0 0 4px 0;
  font-size: 0.9375rem;
  color: #333;
}

.broadcast-preview-content p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.broadcast-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-broadcast {
  padding: 12px 24px;
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-broadcast:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.btn-broadcast:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   NOTIFICATION TOAST (override existing)
   ============================================ */

.notification-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 10000;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-toast-icon {
  font-size: 24px;
}

.notification-toast-content {
  flex: 1;
}

.notification-toast-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.notification-toast-message {
  font-size: 0.875rem;
  color: #666;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .notification-panel {
    width: calc(100vw - 40px);
    max-width: none;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    /* Ensure mobile panel is touchable */
    pointer-events: none;
  }

  .notification-panel.show {
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: all;
  }

  .onboarding-content {
    max-height: 85vh;
  }

  .onboarding-header {
    padding: 32px 24px 24px;
  }

  .onboarding-icon {
    font-size: 48px;
  }

  .onboarding-title {
    font-size: 1.5rem;
  }

  .onboarding-body {
    padding: 24px;
  }

  .onboarding-footer {
    flex-direction: column-reverse;
    padding: 20px 24px 24px;
  }

  .form-group-inline {
    grid-template-columns: 1fr;
  }

  .broadcast-actions {
    flex-direction: column;
  }

  .btn-broadcast {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .notification-panel-header {
    padding: 16px;
  }

  .notification-item {
    padding: 12px 16px;
  }

  .notification-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .notification-title {
    font-size: 0.875rem;
  }

  .notification-message {
    font-size: 0.8125rem;
  }

  .notification-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .notification-bell.notification-pulse,
  .notification-badge,
  .notification-panel,
  .onboarding-content,
  .onboarding-icon {
    animation: none;
    transition: none;
  }
}

/* Focus visible for keyboard navigation */
.notification-bell-container:focus-visible,
.notification-panel-btn:focus-visible,
.notification-item:focus-visible,
.onboarding-close:focus-visible,
.btn-broadcast:focus-visible {
  outline: 3px solid #E91E63;
  outline-offset: 2px;
}

/* ============================================
   NOTIFICATION DETAIL MODAL
   ============================================ */

.notification-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notification-detail-modal.show {
  display: flex;
}

.notification-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.notification-modal-content {
  position: relative;
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notification-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-modal-close:hover {
  background: rgba(233, 30, 99, 0.1);
  color: #E91E63;
  transform: rotate(90deg);
}

.notification-modal-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s both;
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.notification-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  animation: fadeInUp 0.4s ease 0.2s both;
}

.notification-modal-message {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 32px;
  animation: fadeInUp 0.4s ease 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  animation: fadeInUp 0.4s ease 0.4s both;
}

.notification-modal-actions .btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-modal-actions .btn-primary {
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.notification-modal-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.notification-modal-actions .btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.notification-modal-actions .btn-secondary:hover {
  background: #e0e0e0;
}

/* Mobile responsiveness - Bottom Sheet Design */
@media (max-width: 767px) {
  .notification-detail-modal {
    align-items: flex-end;
    padding: 0;
    touch-action: none;
  }

  .notification-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    padding: max(32px, env(safe-area-inset-top)) 24px 
             max(32px, env(safe-area-inset-bottom)) 24px;
    animation: slideUpFromBottom 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
  }

  @keyframes slideUpFromBottom {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .notification-modal-icon {
    font-size: 56px;
  }

  .notification-modal-title {
    font-size: 1.375rem;
  }

  .notification-modal-message {
    font-size: 0.9375rem;
  }

  .notification-modal-actions {
    flex-direction: column;
    gap: 12px;
  }

  .notification-modal-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .notification-modal-close {
    top: max(16px, env(safe-area-inset-top, 16px));
    right: 16px;
  }

  /* Add swipe handle indicator */
  .notification-modal-content::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }
}

/* Tablet and Desktop - Centered Modal */
@media (min-width: 768px) {
  .notification-detail-modal {
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .notification-modal-content {
    max-width: 500px;
    border-radius: 24px;
    padding: 48px 40px;
    animation: modalSlideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* Accessibility */
.notification-modal-close:focus-visible {
  outline: 3px solid #E91E63;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .notification-modal-content,
  .notification-modal-icon,
  .notification-modal-title,
  .notification-modal-message,
  .notification-modal-actions {
    animation: none;
  }
}
