/* Offline Notification Styles */
.offline-notification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.offline-bar {
  background: #ff9800;
  color: white;
  padding: 12px 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
  font-weight: 500;
  min-height: 48px;
}

.offline-bar i {
  font-size: 18px;
  animation: pulse 2s infinite;
}

.offline-bar span {
  flex: 0 1 auto;
}

.btn-retry {
  background: rgba(255, 255, 255, 0.9);
  color: #ff9800;
  border: none;
  padding: 6px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-retry:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-retry:active {
  transform: scale(0.95);
}

/* Success notification */
.success-bar {
  background: #4caf50;
}

.success-bar i {
  animation: none;
}

/* Animations */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .offline-bar {
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .offline-bar i {
    font-size: 16px;
  }
  
  .btn-retry {
    width: 100%;
    max-width: 200px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .offline-bar {
    background: #f57c00;
  }
  
  .btn-retry {
    background: rgba(0, 0, 0, 0.8);
    color: white;
  }
  
  .btn-retry:hover {
    background: black;
  }
  
  .success-bar {
    background: #388e3c;
  }
}

/* Prevent layout shift */
body.has-offline-notification {
  padding-top: 48px;
}

/* Smooth transition for body padding */
body {
  transition: padding-top 0.3s ease-out;
}