/* Enhanced Reload Notification Styles - Modern Theme */

.auto-refresh-notification {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 420px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  animation: slideInBounceEnhanced 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

html.light .auto-refresh-notification {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auto-refresh-notification .notification-content {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.auto-refresh-notification .notification-icon {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auto-refresh-notification .pulse-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: pulseRing 2s infinite ease-out;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auto-refresh-notification .notification-text {
  flex: 1;
  min-width: 0;
}

.auto-refresh-notification .notification-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  color: white;
  letter-spacing: -0.01em;
}

.auto-refresh-notification .notification-subtitle {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 8px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.auto-refresh-notification .notification-hint {
  font-size: 12px;
  opacity: 0.85;
  font-style: italic;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.auto-refresh-notification .notification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.auto-refresh-notification .refresh-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.01em;
}

.auto-refresh-notification .refresh-btn.primary {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auto-refresh-notification .refresh-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.auto-refresh-notification .refresh-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auto-refresh-notification .dismiss-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
}

.auto-refresh-notification .dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: scale(1.05);
}

/* Enhanced Animations */
@keyframes slideInBounceEnhanced {
  0% {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px) scale(1.05);
    opacity: 0.9;
  }
  80% {
    transform: translateX(5px) scale(0.98);
    opacity: 0.95;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideOutBounce {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  20% {
    transform: translateX(-10px) scale(1.02);
    opacity: 0.9;
  }
  100% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
}

/* Fallback for browsers that don't support complex animations */
@media (prefers-reduced-motion: no-preference) {
  .auto-refresh-notification {
    animation: slideInBounceEnhanced 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* Simple fallback animation */
@keyframes slideInSimple {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes subtleShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

/* Loading indicator styles */
#refresh-loading-indicator {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 380px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  padding: 24px;
}

html.light #refresh-loading-indicator {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}

#refresh-loading-indicator .loading-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

#refresh-loading-indicator .loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

#refresh-loading-indicator .loading-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

#refresh-loading-indicator .loading-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  letter-spacing: -0.01em;
}

#refresh-loading-indicator .loading-subtitle {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success and error message styles */
.success-content,
.error-content {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.success-icon,
.error-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.success-text,
.error-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.success-title,
.error-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  letter-spacing: -0.01em;
}

.success-subtitle,
.error-subtitle {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.retry-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.01em;
}

.retry-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.retry-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Manual refresh button enhancement */
.manual-refresh-btn.refreshing {
  animation: refreshSpin 1s linear infinite;
  opacity: 0.7;
}

@keyframes refreshSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .auto-refresh-notification,
  #refresh-loading-indicator {
    right: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
    min-width: auto;
    top: 70px;
    transform-origin: center;
  }
  
  .auto-refresh-notification .notification-content {
    padding: 14px 16px;
    gap: 12px;
  }
  
  .auto-refresh-notification .notification-icon {
    width: 40px;
    height: 40px;
  }
  
  .auto-refresh-notification .pulse-ring {
    width: 52px;
    height: 52px;
  }
  
  .auto-refresh-notification .notification-title {
    font-size: 15px;
    margin-bottom: 4px;
  }
  
  .auto-refresh-notification .notification-subtitle {
    font-size: 13px;
    margin-bottom: 0;
  }
  
  .auto-refresh-notification .notification-hint {
    display: none; /* Hide hint on mobile to save space */
  }
  
  .auto-refresh-notification .notification-actions {
    margin-top: 12px;
    gap: 8px;
  }
  
  .auto-refresh-notification .refresh-btn {
    padding: 9px 14px;
    font-size: 13px;
    flex: 1;
  }
  
  .auto-refresh-notification .dismiss-btn {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
  
  /* Override animation for mobile to prevent horizontal overflow */
  @keyframes slideInBounceEnhanced {
    0% {
      transform: translateY(-20px) scale(0.95);
      opacity: 0;
    }
    60% {
      transform: translateY(5px) scale(1.02);
      opacity: 0.9;
    }
    80% {
      transform: translateY(-2px) scale(0.99);
      opacity: 0.95;
    }
    100% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
  }
}

@media (max-width: 480px) {
  .auto-refresh-notification,
  #refresh-loading-indicator {
    right: 8px;
    left: 8px;
    max-width: calc(100vw - 16px);
    top: 65px;
  }
  
  .auto-refresh-notification .notification-content {
    padding: 12px 14px;
    gap: 10px;
  }
  
  .auto-refresh-notification .notification-icon {
    width: 36px;
    height: 36px;
  }
  
  .auto-refresh-notification .notification-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .auto-refresh-notification .pulse-ring {
    width: 48px;
    height: 48px;
  }
  
  .auto-refresh-notification .notification-title {
    font-size: 14px;
    margin-bottom: 3px;
  }
  
  .auto-refresh-notification .notification-subtitle {
    font-size: 12px;
  }
  
  .auto-refresh-notification .notification-actions {
    margin-top: 10px;
  }
  
  .auto-refresh-notification .refresh-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .auto-refresh-notification .refresh-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .auto-refresh-notification .dismiss-btn {
    width: 34px;
    height: 34px;
  }
  
  .auto-refresh-notification .dismiss-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .auto-refresh-notification {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auto-refresh-notification {
    border: 2px solid white;
  }
  
  .auto-refresh-notification .refresh-btn {
    border: 2px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .auto-refresh-notification {
    animation: none;
    transform: translateX(0);
    opacity: 1;
  }
  
  .pulse-ring {
    animation: none;
  }
  
  .manual-refresh-btn.refreshing {
    animation: none;
  }
  
  @keyframes subtleShake {
    0%, 100% {
      transform: translateX(0);
    }
  }
}