/* PWA-specific styles */

/* Hide scrollbars in standalone mode */
@media (display-mode: standalone) {
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure full height in standalone mode */
  html, body {
    height: 100%;
    overflow: hidden;
  }
  
  /* Hide address bar area on mobile */
  @supports (-webkit-touch-callout: none) {
    body {
      padding-top: env(safe-area-inset-top);
      padding-bottom: env(safe-area-inset-bottom);
      padding-left: env(safe-area-inset-left);
      padding-right: env(safe-area-inset-right);
    }
  }
}

/* PWA Install Button Styles */
#pwa-install-button {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#pwa-install-button:hover {
  background: #a0170c !important;
}

#pwa-install-button:active {
  transform: scale(0.95) !important;
}

/* Loading screen for PWA */
.pwa-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #87655F;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pwa-loading .logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.pwa-loading .text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.pwa-loading .subtext {
  font-size: 14px;
  opacity: 0.8;
}

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

/* Hide loading screen when app is ready */
.app-ready .pwa-loading {
  display: none;
}

/* PWA-specific responsive adjustments */
@media (max-width: 768px) {
  #pwa-install-button {
    bottom: 10px !important;
    right: 10px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
}

/* Dark mode support for PWA */
@media (prefers-color-scheme: dark) {
  .pwa-loading {
    background: #5a4a45;
  }
  
  #pwa-install-button {
    background: #1a1a1a !important;
    color: white !important;
    border: 1px solid #333 !important;
  }
  
  #pwa-install-button:hover {
    background: #2a2a2a !important;
  }
}
