/**
 * Update Banner Styles
 * Notification banner for app updates
 */

/* Banner container */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, #764ba2 100%);
  color: white;
  padding: 0;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.update-banner-visible {
  transform: translateY(0);
}

.update-banner-hiding {
  transform: translateY(-100%);
}

.update-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.update-banner-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.update-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.update-banner-text strong {
  font-weight: 600;
}

.update-banner-message {
  opacity: 0.9;
  font-size: 0.9rem;
}

/* Refresh button */
.update-banner-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.update-banner-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.update-banner-btn:active {
  transform: translateY(0);
}

/* Close button */
.update-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 4px 8px;
  line-height: 1;
}

.update-banner-close:hover {
  opacity: 1;
}

/* Body offset when banner is visible */
body.has-update-banner {
  padding-top: 48px;
}

body.has-update-banner .sidebar {
  top: 48px;
  height: calc(100vh - 48px);
}

body.has-update-banner .main-content {
  margin-top: 0;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .update-banner-content {
    padding: 8px 40px 8px 12px;
    gap: 8px;
  }

  .update-banner-icon {
    display: none;
  }

  .update-banner-message {
    display: none;
  }

  .update-banner-btn {
    padding: 5px 12px;
    font-size: 0.8125rem;
  }

  body.has-update-banner {
    padding-top: 44px;
  }

  body.has-update-banner .sidebar {
    top: 44px;
    height: calc(100vh - 44px);
  }
}

/* Dark mode adjustments */
[data-theme="dark"] .update-banner {
  background: linear-gradient(135deg, #4c51bf 0%, #6b46c1 100%);
}
