/* ==========================================================================
   SYNAPSE IA HUB - PWA INSTALLER DESIGN SYSTEM (OBSIDIAN GLASS)
   Zero Emojis, Phosphor Icons Exclusivos, Suporte Android/Chrome & iOS Safari
   ========================================================================== */

/* 1. BOTÃO NA NAVBAR */
.synapse-pwa-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  background: rgba(0, 210, 180, 0.08);
  border: 1px solid rgba(0, 210, 180, 0.28);
  border-radius: 9999px;
  color: #00F0FF;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.synapse-pwa-nav-btn:hover {
  background: rgba(0, 210, 180, 0.16);
  border-color: rgba(0, 240, 255, 0.5);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 210, 180, 0.25);
}

.synapse-pwa-nav-btn:active {
  transform: translateY(0);
}

.synapse-pwa-nav-btn i {
  font-size: 1.05rem;
  color: #00D2B4;
  transition: transform 0.2s ease;
}

.synapse-pwa-nav-btn:hover i {
  transform: scale(1.1);
  color: #00F0FF;
}

.synapse-pwa-nav-btn .btn-pulse-dot {
  width: 6px;
  height: 6px;
  background: #00F0FF;
  border-radius: 50%;
  box-shadow: 0 0 8px #00F0FF;
  animation: pwaDotPulse 2s infinite;
}

@keyframes pwaDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* 2. BANNER FLUTUANTE INFERIOR MOBILE */
.synapse-pwa-bottom-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 120%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: rgba(14, 18, 26, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 210, 180, 0.3);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 210, 180, 0.12);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.synapse-pwa-bottom-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.synapse-pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.synapse-pwa-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #080A0F;
  border: 1px solid rgba(0, 210, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.synapse-pwa-app-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.synapse-pwa-banner-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.synapse-pwa-banner-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.synapse-pwa-banner-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.synapse-pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.synapse-pwa-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: linear-gradient(135deg, #00D2B4, #00B4D8);
  border: none;
  border-radius: 10px;
  color: #06090E;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 210, 180, 0.3);
}

.synapse-pwa-btn-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 210, 180, 0.45);
}

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

.synapse-pwa-btn-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.synapse-pwa-btn-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* 3. MODAL DE INSTRUÇÕES PARA IOS (SAFARI) */
.synapse-pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

@media (min-width: 640px) {
  .synapse-pwa-modal-backdrop {
    align-items: center;
  }
}

.synapse-pwa-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.synapse-pwa-modal-sheet {
  width: 100%;
  max-width: 440px;
  background: #0E121A;
  border: 1px solid rgba(0, 210, 180, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  transform: translateY(40px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.synapse-pwa-modal-backdrop.is-open .synapse-pwa-modal-sheet {
  transform: translateY(0);
}

.synapse-pwa-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.synapse-pwa-sheet-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.synapse-pwa-sheet-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #080A0F;
  border: 1px solid rgba(0, 210, 180, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.synapse-pwa-sheet-icon img {
  width: 28px;
  height: 28px;
}

.synapse-pwa-sheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
}

.synapse-pwa-sheet-subtitle {
  font-size: 0.8125rem;
  color: #94A3B8;
  margin-top: 2px;
}

.synapse-pwa-sheet-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.synapse-pwa-sheet-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.synapse-pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
}

.synapse-pwa-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 210, 180, 0.15);
  border: 1px solid rgba(0, 210, 180, 0.4);
  color: #00F0FF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.synapse-pwa-step-info {
  font-size: 0.875rem;
  color: #E2E8F0;
  line-height: 1.45;
}

.synapse-pwa-step-info strong {
  color: #FFFFFF;
  font-weight: 600;
}

.synapse-pwa-step-info i {
  display: inline-flex;
  vertical-align: middle;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #00F0FF;
  margin: 0 3px;
  font-size: 1rem;
}

.synapse-pwa-sheet-btn-ok {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #00D2B4, #00B4D8);
  border: none;
  border-radius: 12px;
  color: #06090E;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.synapse-pwa-sheet-btn-ok:hover {
  filter: brightness(1.08);
}

/* 4. ESCONDER QUANDO JÁ ESTIVER NO MODO STANDALONE */
@media all and (display-mode: standalone) {
  .synapse-pwa-nav-btn,
  .synapse-pwa-bottom-banner {
    display: none !important;
  }
}
