/*
 * WebTechs Employee Hub — colleague club 1.13.0
 * Positive gamification, scoped leaderboards and auditable appreciation.
 */

.wteh-club-page-title {
  align-items: flex-end;
}

.wteh-club-season,
.wteh-club-counter {
  align-items: center;
  background: color-mix(in srgb, var(--wteh-accent) 9%, var(--wteh-surface));
  border: 1px solid color-mix(in srgb, var(--wteh-accent) 20%, var(--wteh-border));
  border-radius: 999px;
  color: var(--wteh-accent-readable);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 34px;
  padding: 5px 13px;
  white-space: nowrap;
}

.wteh-club-hero {
  align-items: center;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, .25), transparent 30%),
    linear-gradient(125deg, color-mix(in srgb, var(--wteh-accent) 88%, #33217d), color-mix(in srgb, var(--wteh-accent) 58%, #173a72));
  border: 1px solid color-mix(in srgb, var(--wteh-accent) 42%, transparent);
  border-radius: 24px;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--wteh-accent) 20%, transparent);
  color: #fff;
  display: grid;
  gap: 28px;
  grid-template-columns: 164px minmax(220px, 1fr) minmax(250px, .85fr);
  margin-bottom: 22px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.wteh-club-hero::after {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
  height: 320px;
  left: -130px;
  position: absolute;
  top: -180px;
  width: 320px;
}

