/* Ultra-specific custom styling for the Shiny notification panel */
body #shiny-notification-panel.shiny-notification-panel,
html body div#shiny-notification-panel.shiny-notification-panel,
#shiny-notification-panel.shiny-notification-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  max-width: 400px !important;
  z-index: 99999 !important; /* Ultra-high z-index */
  margin: 0 !important;
  padding: 0 !important;
  right: auto !important; /* Override any right positioning */
  bottom: auto !important; /* Override any bottom positioning */
}

/* Make the notification more visible with ultra-specific selectors */
body #shiny-notification-panel .shiny-notification,
html body div#shiny-notification-panel div.shiny-notification,
#shiny-notification-panel .shiny-notification {
  background-color: #f8f9fa !important;
  border: 2px solid #2c3e50 !important;
  border-radius: 5px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  padding: 20px !important;
  margin-bottom: 10px !important;
  width: 100% !important;
  min-width: 300px !important;
  opacity: 1 !important;
}

/* Ensure PDF progress notifications are always visible */
.shiny-progress-notification {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Style the progress bar with ultra-specific selectors */
body #shiny-notification-panel .shiny-notification .shiny-progress-notification .progress,
html body div#shiny-notification-panel div.shiny-notification div.shiny-progress-notification div.progress,
.shiny-progress-notification .progress {
  height: 12px !important;
  margin-top: 15px !important;
  margin-bottom: 8px !important;
  background-color: #e9ecef !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: block !important;
}

body #shiny-notification-panel .shiny-notification .shiny-progress-notification .progress .progress-bar,
html body div#shiny-notification-panel div.shiny-notification div.shiny-progress-notification div.progress div.progress-bar,
.shiny-progress-notification .progress .progress-bar {
  background-color: #2c3e50 !important;
  height: 100% !important;
}

/* Ensure progress text is visible */
.progress-text,
.progress-message,
.progress-detail {
  display: inline !important;
  visibility: visible !important;
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

/* Style the text with ultra-specific selectors */
body #shiny-notification-panel .shiny-notification .shiny-notification-content-text,
html body div#shiny-notification-panel div.shiny-notification div.shiny-notification-content div.shiny-notification-content-text,
.shiny-notification-content-text {
  font-weight: 600 !important;
  font-size: 16px !important;
  color: #2c3e50 !important;
  text-align: center !important;
  margin-bottom: 10px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Make close button less prominent with ultra-specific selectors */
body #shiny-notification-panel .shiny-notification .shiny-notification-close,
html body div#shiny-notification-panel div.shiny-notification div.shiny-notification-close,
.shiny-notification-close {
  color: #6c757d !important;
  opacity: 0.7 !important;
  font-size: 18px !important;
  padding: 10px !important;
}

body #shiny-notification-panel .shiny-notification .shiny-notification-close:hover,
html body div#shiny-notification-panel div.shiny-notification div.shiny-notification-close:hover,
.shiny-notification-close:hover {
  color: #2c3e50 !important;
  opacity: 1 !important;
}
