/*
 * My-account dashboard.
 *
 * The previous version of myaccount/dashboard.php printed these rules inline
 * as .container, .links and .link-box - global class names on a page the theme
 * also styles. Everything here is namespaced .pnp-dash__* instead.
 */

.pnp-dash {
  --pnp-teal: #1bb1bf;
  --pnp-teal-dark: #14929e;
  --pnp-olive: #9fb31b;
  --pnp-ink: #333;
  --pnp-muted: #6b7280;
  --pnp-line: #d8dce1;

  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* --- Welcome ----------------------------------------------------------- */

.pnp-dash__welcome {
  text-align: center;
  margin-bottom: 30px;
}

.pnp-dash__welcome h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.pnp-dash__lead {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.pnp-dash__lead b {
  color: var(--pnp-olive);
}

/* --- Banners ----------------------------------------------------------- */

.pnp-dash__banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid var(--pnp-line);
  border-left-width: 4px;
  border-radius: 10px;
  line-height: 1.55;
}

.pnp-dash__banner i {
  flex: 0 0 auto;
  margin-top: 3px;
  font-size: 20px;
}

.pnp-dash__banner--info {
  background: #f2fbfc;
  border-left-color: var(--pnp-teal);
}

.pnp-dash__banner--info i {
  color: var(--pnp-teal);
}

.pnp-dash__banner--warn {
  background: #fff8e6;
  border-left-color: #dba617;
}

.pnp-dash__banner--warn i {
  color: #b8860b;
}

.pnp-dash__banner-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--pnp-teal);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.pnp-dash__banner-cta:hover,
.pnp-dash__banner-cta:focus-visible {
  background: var(--pnp-teal-dark);
}

/* --- Section titles ---------------------------------------------------- */

.pnp-dash__section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 14px;
  font-size: 22px;
  color: var(--pnp-ink);
}

.pnp-dash__counter {
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2f4;
  color: var(--pnp-muted);
  font-size: 14px;
  font-weight: 600;
}

/* --- Cards ------------------------------------------------------------- */

.pnp-dash__links,
.pnp-dash__feature-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pnp-dash__feature-links {
  margin-bottom: 20px;
}

.pnp-dash__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--pnp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pnp-ink) !important;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pnp-dash__card:hover,
.pnp-dash__card:focus-visible {
  border-color: var(--pnp-teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 177, 191, 0.12);
  text-decoration: none;
}

.pnp-dash__card i {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--pnp-line);
  border-radius: 50%;
  color: var(--pnp-teal);
  font-size: 20px;
}

/* --- Tome collection --------------------------------------------------- */

.pnp-dash__tomes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pnp-dash__tomes li {
  margin: 0;
  list-style: none;
}

.pnp-dash__tome a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border: 1px solid var(--pnp-line);
  border-radius: 10px;
  background: #fff;
  color: var(--pnp-ink) !important;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.pnp-dash__tome a:hover,
.pnp-dash__tome a:focus-visible {
  transform: translateY(-2px);
  text-decoration: none;
}

.pnp-dash__tome-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.pnp-dash__tome-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pnp-dash__tome-state {
  font-size: 13px;
  opacity: 0.85;
}

.pnp-dash__tome--owned a {
  border-color: var(--pnp-olive);
  background: #f7faec;
  color: #4a6b00 !important;
}

.pnp-dash__tome--locked a {
  background: #f6f7f8;
  color: var(--pnp-muted) !important;
  border-style: dashed;
}

.pnp-dash__tome--next a {
  border-style: solid;
  border-color: #dba617;
  background: #fff8e6;
  color: #8a6100 !important;
  animation: pnp-dash-pulse 2.4s ease-in-out infinite;
}

@keyframes pnp-dash-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(219, 166, 23, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(219, 166, 23, 0);
  }
}

/* --- Referral block ---------------------------------------------------- */

.pnp-dash__referral {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pnp-teal), var(--pnp-teal-dark));
  color: #fff;
}

.pnp-dash__referral h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 22px;
}

.pnp-dash__referral p {
  margin: 0;
  max-width: 62ch;
  line-height: 1.55;
}

.pnp-dash__referral strong {
  color: #fff;
}

.pnp-dash__referral-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--pnp-teal-dark) !important;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.pnp-dash__referral-cta:hover,
.pnp-dash__referral-cta:focus-visible {
  transform: translateY(-2px);
  text-decoration: none;
}

/* --- Partners ---------------------------------------------------------- */

.pnp-dash__partners {
  padding-top: 12px;
  border-top: 1px solid var(--pnp-line);
  margin-top: 36px;
}

/* --- HuKeys ------------------------------------------------------------ */

.pnp-dash__hukeys {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 200px;
  margin: 48px auto 8px;
  padding: 64px 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 24px 60px rgba(76, 102, 12, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pnp-dash__hukeys::before {
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(160, 181, 38, 0.18);
  border-radius: 20px;
  content: "";
}

.pnp-dash__hukeys-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.pnp-dash__hukeys h2 {
  margin: 0 !important;
  color: #a0b526 !important;
  font-size: clamp(42px, 7vw, 76px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 0.95 !important;
}

.pnp-dash__hukeys-content p {
  margin: 16px 0 28px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.pnp-dash__hukeys-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: #a0b526;
  box-shadow:
    0 10px 22px rgba(103, 122, 18, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.pnp-dash__hukeys-button span {
  font-size: 20px;
  line-height: 0.7;
  transition: transform 180ms ease;
}

.pnp-dash__hukeys-button:hover,
.pnp-dash__hukeys-button:focus-visible {
  background: #879d1d;
  box-shadow:
    0 14px 28px rgba(103, 122, 18, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff !important;
}

.pnp-dash__hukeys-button:hover span,
.pnp-dash__hukeys-button:focus-visible span {
  transform: translateX(3px);
}

.pnp-dash__hukeys-title {
  margin: 0;
  color: #a0b526;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.pnp-dash__hukeys-glow {
  position: absolute;
  z-index: -1;
  width: 190px;
  height: 190px;
  border-radius: 42% 58% 63% 37% / 39% 43% 57% 61%;
  background: rgba(160, 181, 38, 0.48);
  animation: pnp-dash-hukeys-float 8s ease-in-out infinite alternate;
}

.pnp-dash__hukeys-glow--left {
  top: -76px;
  left: -44px;
}

.pnp-dash__hukeys-glow--right {
  right: -52px;
  bottom: -88px;
  width: 430px;
  height: 340px;
  background: rgba(160, 181, 38, 0.32);
  animation-delay: -3s;
}

@keyframes pnp-dash-hukeys-float {
  from {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(12px, 10px, 0) rotate(7deg);
  }
}

/* --- Accessibility ----------------------------------------------------- */

.pnp-dash .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pnp-dash__hukeys-glow,
  .pnp-dash__hukeys-button,
  .pnp-dash__hukeys-button span,
  .pnp-dash__tome--next a,
  .pnp-dash__card,
  .pnp-dash__referral-cta {
    animation: none;
    transition: none;
  }
}

@media (max-width: 600px) {
  .pnp-dash {
    padding: 16px;
  }

  .pnp-dash__welcome h1 {
    font-size: 28px;
  }

  .pnp-dash__tomes {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }

  .pnp-dash__tome-number {
    font-size: 22px;
  }

  .pnp-dash__referral {
    padding: 20px;
  }

  .pnp-dash__hukeys {
    min-height: 270px;
    margin-top: 36px;
    padding: 52px 20px;
    border-radius: 22px;
  }
}