.wteh-club-level-ring {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(#ffd76a var(--wteh-level-progress), rgba(255, 255, 255, .19) 0);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 13px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.wteh-club-level-ring::before {
  background: color-mix(in srgb, var(--wteh-accent) 74%, #253270);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: inherit;
  content: "";
  inset: 10px;
  position: absolute;
}

.wteh-club-level-ring > * {
  position: relative;
  z-index: 1;
}

.wteh-club-level-ring span {
  font-size: 32px;
  line-height: 1.2;
}

.wteh-club-level-ring b {
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.35;
}

.wteh-club-level-ring small {
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
}

.wteh-club-hero-copy,
.wteh-club-quick-stats {
  position: relative;
  z-index: 1;
}

.wteh-club-hero-copy > span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
}

.wteh-club-hero-copy h2 {
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
  margin: 1px 0 4px;
}

.wteh-club-hero-copy p {
  color: rgba(255, 255, 255, .82);
  margin: 0 0 14px;
}

.wteh-club-hero-copy p strong {
  color: #fff1a8;
}

.wteh-club-xp-track {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.wteh-club-xp-track span {
  background: linear-gradient(90deg, #ffe28a, #ffbb4a);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 3px;
}

.wteh-club-quick-stats {
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.wteh-club-quick-stats > div {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 8px;
  text-align: center;
}

.wteh-club-quick-stats > div + div {
  border-right: 1px solid rgba(255, 255, 255, .14);
}

.wteh-club-quick-stats span,
.wteh-club-quick-stats small {
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
}

.wteh-club-quick-stats strong {
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  line-height: 1.4;
}

.wteh-club-section {
  background: var(--wteh-surface);
  border: 1px solid var(--wteh-border);
  border-radius: 20px;
  box-shadow: var(--wteh-shadow-xs);
  margin-bottom: 22px;
  min-width: 0;
  padding: 22px;
}

.wteh-club-section > .wteh-card-heading {
  margin-bottom: 17px;
}

.wteh-mission-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wteh-mission-card {
  align-items: flex-start;
  background: var(--wteh-surface-2);
  border: 1px solid var(--wteh-border);
  border-radius: 16px;
  display: flex;
  gap: 13px;
  min-width: 0;
  padding: 15px;
  transition: border-color .2s ease, transform .2s ease;
}

.wteh-mission-card:hover {
  border-color: color-mix(in srgb, var(--wteh-accent) 28%, var(--wteh-border));
  transform: translateY(-2px);
}

.wteh-mission-card.is-complete {
  background: color-mix(in srgb, #10b981 7%, var(--wteh-surface));
  border-color: color-mix(in srgb, #10b981 30%, var(--wteh-border));
}

.wteh-mission-icon {
  align-items: center;
  background: color-mix(in srgb, var(--wteh-accent) 10%, var(--wteh-surface));
  border-radius: 13px;
  display: flex;
  flex: 0 0 43px;
  font-size: 20px;
  height: 43px;
  justify-content: center;
}

.wteh-mission-card.is-complete .wteh-mission-icon {
  background: #10b981;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.wteh-mission-copy {
  flex: 1;
  min-width: 0;
}

.wteh-mission-copy > div:first-child {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.wteh-mission-copy h4 {
  font-size: 14px;
  margin: 0;
}

.wteh-mission-copy > div:first-child span {
  color: var(--wteh-accent-readable);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.wteh-mission-copy p {
  color: var(--wteh-text-3);
  font-size: 11px;
  margin: 4px 0 10px;
}

.wteh-mission-progress {
  background: var(--wteh-surface-3);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.wteh-mission-progress span {
  background: linear-gradient(90deg, var(--wteh-accent), color-mix(in srgb, var(--wteh-accent) 55%, #34d399));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.wteh-mission-card.is-complete .wteh-mission-progress span {
  background: #10b981;
}

.wteh-mission-copy > small {
  color: var(--wteh-text-3);
  display: block;
  font-size: 10px;
  margin-top: 5px;
}

.wteh-badge-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wteh-badge-card {
  align-items: center;
  background: var(--wteh-surface-2);
  border: 1px solid var(--wteh-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 16px 12px;
  text-align: center;
}

.wteh-badge-card > div {
  align-items: center;
  background: var(--wteh-surface-3);
  border-radius: 50%;
  display: flex;
  font-size: 27px;
  height: 56px;
  justify-content: center;
  margin-bottom: 8px;
  width: 56px;
}

.wteh-badge-card.is-earned {
  background: color-mix(in srgb, #f6b817 8%, var(--wteh-surface));
  border-color: color-mix(in srgb, #f6b817 34%, var(--wteh-border));
  box-shadow: inset 0 1px rgba(255, 255, 255, .38);
}

.wteh-badge-card.is-earned > div {
  background: color-mix(in srgb, #f6b817 18%, var(--wteh-surface));
}

.wteh-badge-card.is-locked {
  opacity: .7;
}

.wteh-badge-card.is-locked > div {
  filter: grayscale(1);
  font-size: 20px;
}

.wteh-badge-card strong {
  color: var(--wteh-text);
  font-size: 13px;
}

.wteh-badge-card p {
  color: var(--wteh-text-3);
  font-size: 10px;
  line-height: 1.7;
  margin: 3px 0 7px;
}

.wteh-badge-card small {
  color: var(--wteh-text-3);
  font-size: 9px;
  margin-top: auto;
}

.wteh-club-columns,
.wteh-club-staff-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
}

.wteh-club-staff-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
}

.wteh-leaderboard {
  display: grid;
  gap: 8px;
}

.wteh-leaderboard-row {
  align-items: center;
  background: var(--wteh-surface-2);
  border: 1px solid transparent;
  border-radius: 13px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 39px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 8px 11px;
  position: relative;
}

.wteh-leaderboard-row.is-podium {
  background: color-mix(in srgb, #f6b817 6%, var(--wteh-surface-2));
}

.wteh-leaderboard-row.is-self {
  background: color-mix(in srgb, var(--wteh-accent) 8%, var(--wteh-surface));
  border-color: color-mix(in srgb, var(--wteh-accent) 28%, var(--wteh-border));
}

.wteh-leaderboard-gap {
  color: var(--wteh-text-3);
  font-size: 18px;
  position: absolute;
  right: 10px;
  top: -17px;
}

.wteh-leaderboard-rank {
  color: var(--wteh-text-2);
  font-size: 14px;
  text-align: center;
}

.wteh-leaderboard-row.is-podium .wteh-leaderboard-rank {
  font-size: 20px;
}

.wteh-leaderboard-avatar {
  align-items: center;
  background: color-mix(in srgb, var(--wteh-accent) 12%, var(--wteh-surface));
  border: 1px solid color-mix(in srgb, var(--wteh-accent) 20%, var(--wteh-border));
  border-radius: 12px;
  color: var(--wteh-accent-readable);
  display: flex;
  font-size: 14px;
  font-weight: 900;
  height: 39px;
  justify-content: center;
  width: 39px;
}

.wteh-leaderboard-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wteh-leaderboard-name strong {
  color: var(--wteh-text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wteh-leaderboard-name small {
  color: var(--wteh-text-3);
  font-size: 9px;
}

.wteh-leaderboard-points {
  color: var(--wteh-accent-readable);
  font-size: 12px;
  white-space: nowrap;
}

.wteh-points-feed {
  display: grid;
}

.wteh-points-feed > div {
  align-items: flex-start;
  border-bottom: 1px solid var(--wteh-border);
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 10px 0;
}

.wteh-points-feed > div:last-child {
  border-bottom: 0;
}

.wteh-points-feed-icon {
  align-items: center;
  background: var(--wteh-surface-2);
  border-radius: 11px;
  display: flex;
  font-size: 17px;
  height: 38px;
  justify-content: center;
}

.wteh-points-feed > div > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wteh-points-feed strong {
  color: var(--wteh-text);
  font-size: 12px;
}

.wteh-points-feed small,
.wteh-points-feed time {
  color: var(--wteh-text-3);
  font-size: 9px;
  line-height: 1.65;
}

.wteh-points-feed b {
  color: #059669;
  font-size: 12px;
  white-space: nowrap;
}

.wteh-club-fair-play {
  align-items: flex-start;
  background: color-mix(in srgb, #14b8a6 7%, var(--wteh-surface));
  border: 1px solid color-mix(in srgb, #14b8a6 25%, var(--wteh-border));
  border-radius: 17px;
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  padding: 15px 17px;
}

.wteh-club-fair-play > i {
  align-items: center;
  background: color-mix(in srgb, #14b8a6 14%, var(--wteh-surface));
  border-radius: 11px;
  display: flex;
  flex: 0 0 39px;
  font-style: normal;
  height: 39px;
  justify-content: center;
}

.wteh-club-fair-play strong {
  color: var(--wteh-text);
}

.wteh-club-fair-play p {
  color: var(--wteh-text-3);
  font-size: 11px;
  margin: 1px 0 0;
}

.wteh-kudos-card .wteh-form {
  display: grid;
  gap: 13px;
}

.wteh-kudos-card .wteh-field {
  margin: 0;
}

.wteh-kudos-card textarea {
  resize: vertical;
}

.wteh-kudos-limit {
  color: var(--wteh-text-3);
  display: block;
  font-size: 10px;
  line-height: 1.7;
}

.wteh-theme-dark .wteh-club-hero {
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, .12), transparent 30%),
    linear-gradient(125deg, color-mix(in srgb, var(--wteh-accent) 58%, #141a35), #182642);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
}

.wteh-theme-dark .wteh-club-level-ring::before {
  background: color-mix(in srgb, var(--wteh-accent) 34%, #172136);
}

.wteh-theme-dark .wteh-points-feed b {
  color: #71ddb8;
}

@media (max-width: 1180px) {
  .wteh-club-hero {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .wteh-club-quick-stats {
    grid-column: 1 / -1;
  }

  .wteh-badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wteh-club-staff-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .wteh-club-columns {
    grid-template-columns: 1fr;
  }

  .wteh-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wteh-club-page-title {
    align-items: flex-start;
  }

  .wteh-club-hero {
    gap: 18px;
    grid-template-columns: 1fr;
    padding: 20px;
    text-align: center;
  }

  .wteh-club-level-ring {
    justify-self: center;
    width: 138px;
  }

  .wteh-club-hero-copy {
    text-align: right;
  }

  .wteh-club-section {
    border-radius: 17px;
    padding: 16px;
  }

  .wteh-mission-grid {
    grid-template-columns: 1fr;
  }

  .wteh-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wteh-badge-card {
    min-height: 164px;
    padding: 13px 9px;
  }

  .wteh-leaderboard-row {
    gap: 7px;
    grid-template-columns: 29px 35px minmax(0, 1fr) auto;
    padding-inline: 8px;
  }

  .wteh-leaderboard-avatar {
    border-radius: 10px;
    height: 35px;
    width: 35px;
  }

  .wteh-leaderboard-points {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wteh-mission-card {
    transition: none;
  }
}
