/* ========================================
   APP INSTALL BANNER - RESULTADO FÁCIL
   Integrado ao Service Worker existente
   ======================================== */

.app-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.app-install-banner.show {
  transform: translateY(0);
}

.app-install-banner.hide {
  transform: translateY(100%);
}

.app-install-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

.app-install-banner__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.app-install-banner__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-install-banner__icon img {
  width: 48px;
  height: 48px;
  fill: white;
}

.app-install-banner__text {
  flex: 1;
}

.app-install-banner__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.app-install-banner__subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.3;
}

.app-install-banner__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.app-install-banner__btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.app-install-banner__btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-install-banner__btn:active {
  transform: translateY(0);
}

.app-install-banner__btn--secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.app-install-banner__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.app-install-banner__close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.app-install-banner__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.app-install-banner__close svg {
  width: 16px;
  height: 16px;
  fill: white;
}

/* Responsividade */
@media (max-width: 768px) {
  .app-install-banner {
    padding: 12px;
  }
  
  .app-install-banner__content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .app-install-banner__left {
    flex-direction: column;
    text-align: center;
  }
  
  .app-install-banner__actions {
    width: 100%;
    justify-content: center;
  }
  
  .app-install-banner__btn {
    flex: 1;
    justify-content: center;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .app-install-banner__title {
    font-size: 15px;
  }
  
  .app-install-banner__subtitle {
    font-size: 13px;
  }
  
  .app-install-banner__btn {
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* Animações */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

.app-install-banner.slide-in {
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.app-install-banner.slide-out {
  animation: slideOutDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Estados especiais */
.app-install-banner--ios {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

.app-install-banner--android {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* Modo escuro (se aplicável) */
@media (prefers-color-scheme: dark) {
  .app-install-banner {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  }
  
  .app-install-banner__btn {
    background: #e2e8f0;
    color: #2d3748;
  }
  
  .app-install-banner__btn:hover {
    background: #cbd5e0;
  }
}

/* Acessibilidade */
.app-install-banner:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.app-install-banner__btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Suporte para preferências de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .app-install-banner,
  .app-install-banner__btn,
  .app-install-banner__close {
    transition: none;
  }
  
  .app-install-banner.slide-in,
  .app-install-banner.slide-out {
    animation: none;
  }
}
