/* =============================================================================
   HytHost ORDER button — standalone, theme-independent component
   -----------------------------------------------------------------------------
   Reusable across game / order pages. It does NOT depend on Bootstrap or the
   Ruzenko theme (.btn / .btn-primary) — drop this file in and add the class.

   Usage:
     <button class="hh-order-btn">…</button>              full-width (default)
     <a class="hh-order-btn hh-order-btn--auto">…</a>      shrink to content

   States handled here: :hover, :active, :focus-visible, :disabled /
   .is-disabled, and .is-loading (JS swaps the icon to a spinner and adds the
   class on submit). Colours are CSS variables — override --hh-ob-* on a wrapper
   or per page to re-skin (e.g. a purple variant for a different game).
   ============================================================================= */
.hh-order-btn {
  /* Palette — override to re-skin. Default = "buy/checkout" green, distinct
     from the purple/amber plan-card CTAs so the final action stands out. */
  --hh-ob-from: #14b877;
  --hh-ob-to: #38e08a;
  --hh-ob-from-hover: #18cb83;
  --hh-ob-to-hover: #4ff39c;
  --hh-ob-ink: #052e16;          /* dark green for max contrast on the green fill */
  --hh-ob-glow: rgba(56, 224, 138, 0.40);
  --hh-ob-ring: rgba(56, 224, 138, 0.55);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--hh-ob-ink);
  background: linear-gradient(135deg, var(--hh-ob-from), var(--hh-ob-to));
  box-shadow: 0 10px 26px var(--hh-ob-glow), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}
.hh-order-btn--auto { width: auto; }

.hh-order-btn i { font-size: 0.95em; line-height: 1; }

/* Sheen sweep on hover (premium touch). */
.hh-order-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.hh-order-btn:hover:not(:disabled):not(.is-loading) {
  background: linear-gradient(135deg, var(--hh-ob-from-hover), var(--hh-ob-to-hover));
  box-shadow: 0 15px 34px var(--hh-ob-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.hh-order-btn:hover:not(:disabled):not(.is-loading)::after { left: 135%; }

.hh-order-btn:active:not(:disabled):not(.is-loading) {
  transform: translateY(0);
  box-shadow: 0 6px 16px var(--hh-ob-glow);
}

.hh-order-btn:focus-visible {
  outline: 3px solid var(--hh-ob-ring);
  outline-offset: 2px;
}

/* Disabled (e.g. Custom view before an edition is chosen). */
.hh-order-btn:disabled,
.hh-order-btn.is-disabled {
  background: #2b2b38;
  color: #6d7180;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.hh-order-btn:disabled::after,
.hh-order-btn.is-disabled::after { display: none; }

/* Loading: JS adds .is-loading and swaps the icon to fa-spinner fa-spin. The
   label stays; the button locks so it can't be double-submitted. */
.hh-order-btn.is-loading {
  cursor: progress;
  opacity: 0.92;
  pointer-events: none;
  transform: none;
}
.hh-order-btn.is-loading::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hh-order-btn,
  .hh-order-btn::after { transition: none; }
  .hh-order-btn:hover:not(:disabled):not(.is-loading) { transform: none; }
}
