/* public/css/pwa-install.css — PWA install banner + instruction modal + notif modal */

/* ============================================
   BANNER de install (parte de baixo, mobile)
   ============================================ */

.pwa-install-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  z-index: 9999;

  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;

  /* Safe-area iOS */
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.pwa-install-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.pwa-banner-icon {
  font-size: 28px;
  text-align: center;
}

.pwa-banner-text strong {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  color: var(--text, #2D3142);
  margin-bottom: 2px;
}

.pwa-banner-text p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-soft, #4F5366);
}

.pwa-banner-cta {
  background: linear-gradient(135deg, var(--primary, #FF6B6B), #FFA94D);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  touch-action: manipulation;
}

.pwa-banner-close {
  position: absolute;
  top: 6px; right: 6px;
  background: transparent;
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-mute, #8B8FA3);
  cursor: pointer;
  touch-action: manipulation;
}
.pwa-banner-close:hover { background: var(--bg, #FFFBF5); }

@media (max-width: 380px) {
  .pwa-install-banner { grid-template-columns: 1fr auto; padding: 12px; }
  .pwa-banner-icon { display: none; }
  .pwa-banner-cta { padding: 8px 12px; font-size: 12px; }
}

/* ============================================
   MODAL de ajuda / notificações
   ============================================ */

.pwa-help-modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 460px;
  width: calc(100% - 32px);
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.pwa-help-modal::backdrop {
  background: rgba(20, 30, 45, 0.6);
  backdrop-filter: blur(6px);
}
.pwa-help-modal[open] {
  animation: pwaModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pwaModalIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.pwa-help-content {
  padding: 32px 24px 24px;
  position: relative;
}

.pwa-help-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg, #FFFBF5);
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-mute, #8B8FA3);
  display: grid; place-items: center;
  touch-action: manipulation;
}
.pwa-help-close:hover { background: var(--border, #EAE6DC); }

.pwa-help-content h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  margin: 0 0 18px;
  color: var(--text, #2D3142);
  text-align: center;
}

/* Steps numerados */
.pwa-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  counter-reset: pwastep;
}
.pwa-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft, #F2EDE3);
  align-items: start;
  font-size: 14px;
  line-height: 1.5;
}
.pwa-steps li:last-child { border-bottom: none; }

.pwa-steps .step-num {
  width: 32px; height: 32px;
  background: var(--primary, #FF6B6B);
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
}

.ios-share-icon-big {
  display: inline-block;
  background: #007AFF;
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: bold;
  margin: 0 2px;
}

/* Botão de confirmação genérico do modal de ajuda */
.pwa-help-content .btn-primary,
.pwa-help-content .pwa-help-confirm {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary, #FF6B6B), #FFA94D);
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.3);
}
.pwa-help-content .btn-primary:active,
.pwa-help-content .pwa-help-confirm:active {
  transform: translateY(1px);
}

/* ============================================
   MODAL específico de notificações
   ============================================ */

.pwa-notif-content { text-align: center; }

.pwa-notif-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
  animation: pwaBellShake 1s ease-in-out 0.4s;
}
@keyframes pwaBellShake {
  0%, 100% { transform: rotate(0); }
  20%      { transform: rotate(-15deg); }
  40%      { transform: rotate(12deg); }
  60%      { transform: rotate(-8deg); }
  80%      { transform: rotate(4deg); }
}

.pwa-notif-lead {
  color: var(--text-soft, #4F5366);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}

.pwa-notif-list {
  list-style: none;
  padding: 14px 16px;
  margin: 0 0 24px;
  background: var(--bg, #FFFBF5);
  border-radius: 12px;
  text-align: left;
}
.pwa-notif-list li {
  font-size: 13.5px;
  padding: 6px 0;
  color: var(--text, #2D3142);
}

.pwa-notif-buttons {
  display: flex;
  gap: 10px;
}
.pwa-notif-buttons button {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  touch-action: manipulation;
}
.pwa-notif-buttons .btn-ghost {
  background: var(--bg, #FFFBF5);
  color: var(--text-soft, #4F5366);
  border: 1px solid var(--border, #EAE6DC);
  box-shadow: none;
}
.pwa-notif-buttons .btn-primary {
  background: linear-gradient(135deg, var(--primary, #FF6B6B), #FFA94D);
  color: white;
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.3);
}
.pwa-notif-buttons .btn-primary:active {
  transform: translateY(1px);
}
