/*
 * Grow Software
 * Processing Lock OPT-IN
 *
 * Sólo se activa desde botones que tengan:
 *
 * data-grow-processing
 */

#grow-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(248, 250, 252, 0.92);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

#grow-processing-overlay.grow-processing-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.grow-processing-card {
  width: min(92vw, 400px);

  padding: 34px 30px 30px;

  border-radius: 24px;

  background: #fff;

  border: 1px solid rgba(15, 23, 42, 0.08);

  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.16),
    0 6px 20px rgba(15, 23, 42, 0.06);

  text-align: center;
}

.grow-processing-brand {
  position: relative;

  min-height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 16px;
}

.grow-processing-halo {
  position: absolute;

  width: 120px;
  height: 120px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(25, 135, 84, 0.13) 0%,
      rgba(25, 135, 84, 0.05) 48%,
      rgba(25, 135, 84, 0) 72%
    );

  animation:
    grow-processing-pulse 1.5s
    ease-in-out infinite;
}

.grow-processing-logo {
  position: relative;
  z-index: 2;

  max-width: 210px;
  max-height: 88px;

  object-fit: contain;

  animation:
    grow-processing-breathe 1.5s
    ease-in-out infinite;
}

.grow-processing-title {
  margin: 0;

  font-size: 21px;
  font-weight: 700;

  color: #0f172a;
}

.grow-processing-action {
  min-height: 21px;

  margin: 8px 0 0;

  font-size: 14px;
  font-weight: 500;

  color: #475569;
}

.grow-processing-dots {
  display: inline-flex;

  gap: 6px;

  margin-top: 19px;
}

.grow-processing-dots span {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #198754;

  animation:
    grow-processing-dot 1.1s
    infinite ease-in-out;
}

.grow-processing-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.grow-processing-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

.grow-processing-note {
  margin: 17px 0 0;

  font-size: 12px;

  color: #94a3b8;
}

/*
 * NO usamos disabled=true.
 *
 * El submitter conserva name/value,
 * formaction y formmethod.
 */
.grow-processing-button-locked {
  opacity: 0.62 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

body.grow-processing-active {
  cursor: wait;
}

@keyframes grow-processing-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.90);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes grow-processing-breathe {
  0%,
  100% {
    transform: scale(0.97);
  }

  50% {
    transform: scale(1.03);
  }
}

@keyframes grow-processing-dot {
  0%,
  60%,
  100% {
    opacity: 0.30;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grow-processing-halo,
  .grow-processing-logo,
  .grow-processing-dots span {
    animation: none;
  }
}
