/* Discovery-only: first-panel "Surprise me" (scoped; home unaffected) */
.hq-discovery-surprise {
  --hq-surprise-blue: #007aff;
  --hq-surprise-card: rgba(15, 23, 42, 0.92);
  --hq-surprise-border: rgba(148, 163, 184, 0.22);
  margin: 8px 12px 16px;
  position: relative;
}

.hq-discovery-surprise__panel {
  position: relative;
  border-radius: 22px;
  padding: 18px 16px 16px;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 52%, rgba(2, 6, 23, 0.99) 100%);
  border: 1px solid var(--hq-surprise-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hq-discovery-surprise__panel--intro {
  text-align: center;
}

.hq-discovery-surprise__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.98);
  letter-spacing: -0.02em;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.hq-discovery-surprise__sub {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.78);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

/* Mystery cube visual */
.hq-discovery-surprise__visual {
  position: relative;
  width: min(220px, 72vw);
  height: 180px;
  margin: 8px auto 14px;
}

.hq-discovery-surprise__orbit {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 168px;
  height: 168px;
  border: 2px dashed rgba(148, 163, 184, 0.35);
  border-radius: 50%;
  animation: hq-surprise-spin 22s linear infinite;
}

@keyframes hq-surprise-spin {
  to {
    transform: rotate(360deg);
  }
}

.hq-discovery-surprise__orbit-icon {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(226, 232, 240, 0.95);
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.hq-discovery-surprise__orbit-icon:nth-child(1) {
  left: 6%;
  top: 10%;
}
.hq-discovery-surprise__orbit-icon:nth-child(2) {
  right: 4%;
  top: 14%;
}
.hq-discovery-surprise__orbit-icon:nth-child(3) {
  left: 10%;
  bottom: 8%;
}
.hq-discovery-surprise__orbit-icon:nth-child(4) {
  right: 10%;
  bottom: 10%;
}

.hq-discovery-surprise__cube {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  /* Logo URL supplied from template via --hq-surprise-cube-logo */
  background-color: #0f172a;
  /* Logo layer first so it paints above the gradient (Classic + themed shells) */
  background-image: var(--hq-surprise-cube-logo, none),
    linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.92) 45%, rgba(2, 6, 23, 0.94) 100%);
  background-size: 78% auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 36px rgba(0, 0, 0, 0.55),
    0 -12px 28px rgba(0, 122, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hq-discovery-surprise__cube::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 22px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.9) 0%, transparent 72%);
  filter: blur(6px);
  opacity: 0.85;
  pointer-events: none;
}

.hq-discovery-surprise__cube-q {
  font-size: 2.35rem;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.55);
  line-height: 1;
  text-shadow:
    0 0 12px rgba(15, 23, 42, 0.95),
    0 2px 14px rgba(0, 0, 0, 0.65);
  position: relative;
  z-index: 1;
}

.hq-discovery-surprise__ctx {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.hq-discovery-surprise__ctx strong {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.88);
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.hq-discovery-surprise__btn-primary {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, #2b8cff 0%, var(--hq-surprise-blue) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 122, 255, 0.28);
}

.hq-discovery-surprise__btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hq-discovery-surprise__fine-print {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.3;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

/* Result state */
.hq-discovery-surprise__panel--result[hidden] {
  display: none !important;
}

.hq-discovery-surprise__panel--intro.is-hidden {
  display: none;
}

.hq-discovery-surprise__back {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hq-discovery-surprise__result-head {
  text-align: center;
  padding: 0 28px 8px;
}

.hq-discovery-surprise__sparkle {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 122, 255, 0.45), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.hq-discovery-surprise__pill {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.22);
  border: 1px solid rgba(0, 122, 255, 0.45);
  color: rgba(219, 234, 254, 0.98);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hq-discovery-surprise__inner {
  margin-top: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hq-discovery-surprise__inner-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hq-discovery-surprise__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 122, 255, 0.45);
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
}

.hq-discovery-surprise__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hq-discovery-surprise__inner-type {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  margin-bottom: 2px;
}

.hq-discovery-surprise__inner-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.hq-discovery-surprise__inner-role {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.75);
}

.hq-discovery-surprise__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.82);
}

.hq-discovery-surprise__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hq-discovery-surprise__tag {
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(226, 232, 240, 0.88);
}

.hq-discovery-surprise__bio {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hq-discovery-surprise__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.hq-discovery-surprise__actions a,
.hq-discovery-surprise__actions button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
}

.hq-discovery-surprise__actions a {
  background: var(--hq-surprise-blue);
  color: #fff;
}

.hq-discovery-surprise__actions button {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hq-discovery-surprise__feedback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hq-discovery-surprise__feedback-text strong {
  display: block;
  font-size: 0.82rem;
  color: #fff;
}

.hq-discovery-surprise__feedback-text span {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.95);
}

.hq-discovery-surprise__feedback-btns {
  display: flex;
  gap: 8px;
}

.hq-discovery-surprise__feedback-btns button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  cursor: pointer;
}

.hq-discovery-surprise__again {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--hq-surprise-blue);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .hq-discovery-surprise__orbit {
    animation: none;
  }
}

/* Mobile: keep dashed ring, drop the orbiting glyph chips (cleaner, less visual noise). */
@media (max-width: 767.98px) {
  .hq-discovery-surprise__orbit-icon {
    display: none !important;
  }
}

/* Tablet / desktop: keep a readable “feature card” width (mockup is phone-first). */
@media (min-width: 768px) {
  .hq-discovery-surprise {
    margin: 12px auto 20px;
    padding-left: clamp(8px, 2vw, 16px);
    padding-right: clamp(8px, 2vw, 16px);
    max-width: min(100%, 1120px);
    box-sizing: border-box;
  }

  .hq-discovery-surprise__panel {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 22px 22px 20px;
  }

  .hq-discovery-surprise__title {
    font-size: 1.35rem;
  }

  .hq-discovery-surprise__visual {
    width: min(240px, 50vw);
    height: 196px;
  }

  .hq-discovery-surprise__orbit {
    width: 180px;
    height: 180px;
  }

  .hq-discovery-surprise__cube {
    width: 92px;
    height: 92px;
  }

  .hq-discovery-surprise__btn-primary {
    max-width: 380px;
    padding: 15px 22px;
  }

  .hq-discovery-surprise__avatar {
    width: 72px;
    height: 72px;
  }

  .hq-discovery-surprise__inner-name {
    font-size: 1.12rem;
  }
}

@media (min-width: 1200px) {
  .hq-discovery-surprise__panel {
    max-width: 600px;
  }
}

/* Discovery avatar rail: home-index.css loads after mobile-home-2026 and adds
   hover scale(1.1) on .professional-profile-circle — causes overlap. Direct links to profile. */
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link,
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link:hover,
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link:focus,
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link:active {
  transform: none !important;
  text-decoration: none !important;
  color: inherit !important;
  box-sizing: border-box !important;
}
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link:hover,
body.discovery-page #discoveryAvatarRow a.hq-discovery-face-link:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.85);
  outline-offset: 2px;
}
