/* ══════════════════════════════════════════════════════
   PWA Install – Fibermanrique
   Archivo: /isp/css/pwa-install.css
   ══════════════════════════════════════════════════════ */

/* ── Contenedor ─────────────────────────────────────── */
.pwa-install-wrap {
  margin-top: 14px;
}
.pwa-install-wrap[hidden] {
  display: none !important;
}

/* ── Divider ────────────────────────────────────────── */
.pwa-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pwa-divider::before,
.pwa-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,135,232,.2), transparent);
}
.pwa-divider-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

/* ── Botón instalar ─────────────────────────────────── */
.btn-pwa-install {
  display: flex;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid #86efac;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Sora', 'DM Sans', sans-serif;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s ease;
}
.btn-pwa-install svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1;
  flex-shrink: 0;
}
.btn-pwa-install:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-1px);
}
.btn-pwa-install:active {
  transform: scale(0.98) translateY(0);
}
.btn-pwa-install:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn-pwa-install[hidden] {
  display: none !important;
}

/* ── Barra de progreso ──────────────────────────────── */
.pwa-progress-wrap {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.pwa-progress-wrap.visible {
  display: flex;
}
.pwa-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pwa-progress-step {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
}
.pwa-progress-pct {
  font-family: 'DM Mono', 'DM Sans', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #0087E8;
}
.pwa-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 100px;
  overflow: hidden;
}
.pwa-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0087E8, #38bdf8);
  border-radius: 100px;
  transition: width 0.3s ease;
}

/* ── Badge éxito ────────────────────────────────────── */
.pwa-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #86efac;
  background: #f0fdf4;
  animation: pwaFadeIn 0.5s ease;
}
.pwa-success[hidden] {
  display: none !important;
}
.pwa-success-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-success-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pwa-success-title {
  font-family: 'Sora', 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #16a34a;
  margin: 0;
}
.pwa-success-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0;
}

/* ── Texto ayuda ────────────────────────────────────── */
.pwa-help {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.pwa-help[hidden] {
  display: none !important;
}
.pwa-help strong {
  color: #0087E8;
}

/* ── Modal iOS ──────────────────────────────────────── */
.pwa-ios-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
  animation: pwaFadeIn 0.25s ease;
}
.pwa-ios-overlay.visible {
  display: flex;
}
.pwa-ios-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 34px;
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.pwa-ios-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.pwa-ios-close:hover {
  background: #e2e8f0;
}
.pwa-ios-modal h3 {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-ios-modal h3 i {
  font-size: 22px;
  color: #0087E8;
}
.pwa-ios-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 22px;
}
.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pwa-ios-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0087E8, #0066b3);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-ios-step-content {
  flex: 1;
  padding-top: 2px;
}
.pwa-ios-step-title {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 3px;
}
.pwa-ios-step-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.pwa-ios-step-desc i {
  font-size: 14px;
  vertical-align: -1px;
  color: #0087E8;
}
.pwa-ios-step-desc .kbd {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1px 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

/* ── Animaciones ────────────────────────────────────── */
@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pwaSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}