/* Public registration (Account/Register): the perks panel beside the form, the
   "What brings you here?" cards and the folded optional extras. Manage Users >
   Create User uses the same view without these. */

.join-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
}

.join-perks {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.25rem;
  border-radius: 1.25rem 0 0 1.25rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(227, 193, 92, 0.35), transparent 40%),
    radial-gradient(circle at 10% 95%, rgba(59, 130, 246, 0.35), transparent 45%),
    linear-gradient(160deg, var(--bb-sage-900), var(--bb-sage-700) 60%, var(--bb-blue-700));
  overflow: hidden;
}

.join-perks-eyebrow {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--bb-gold-400);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.join-perks h2 {
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.join-perks > p {
  color: rgba(255, 255, 255, 0.85);
}

.join-perk-list {
  display: grid;
  gap: 0.9rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.join-perk-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.join-perk-list li:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.join-perk-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1.3rem;
}

.join-perk-list strong {
  display: block;
  color: #fff;
}

.join-perk-list span:not(.join-perk-icon) {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* A little shelf of books along the bottom of the panel. */
.join-perks-books {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: auto;
  height: 64px;
  padding-bottom: 6px;
  border-bottom: 4px solid rgba(255, 255, 255, 0.35);
}

.join-perks-books span {
  width: 18px;
  border-radius: 3px 3px 0 0;
  background: var(--bb-gold-400);
}

.join-perks-books span:nth-child(1) { height: 48px; }
.join-perks-books span:nth-child(2) { height: 58px; width: 22px; background: #f472b6; }
.join-perks-books span:nth-child(3) { height: 40px; background: #60a5fa; }
.join-perks-books span:nth-child(4) { height: 54px; width: 14px; background: #a7f3d0; }
.join-perks-books span:nth-child(5) { height: 44px; transform: rotate(12deg); transform-origin: bottom left; background: #fde68a; }

.join-card {
  max-width: none;
  border-top: 0;
  border-radius: 0 1.25rem 1.25rem 0;
}

.join-card .auth-card-header h1 {
  font-size: 1.65rem;
}

.join-twin-banner {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #312e81, #db2777);
  color: #fff;
  font-size: 0.92rem;
}

.join-twin-banner > span {
  font-size: 1.5rem;
}

.join-types {
  margin: 0;
  padding: 0;
  border: 0;
}

.join-types legend {
  float: none;
  width: auto;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.join-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.join-type {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
  border: 2px solid var(--bb-sage-200);
  border-radius: 1rem;
  background: var(--bb-sage-50);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.join-type:hover {
  border-color: var(--bb-sage-500);
  transform: translateY(-2px);
}

.join-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.join-type:has(input:focus-visible) {
  outline: 3px solid var(--bb-blue-500);
  outline-offset: 2px;
}

.join-type:has(input:checked) {
  border-color: var(--bb-gold-500);
  background: var(--bb-gold-100);
}

.join-type:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bb-gold-500);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.join-type-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.join-type-title {
  margin-top: 0.35rem;
  color: var(--bb-sage-900);
  font-weight: 800;
}

.join-type-text {
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.4;
}

.join-type-tag {
  align-self: flex-start;
  margin-top: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
  font-size: 0.7rem;
  font-weight: 700;
}

.join-optional {
  border: 1px solid var(--bb-sage-200);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: #fff;
}

.join-optional summary {
  color: var(--bb-sage-900);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.join-optional summary::-webkit-details-marker {
  display: none;
}

.join-optional summary::after {
  content: "+";
  float: right;
  color: var(--bb-sage-600);
  font-weight: 800;
}

.join-optional[open] summary::after {
  content: "−";
}

.join-submit {
  font-weight: 800;
}

.join-small-print {
  margin: 0.6rem 0 0;
  color: #6b7280;
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .join-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .join-perks {
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 1.75rem 1.5rem;
  }

  .join-perk-list {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0;
  }

  .join-perks-books {
    display: none;
  }

  .join-card {
    border-radius: 0 0 1.25rem 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .join-perk-list,
  .join-type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .join-perk-list li span:not(.join-perk-icon) {
    display: none;
  }

  .join-perk-list li {
    align-items: center;
    padding: 0.5rem 0.7rem;
  }

  .join-card {
    padding: 1.5rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .join-perk-list li,
  .join-type {
    transition: none;
  }
}
