/* --- NOTIFICATION POPUP STYLES --- */
:root {
  --notification-popup-bg: #ffffff;
  --notification-popup-shadow: rgba(0, 0, 0, 0.1);
  /* --notification-popup-border: #eeeeee; */
  --notification-popup-border: #c17d1a;
  --notification-popup-accent-color: #c17d1a;
  --notification-popup-icon-color: #c17d1a;

  --notification-popup-notif-btn-bg: #f4f4f4;
  /* --notification-popup-notif-btn-text: #53575b; */
  --notification-popup-notif-btn-text: #000000;
  --notification-popup-notif-btn-text-hover: #ffffff;
  --notification-popup-link: #6c757d;
  /* --notification-popup-notif-btn-border: #eeeeee; */
  --notification-popup-notif-btn-border: #c17d1a;
}

body.dark-mode {
  --notification-popup-bg: #1e2124; /* Matching your dark notification-popup-btn background */
  --notification-popup-shadow: rgba(0, 0, 0, 0.4);
  /* --notification-popup-border: #2d2f31; */
  --notification-popup-border: #c17d1a;
  --notification-popup-accent-color: #c17d1a;
  --notification-popup-icon-color: #c17d1a;

  --notification-popup-notif-btn-bg: #adb5bd;
  /* --notification-popup-notif-btn-text: #adb5bd; */
  --notification-popup-notif-btn-text: #ffffff;
  --notification-popup-notif-btn-text-hover: #ffffff;
  --notification-popup-link: #adb5bd;
  /* --notification-popup-notif-btn-border: #2d2f31; */
  --notification-popup-notif-btn-border: #c17d1a;
}

/* Apply to both to ensure PC browsers (Chrome/Edge/Firefox) comply */
html.notif-bg,
body.notif-bg {
  overflow: hidden !important;
  /* height: 100% !important; */
  height: 100vh !important;
  position: relative;
  /* Prevents the page from shifting when scrollbar vanishes */
  padding-right: var(--scrollbar-width, 15px);
}

/* 1. The Overlay Base */
/* This creates the overlay on the body itself */
body.notif-bg::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  /*z-index: 9998;*/ /* Just below the popup (9999) */
  z-index: 9995; /* Just below the popup (9996) */
  animation: fadeIn 0.3s ease forwards;

  /* stop the background scrolling */
  overflow: hidden;

  touch-action: none; /* Disables touch scrolling */
  -ms-touch-action: none;

  /* Optional: prevents "layout shift" if the scrollbar disappears */
  padding-right: 15px;
}

body.dark-mode.notif-bg::before {
  background-color: rgba(0, 0, 0, 0.75);
}

/* 2. The Hidden State */
.notification-popup.hidden::before {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Keep it stationary even when the parent moves */
  transform: translateY(0) !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.notification-popup {
  position: fixed;
  bottom: 30px;
  left: 30px;
  /* z-index: 9999; */
  z-index: 9996;
  width: 350px;
  background-color: var(--notification-popup-bg);
  border: 1px solid var(--notification-popup-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px var(--notification-popup-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;


  /*top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);*/ /* Centers the popup exactly */
  /* Remove bottom and right */
  /* bottom: auto; */
  /* right: auto; */


  /* z-index: 9999; */
  z-index: 9996;
  /* This keeps the popup content ABOVE the ::before overlay */
  /* Add this to prevent the overlay from moving during the translateY animation */
  overflow: visible !important;
  transform-style: preserve-3d;
}

.notification-popup.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;

  /*transform: translate(-50%, -20%);*/ /* Slides down/up slightly while fading */
}

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notif-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.notif-icon-wrapper {
  /* width: 45px; */
  /* width: 77px; */
  width: 92px;
  height: 45px;
  background: var(--social-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.notif-accent-text { color: var(--notification-popup-accent-color) !important; }

.notif-icon-color { color: var(--notification-popup-accent-color) !important; }

.notif-close-btn{
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.notif-close-btn {
  margin-left: auto;       /* Pushes the button to the far right of the flex container */
  margin-top: 0px;        /* Optional: fine-tune vertical alignment with the header text */
  opacity: 0.6;
  transition: opacity 0.2s;
}

/* The base state */
.notif-close-btn i {
  color: #6c757d; /* Default grey */
  transition: color 0.2s ease;
  font-size: 1.2rem;
}

/* The hover state */
.notif-close-btn:hover i {
  color: #333333; /* Darker black/grey on hover */
}

.notif-close-btn:hover {
  opacity: 1;
}

.notif-btn {
  background: var(--notification-popup-notif-btn-bg);
  color: var(--notification-popup-notif-btn-text) !important;
  padding: 8px 16px; border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 145px; width: 151px;
  border: 1px solid transparent;
  text-align: left;

  display: inline-block; /* Ensure the container wraps correctly */
  text-decoration: none;
}

.notif-btn:hover,
.notif-btn:hover .app-btn-text,
.notif-btn:hover .app-small,
.notif-btn:hover .app-main,
.notif-btn:hover i {
  color: var(--notification-popup-notif-btn-text-hover) !important;
}

.notif-btn-content { display: flex; align-items: center; gap: 10px; }
.notif-btn-text { display: flex; flex-direction: column; line-height: 1.1;
}
.notif-btn-text { display: flex; flex-direction: column; line-height: 1.1;
}

.notif-small { font-size: 0.65rem; opacity: 0.8; }
.notif-main { font-size: 0.95rem; font-weight: 600; }

.notif-btn { border: 1px solid var(--notification-popup-notif-btn-border) !important; }
.notif-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  background: var(--accent-color);
}

body.dark-mode .notif-btn { background: #1e2124; border: 1px solid var(--notification-popup-notif-btn-border); }
body.dark-mode .notif-btn:hover { background: var(--accent-color); border-color: var(--accent-color); }
.notif-btn i { width: 24px; text-align: center; }

/* Reusing your notif Button Styles */
.notification-popup .notif-btn {
  cursor: pointer;
  border: none;
  width: auto;
  min-width: 130px;
}

.notif-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}


.notif-btn-secondary {
  background: transparent;
  border: none;
  color: var(--notification-popup-link);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 12px;
  transition: color 0.25s ease;
}

.notif-btn-secondary:hover {
  color: var(--accent-color);
  text-decoration: underline !important;
}

/* Mobile Responsive */
/* @media (max-width: 576px) { */
@media (max-width: 762px) {
  .notification-popup {
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
  }

}
