/* PWA Badge och Install-knapp styling */

#pwa-install-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#pwa-install-btn:active {
  transform: translateY(0);
}

#pwa-install-btn i {
  font-size: 1.1rem;
}

/* Badge styling för app-icon */
@supports (background: paint(foo)) {
  body {
    /* Stöd för experimentella features */
  }
}

/* Badge animation */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.badge-notification {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  animation: badge-pulse 2s infinite;
}

/* Notification toast styling */
.notification-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  padding: 16px;
  max-width: 400px;
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-toast.show {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-toast.hide {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100px);
    opacity: 0;
  }
}

.notification-toast-title {
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.notification-toast-body {
  color: #555;
  font-size: 0.9rem;
  margin: 0;
}

.notification-toast-time {
  font-size: 0.8rem;
  color: #95a5a6;
}

/* PWA-specific status indicators */
.pwa-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
  color: #27ae60;
}

.pwa-status.offline {
  background: rgba(231, 76, 60, 0.1);
  color: #c0392b;
}

.pwa-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  animation: pulse 2s infinite;
}

.pwa-status.offline .pwa-status-indicator {
  background: #c0392b;
  animation: none;
}

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

/* Installationsprompt styling */
.install-prompt-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.install-prompt-banner-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-prompt-banner-title {
  font-weight: 600;
  font-size: 1rem;
}

.install-prompt-banner-desc {
  font-size: 0.9rem;
  opacity: 0.95;
}

.install-prompt-banner-actions {
  display: flex;
  gap: 8px;
}

.install-prompt-banner-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.install-prompt-banner-btn.primary {
  background: white;
  color: #667eea;
}

.install-prompt-banner-btn.primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.install-prompt-banner-btn.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid white;
}

.install-prompt-banner-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  .notification-toast {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .install-prompt-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .install-prompt-banner-actions {
    width: 100%;
  }

  .install-prompt-banner-btn {
    flex: 1;
  }
}
