/* =========================================================
   EXPORTING CLOUD PWA
========================================================= */

/* =========================================================
   INSTALACIÓN
========================================================= */

#ec-pwa-install {
  position: fixed;
  z-index: 99999;
  right: 18px;
  bottom: 18px;
  width: min(440px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 15px;
  border: 1px solid #334155;
  border-radius: 18px;
  background: rgba(7, 16, 31, 0.98);
  color: #ffffff;
  box-shadow: 0 25px 75px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(16px);
  animation: ec-pwa-notice-in 0.25s ease-out;
}

.ec-pwa-install-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #c9a227;
  border-radius: 14px;
  background: rgba(201, 162, 39, 0.08);
  color: #c9a227;
  font-size: 15px;
  font-weight: 900;
}

.ec-pwa-install-copy {
  min-width: 0;
}

.ec-pwa-install-copy strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.25;
}

.ec-pwa-install-copy span {
  display: block;
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.45;
}

.ec-pwa-install-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.ec-pwa-install-actions button {
  min-height: 39px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

#ec-pwa-install-later {
  background: #1e293b;
  color: #cbd5e1;
}

#ec-pwa-install-later:hover {
  background: #293548;
  color: #ffffff;
}

#ec-pwa-install-button {
  background: #ffffff;
  color: #07101f;
}

#ec-pwa-install-button:hover {
  background: #f1f5f9;
}

#ec-pwa-install-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* =========================================================
   ACTUALIZACIÓN
========================================================= */

#ec-pwa-update {
  position: fixed;
  z-index: 99998;
  right: 16px;
  bottom: 16px;
  width: min(430px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid #334155;
  border-radius: 15px;
  background: #07101f;
  color: #ffffff;
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.38);
  animation: ec-pwa-notice-in 0.25s ease-out;
}

.ec-pwa-update-copy {
  min-width: 0;
}

#ec-pwa-update strong {
  display: block;
  font-size: 12px;
}

#ec-pwa-update span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 10px;
  line-height: 1.4;
}

#ec-pwa-update button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

#ec-pwa-update #ec-pwa-update-close {
  width: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* =========================================================
   ANIMACIÓN
========================================================= */

@keyframes ec-pwa-notice-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 760px) {
  #ec-pwa-install {
    right: 8px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    width: auto;
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 13px;
    border-radius: 17px;
  }

  .ec-pwa-install-icon {
    width: 46px;
    height: 46px;
  }

  .ec-pwa-install-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ec-pwa-install-actions button {
    width: 100%;
    min-height: 43px;
  }

  #ec-pwa-update {
    right: 9px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: 9px;
    width: auto;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #ec-pwa-update #ec-pwa-update-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    min-height: 28px;
  }

  .ec-pwa-update-copy {
    padding-right: 20px;
  }
}