/*-----------------------------------------------------------------------------------

  Template Name: MrZaKaRiA - Enhanced Notification Widget
  Template URI: https://mrzakaria.com
  Description: MrZaKaRiA SOLUTIONS - Elegant Dark Theme Notification
  Author: @MrZaKaRiA
  Author URI: https://mrzakaria.com/personal.html
  Version: 21.0

-----------------------------------------------------------------------------------*/

/* Simple Fade Notification Widget */
.custom-social-proof {
  position: fixed;
  bottom: 30px;
  left: 60px;
  font-family: var(--heading-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  z-index: 99999;
  display: none; /* Hidden by default until preloader finishes */
}

/* Simple container for single notification */
.notification-container {
  position: relative;
  width: 150px;
  min-height: 60px;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Container for stacked notifications */
.notification-stack {
  position: relative;
  width: 150px;
  min-height: 60px;
}

.custom-social-proof .custom-notification {
  width: 150px;
  min-height: 60px;
  background: var(--assistant-color, #191919);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
              0 2px 8px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
}

/* Simple fade animations */
.custom-social-proof .custom-notification.notification-entering {
  animation: fadeIn 0.6s ease-out forwards;
}

.custom-social-proof .custom-notification.notification-fading {
  animation: fadeOut 0.4s ease-in forwards;
}



/* Ensure rounded corners work on all backgrounds */
.custom-social-proof .custom-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--assistant-color, #191919);
  border-radius: 8px;
  z-index: -1;
}

.custom-social-proof .custom-notification:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 6px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--theme-color, #e4e4dd);
}

.custom-social-proof .custom-notification .custom-notification-container {
  display: block;
  padding: 10px 12px;
  border-radius: 8px; /* Match parent border-radius */
  position: relative;
  z-index: 1;
}

.custom-social-proof .custom-notification .custom-notification-content-wrapper {
  display: block;
  border-radius: 8px; /* Ensure content respects rounded corners */
}

.custom-social-proof .custom-notification .custom-notification-content {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  color: var(--font-color, #ddd);
}

.custom-social-proof .custom-notification .line1,
.custom-social-proof .custom-notification .line2,
.custom-social-proof .custom-notification .line3 {
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-social-proof .custom-notification .line1 {
  color: var(--font-color, #ddd);
  font-size: 10px;
}

.custom-social-proof .custom-notification .line2 {
  color: var(--heading-color, #fff);
  font-weight: 600;
  margin: 1px 0;
  font-size: 11px;
}

.custom-social-proof .custom-notification .line3 {
  color: var(--theme-color, #e4e4dd);
  font-size: 9px;
  opacity: 0.9;
}

.custom-social-proof .custom-notification .custom-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7; /* Always visible but subtle */
  transition: all 0.2s ease;
  color: var(--font-color, #ddd);
  font-size: 10px; /* Increased size for better visibility */
  z-index: 10; /* Ensure it's above other elements */
}

/* Fallback X if FontAwesome doesn't load */
.custom-social-proof .custom-notification .custom-close:empty::before {
  content: '×';
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.custom-social-proof .custom-notification .custom-close:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--heading-color, #fff);
  transform: scale(1.1);
  opacity: 1;
}

.custom-social-proof .custom-notification:hover .custom-close {
  opacity: 1;
}

/* Hidden state for notification */
.custom-social-proof.notification-hidden {
  display: none !important;
}

/* Simple Fade Animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Light theme support */
.v-light .custom-social-proof .custom-notification {
  background: var(--bg-color, #f9f9f9);
  border-color: var(--border-color, rgba(40, 40, 40, 0.1));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
              0 4px 16px rgba(0, 0, 0, 0.05);
}

.v-light .custom-social-proof .custom-notification::before {
  background: var(--bg-color, #f9f9f9);
}

.v-light .custom-social-proof .custom-notification .custom-notification-content {
  color: var(--font-color, #333);
}

.v-light .custom-social-proof .custom-notification .line1 {
  color: var(--font-color, #333);
}

.v-light .custom-social-proof .custom-notification .line2 {
  color: var(--heading-color, #000);
}

.v-light .custom-social-proof .custom-notification .line3 {
  color: var(--theme-color, #b07634);
}

.v-light .custom-social-proof .custom-notification .custom-close {
  background: rgba(0, 0, 0, 0.1);
  color: var(--font-color, #333);
}

.v-light .custom-social-proof .custom-notification .custom-close:hover {
  background: rgba(0, 0, 0, 0.2);
}



/* Mobile responsiveness - Content-sized width */
@media (max-width: 767px) {
  .custom-social-proof {
    bottom: 20px;
    left: 20px;
    right: auto; /* Remove right positioning */
  }

  .custom-social-proof .custom-notification {
    width: auto;
    min-width: 140px;
    max-width: 200px;
    /* Content-based width instead of full screen */
  }

  .custom-social-proof .custom-notification .custom-notification-container {
    padding: 10px 12px;
  }

  .custom-social-proof .custom-notification .custom-notification-content {
    font-size: 11px;
    white-space: nowrap;
  }

  .custom-social-proof .custom-notification .line1,
  .custom-social-proof .custom-notification .line2,
  .custom-social-proof .custom-notification .line3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .custom-social-proof .custom-notification .line3 {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .custom-social-proof {
    bottom: 15px;
    left: 15px;
    right: auto; /* Remove right positioning */
  }

  .custom-social-proof .custom-notification {
    min-width: 130px;
    max-width: 180px;
  }

  .custom-social-proof .custom-notification .custom-notification-container {
    padding: 8px 10px;
  }

  .custom-social-proof .custom-notification .custom-notification-content {
    font-size: 10px;
  }

  .custom-social-proof .custom-notification .line3 {
    font-size: 9px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .custom-social-proof .custom-notification {
    animation: none;
  }

  .custom-social-proof .custom-notification .notification-icon {
    animation: none;
  }

  .custom-social-proof .custom-notification,
  .custom-social-proof .custom-notification:hover {
    transform: none;
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .custom-social-proof .custom-notification {
    border-width: 2px;
    border-color: var(--heading-color, #fff);
  }

  .custom-social-proof .custom-notification .notification-badge {
    border: 1px solid var(--bg-color, #131313);
  }
}