/**
 * PWA Styles - Insitu Servicios
 * Estilos simplificados para componentes PWA
 */

/* ============================================
   Update Banner
   ============================================ */
.pwa-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #006E7E 0%, #004851 100%);
  color: white;
  padding: 12px 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 110, 126, 0.3);
}

.pwa-update-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pwa-update-text {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.pwa-update-button {
  background: white;
  color: #006E7E;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pwa-update-button:hover {
  background: #f0f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pwa-update-dismiss {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.pwa-update-dismiss:hover {
  opacity: 1;
}

/* ============================================
   Install Banner
   ============================================ */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9998;
  display: none;
  max-width: 400px;
  width: 90%;
  border: 1px solid rgba(0, 110, 126, 0.1);
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pwa-install-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-text strong {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.pwa-install-text span {
  font-size: 13px;
  color: #64748b;
}

.pwa-install-button {
  background: linear-gradient(135deg, #006E7E 0%, #004851 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pwa-install-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 110, 126, 0.3);
}

.pwa-install-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
}

.pwa-install-dismiss:hover {
  color: #64748b;
}

/* ============================================
   Connection Notifications
   ============================================ */
.pwa-connection-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9997;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-connection-notification.pwa-online {
  background: #10b981;
  color: white;
}

.pwa-connection-notification.pwa-offline {
  background: #f59e0b;
  color: white;
}

/* ============================================
   Offline Mode Styles
   ============================================ */
body.pwa-offline {
  position: relative;
}

body.pwa-offline::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 158, 11, 0.05);
  pointer-events: none;
  z-index: 9996;
}

/* Removed aggressive grayscale and pointer-events blocking
   Only show notification banner when offline */

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
  .pwa-update-banner {
    padding: 10px 16px;
  }

  .pwa-update-text {
    font-size: 13px;
  }

  .pwa-update-button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .pwa-install-banner {
    bottom: 16px;
    padding: 14px 16px;
  }

  .pwa-install-icon {
    font-size: 28px;
  }

  .pwa-install-text strong {
    font-size: 14px;
  }

  .pwa-install-text span {
    font-size: 12px;
  }

  .pwa-install-button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .pwa-connection-notification {
    top: 70px;
    right: 16px;
    left: 16px;
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .pwa-install-banner {
    bottom: 30px;
    max-width: 450px;
  }
}

/* ============================================
   Dark Mode Support
   ============================================ */
.dark .pwa-install-banner {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark .pwa-install-text strong {
  color: #f1f5f9;
}

.dark .pwa-install-text span {
  color: #94a3b8;
}

.dark .pwa-install-dismiss {
  color: #64748b;
}

.dark .pwa-install-dismiss:hover {
  color: #94a3b8;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .pwa-update-banner,
  .pwa-install-banner,
  .pwa-connection-notification {
    display: none !important;
  }
}

/* ============================================
   Accessibility
   ============================================ */
.pwa-update-button:focus,
.pwa-install-button:focus,
.pwa-update-dismiss:focus,
.pwa-install-dismiss:focus {
  outline: 2px solid #006E7E;
  outline-offset: 2px;
}
