/* ==============================================================================
   7SD PWA - Floating Install Banner & iOS Modal Styles
   ============================================================================== */

:root {
  --pwa-bg: rgba(19, 10, 33, 0.88);
  --pwa-border: rgba(184, 107, 255, 0.28);
  --pwa-accent: #7b2eff;
  --pwa-accent-glow: #b86bff;
  --pwa-text: #ffffff;
  --pwa-muted: #c9c6d5;
}

/* Banner Flutuante */
.pwa-install-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 460px;
  margin: 0 auto;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pwa-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--pwa-border);
  border-radius: 20px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(123, 46, 255, 0.22);
  animation: pwaSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes pwaSlideUp {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.pwa-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(123, 46, 255, 0.35);
  background: #180d28;
}

.pwa-app-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pwa-app-title {
  font-family: 'Plus Jakarta Sans', 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--pwa-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.pwa-app-desc {
  font-family: 'Plus Jakarta Sans', 'Google Sans', sans-serif;
  font-size: 11.5px;
  color: var(--pwa-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  margin-top: 2px;
}

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

.pwa-btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #7b2eff, #9a49ff);
  color: #ffffff;
  border: none;
  font-family: 'Plus Jakarta Sans', 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(123, 46, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.pwa-btn-install:active {
  transform: scale(0.96);
}

.pwa-btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--pwa-muted);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pwa-btn-close:active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Modal de Instruções iOS Safari */
.pwa-ios-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-ios-modal-backdrop.pwa-active {
  opacity: 1;
  visibility: visible;
}

.pwa-ios-sheet {
  width: 100%;
  max-width: 480px;
  background: #140b24;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid rgba(184, 107, 255, 0.35);
  border-bottom: none;
  padding: 24px 22px 34px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-ios-modal-backdrop.pwa-active .pwa-ios-sheet {
  transform: translateY(0);
}

.pwa-ios-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 18px;
}

.pwa-ios-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.pwa-ios-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #1f0f37;
  border: 1px solid rgba(184, 107, 255, 0.4);
}

.pwa-ios-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.pwa-ios-header p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  color: var(--pwa-muted);
  margin: 0;
}

.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 22px 0 26px;
}

.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.pwa-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b2eff, #b86bff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.pwa-step-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: #e6e2ee;
  line-height: 1.4;
  margin: 0;
}

.pwa-step-text strong {
  color: #fff;
}

.pwa-share-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  margin: 0 2px;
  vertical-align: middle;
}

.pwa-btn-ios-done {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7b2eff, #9a49ff);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(123, 46, 255, 0.4);
}
