/* ── Curiosidad Total PWA – Estilos ─────────────────────────────────── */

/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --ct-pwa-accent:  #e63946;
  --ct-pwa-dark:    #1a1a2e;
  --ct-pwa-white:   #ffffff;
  --ct-pwa-shadow:  0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.14);
  --ct-pwa-radius:  50px;
  --ct-pwa-z:       9999;
}

/* ── Install Button ────────────────────────────────────────────────── */
.ct-pwa-btn {
  position: fixed;
  z-index: var(--ct-pwa-z);
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--ct-pwa-accent);
  color: var(--ct-pwa-white);
  border: none;
  border-radius: var(--ct-pwa-radius);
  box-shadow: var(--ct-pwa-shadow);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(.95);
  transition: opacity .35s ease, transform .35s ease;
}

.ct-pwa-btn.ct-pwa-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ct-pwa-btn.ct-pwa-hiding {
  opacity: 0;
  transform: translateY(20px) scale(.9);
}

/* Positions */
.ct-pwa-pos-bottom-right  { bottom: 22px; right: 22px; }
.ct-pwa-pos-bottom-left   { bottom: 22px; left:  22px; }
.ct-pwa-pos-bottom-center { bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px) scale(.95); }
.ct-pwa-pos-bottom-center.ct-pwa-visible { transform: translateX(-50%) translateY(0) scale(1); }
.ct-pwa-pos-bottom-center.ct-pwa-hiding  { transform: translateX(-50%) translateY(20px) scale(.9); }
.ct-pwa-pos-top-right     { top: 22px; right: 22px; }
.ct-pwa-pos-top-left      { top: 22px; left:  22px; }

/* Inner label */
.ct-pwa-btn-inner {
  padding: 13px 20px 13px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--ct-pwa-radius) 0 0 var(--ct-pwa-radius);
  transition: background .2s;
}

.ct-pwa-btn:hover .ct-pwa-btn-inner {
  background: rgba(255,255,255,.12);
}

/* Close × */
.ct-pwa-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 5px 6px 5px 0;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  background: rgba(0,0,0,.18);
  transition: background .2s;
  flex-shrink: 0;
}

.ct-pwa-close:hover {
  background: rgba(0,0,0,.35);
}

/* Pulse animation */
@keyframes ct-pwa-pulse {
  0%   { box-shadow: 0 0 0 0  rgba(230,57,70,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(230,57,70,0);  }
  100% { box-shadow: 0 0 0 0  rgba(230,57,70,0);   }
}

.ct-pwa-btn.ct-pwa-visible {
  animation: ct-pwa-pulse 2.4s ease-out 1s 3;
}

/* ── iOS Modal Overlay ─────────────────────────────────────────────── */
#ct-pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--ct-pwa-z) + 1);
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 24px;
  opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#ct-pwa-ios-modal.ct-pwa-modal-visible {
  opacity: 1;
}

.ct-pwa-modal-box {
  background: var(--ct-pwa-white);
  border-radius: 20px;
  padding: 28px 28px 24px;
  width: min(92%, 400px);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  position: relative;
  transform: translateY(30px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}

#ct-pwa-ios-modal.ct-pwa-modal-visible .ct-pwa-modal-box {
  transform: translateY(0);
}

.ct-pwa-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f3f5;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background .2s;
}

.ct-pwa-modal-close:hover { background: #e2e8f0; }

.ct-pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ct-pwa-modal-icon { font-size: 32px; line-height: 1; }

.ct-pwa-modal-header h3 {
  margin: 0;
  font-size: 19px;
  color: var(--ct-pwa-dark);
  font-weight: 800;
}

/* Steps */
.ct-pwa-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ct-pwa-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: #2d3748;
  line-height: 1.45;
}

.ct-pwa-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--ct-pwa-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.ct-pwa-share-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  color: #007aff;
  margin: 0 2px;
}

.ct-pwa-modal-footer {
  font-size: 12.5px;
  color: #718096;
  margin: 0;
  text-align: center;
}

/* ── Dark mode ─────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .ct-pwa-modal-box  { background: #1e2333; }
  .ct-pwa-modal-header h3 { color: #f0f0f0; }
  .ct-pwa-steps li   { color: #cbd5e0; }
  .ct-pwa-modal-close { background: #2d3748; color: #ccc; }
  .ct-pwa-modal-footer { color: #718096; }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .ct-pwa-btn-inner { font-size: 13.5px; padding: 12px 14px 12px 16px; }
}
