/* ─────────────────────────────────────────────
   Critter Quest — Firebase Join Screen Styles
   Add these to the BOTTOM of your style.css
   ───────────────────────────────────────────── */

/* ── Join / Create page ── */
.join-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.25rem 3rem;
  min-height: 100vh;
  gap: 0;
}

.join-tagline {
  font-size: 1.1rem;
  color: #64748b;
  margin: -0.5rem 0 1.5rem;
  text-align: center;
}

.join-error {
  background: #FEE2E2;
  color: #B91C1C;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 380px;
}

.join-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.75rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.join-card.secondary {
  background: #F8FAFC;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.join-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #1e293b;
}

.join-card-sub {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 700;
  margin: -0.25rem 0 0.25rem;
}

.join-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2.5px solid #E2E8F0;
  border-radius: 14px;
  font-size: 1.4rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: #1e293b;
  background: #F8FAFC;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.join-input:focus {
  border-color: var(--accent, #F97316);
  background: white;
}

.join-divider {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 380px;
  gap: 0.75rem;
  margin: 0.5rem 0;
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.9rem;
}

.join-divider::before,
.join-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
}

.join-footer {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
  margin-top: 1rem;
  font-weight: 700;
}

/* ── Outline button variant ── */
.primary-btn.outline {
  background: white;
  color: var(--accent, #F97316);
  border: 2.5px solid var(--accent, #F97316);
}

.primary-btn.outline:hover {
  background: var(--accent-light, #FFEDD5);
}

/* ── Code reveal box ── */
.code-reveal-box {
  background: white;
  border-radius: 20px;
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  width: 100%;
  max-width: 340px;
}

.code-reveal-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code-reveal-code {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 0.05em;
  background: #F1F5F9;
  padding: 0.6rem 1.5rem;
  border-radius: 14px;
  width: 100%;
}

.copy-btn {
  background: #F1F5F9;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s;
}

.copy-btn:hover { background: #E2E8F0; }

.code-reveal-info {
  background: #FFFBEB;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-reveal-info p {
  font-size: 0.9rem;
  font-weight: 700;
  color: #92400e;
  margin: 0;
  line-height: 1.4;
}

/* ── Loading spinner ── */
.join-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  color: #64748b;
  font-weight: 800;
  font-size: 1rem;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #E2E8F0;
  border-top-color: var(--accent, #F97316);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Join screen: colorful background ── */
#screen-join {
  background: linear-gradient(160deg, #FFF7ED 0%, #ECFDF5 50%, #EFF6FF 100%);
  min-height: 100vh;
}

/* ── Bigger, bolder logo on join page ── */
.join-page .logo-big {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 0;
}

/* ── Bouncing mascot row ── */
.join-mascot {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: mascot-bounce 2.5s ease-in-out infinite;
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Pill-shaped, centered buttons on join page ── */
.join-page .primary-btn.big {
  width: auto;
  min-width: 220px;
  border-radius: 999px;
  align-self: center;
}

/* ── Primary card: green accent border ── */
.join-card:not(.secondary) {
  border: 2.5px solid #22C55E;
}

/* ── Secondary card: slightly muted bg ── */
.join-card.secondary {
  background: #F1F5F9;
}

/* ── Family picker list ── */
.family-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 380px;
}

.family-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color 0.15s;
}

.family-item:hover {
  border-color: #22C55E;
}

.family-item-main {
  flex: 1;
  background: none;
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: 'Nunito', sans-serif;
}

.family-item-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1e293b;
}

.family-item-code {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.family-item-actions {
  display: flex;
  gap: 0;
  border-left: 2px solid #F1F5F9;
}

.family-action-btn {
  background: none;
  border: none;
  padding: 0 0.9rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: #94a3b8;
  height: 100%;
  min-height: 56px;
  transition: background 0.15s, color 0.15s;
  font-family: 'Nunito', sans-serif;
}

.family-action-btn:hover {
  background: #F8FAFC;
  color: #475569;
}
