/* ==========================================================================
   UK CARE LEARNING PLATFORM - PWA STYLES
   ========================================================================== */

/* Offline Status Floating Alert */
.pwa-offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #B45309;
  color: #FFFFFF;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1099;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease forwards;
}

.pwa-offline-indicator.show {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* PWA Install Button Visibility (hidden by default until beforeinstallprompt fires or in supported browsers) */
.pwa-install-btn {
  display: none;
}

.pwa-install-btn.ready {
  display: inline-flex !important;
}

/* Standalone App Mobile Optimizations */
@media all and (display-mode: standalone) {
  /* Safe-area padding for notch & home bar */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .learner-sidebar {
    padding-top: env(safe-area-inset-top);
  }

  .chat-widget-floating-container {
    bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }
}
