/* =========================================================
   WILDVERSE AUTH COMPONENTS
   Reusable cards, buttons, errors and profile elements
========================================================= */

/* Generic auth card */

.wv-auth-card {
  border: 1px solid var(--wv-auth-border);
  border-radius: var(--wv-auth-radius-large);

  color: var(--wv-auth-text);

  background:
    linear-gradient(
      145deg,
      rgba(8, 25, 32, 0.94),
      rgba(3, 14, 19, 0.96)
    );

  box-shadow:
    var(--wv-auth-shadow),
    0 0 30px rgba(126, 243, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.wv-auth-card h1,
.wv-auth-card h2,
.wv-auth-card h3 {
  color: var(--wv-auth-text-strong);
}

.wv-auth-card p {
  color: var(--wv-auth-text-muted);
}

.wv-auth-card a {
  color: var(--wv-auth-cyan);
}

/* Error message */

.wv-auth-error {
  padding: 0.75rem;
  border: 1px solid rgba(255, 110, 134, 0.28);
  border-radius: var(--wv-auth-radius-small);

  color: #ffd6dc;
  background: rgba(180, 30, 55, 0.25);
}

/* Profile */

.wv-auth-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.wv-auth-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  object-fit: cover;

  border: 1px solid rgba(126, 243, 255, 0.26);

  box-shadow:
    0 0 18px rgba(126, 243, 255, 0.13),
    0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Back to WildVerse */

.wv-auth-card .wv-auth-back-link {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.65rem 1rem;

  border: 1px solid rgba(126, 243, 255, 0.42);
  border-radius: 999px;

  color: #061014;

  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;

  background:
    linear-gradient(
      110deg,
      var(--wv-auth-cyan),
      var(--wv-auth-green) 42%,
      var(--wv-auth-lime) 72%,
      var(--wv-auth-cyan)
    );

  background-size: 220% 100%;

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(126, 243, 255, 0.18);

  animation: wv-auth-back-shimmer 4s linear infinite;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.wv-auth-card .wv-auth-back-link:hover {
  transform: translateY(-2px) rotate(-1deg) scale(1.02);
  filter: saturate(1.15);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(126, 243, 255, 0.3);
}

.wv-auth-card .wv-auth-back-link:active {
  transform: translateY(0) scale(0.99);
}

.wv-auth-card .wv-auth-back-link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

@keyframes wv-auth-back-shimmer {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 220% 50%;
  }
}

/* Logout */

.wv-auth-logout-form {
  display: inline-flex;
  margin: 0;
}

.wv-auth-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  min-height: 42px;
  padding: 0.7rem 1.1rem;

  border: 1px solid rgba(126, 243, 255, 0.28);
  border-radius: 999px;

  color: #dffcff;

  font: inherit;
  font-weight: 700;
  line-height: 1;

  background:
    linear-gradient(
      135deg,
      rgba(126, 243, 255, 0.14),
      rgba(126, 243, 255, 0.05)
    );

  cursor: pointer;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.wv-auth-logout:hover {
  transform: translateY(-1px);

  border-color: rgba(126, 243, 255, 0.55);

  background:
    linear-gradient(
      135deg,
      rgba(126, 243, 255, 0.22),
      rgba(126, 243, 255, 0.08)
    );

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(126, 243, 255, 0.08);
}

.wv-auth-logout:active {
  transform: translateY(0);
}

.wv-auth-logout:focus-visible {
  outline: 2px solid var(--wv-auth-focus);
  outline-offset: 3px;
}

/* Quiet account logout */

.wv-auth-logout--account {
  min-height: auto;
  padding: 0.35rem 0.2rem;

  border: 0;
  border-radius: 0;

  color: rgba(237, 250, 255, 0.48);

  font-size: 0.82rem;
  font-weight: 600;

  text-decoration: underline;
  text-decoration-color: rgba(237, 250, 255, 0.18);
  text-underline-offset: 0.22rem;

  background: transparent;
  box-shadow: none;
}

.wv-auth-logout--account:hover {
  transform: none;

  color: rgba(255, 255, 255, 0.78);

  background: transparent;
  box-shadow: none;

  text-decoration-color: rgba(126, 243, 255, 0.55);
}

.wv-auth-logout--account:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--wv-auth-focus);
  outline-offset: 3px;
}

/* Purchases action card */

.wv-auth-purchases-wrap {
  margin: 1.4rem 0 1.15rem;
}

.wv-auth-card .wv-auth-purchases-link {
  position: relative;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;

/*   width: 100%; */
  padding: 1rem 1.05rem;
  overflow: hidden;

  border: 1px solid rgba(126, 243, 255, 0.28);
  border-radius: var(--wv-auth-radius-medium);

  color: #effdff;
  text-decoration: none;

  background:
    linear-gradient(
      135deg,
      rgba(126, 243, 255, 0.15),
      rgba(174, 91, 255, 0.13) 52%,
      rgba(255, 92, 174, 0.1)
    );

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.wv-auth-card .wv-auth-purchases-link::before {
  content: "";

  position: absolute;
  top: -45%;
  left: -25%;

  width: 42%;
  height: 190%;

  pointer-events: none;
  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(126, 243, 255, 0.2) 0%,
      rgba(255, 92, 174, 0.11) 38%,
      transparent 72%
    );

  filter: blur(18px);
  animation: wv-auth-purchases-glow 6s ease-in-out infinite alternate;
}

.wv-auth-card .wv-auth-purchases-link > * {
  position: relative;
  z-index: 1;
}

.wv-auth-purchases-icon {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  border-radius: 14px;

  color: #061014;
  font-size: 1.2rem;

  background:
    linear-gradient(
      135deg,
      var(--wv-auth-cyan),
      var(--wv-auth-pink)
    );

  box-shadow:
    0 0 20px rgba(126, 243, 255, 0.22);
}

.wv-auth-purchases-link strong {
  display: block;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 900;
}

.wv-auth-purchases-link small {
  display: block;
  margin-top: 0.18rem;

  color: rgba(237, 250, 255, 0.62);
  font-size: 0.73rem;
  font-weight: 600;
}

.wv-auth-purchases-arrow {
  color: var(--wv-auth-cyan-soft);
  font-size: 1.35rem;
  font-weight: 900;

  transition: transform 0.2s ease;
}

.wv-auth-purchases-link:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 243, 255, 0.5);

  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(126, 243, 255, 0.1);
}

.wv-auth-purchases-link:hover .wv-auth-purchases-arrow {
  transform: translateX(4px);
}

.wv-auth-purchases-link:focus-visible {
  outline: 2px solid var(--wv-auth-focus);
  outline-offset: 4px;
}

@keyframes wv-auth-purchases-glow {
  from {
    transform: translateX(0) scale(0.9);
    opacity: 0.65;
  }

  to {
    transform: translateX(430%) scale(1.15);
    opacity: 1;
  }
}