/* ==========================================================================
   JOIN PAGE STYLES
   Extracted from views/join.ejs — dedicated stylesheet for the join/signup page
   ========================================================================== */

:root {
    --join-primary: #3713ec;
    --join-primary-hover: #2a0ed4;
    --join-primary-light: rgba(55, 19, 236, 0.08);
    --join-accent: #ccff00;
    --join-navy: #1a1a2e;
    --join-navy-light: #24243e;
}

body:has(.join-wrapper) {
    background: #f5f5fa;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
}

/* ===================== SPLIT LAYOUT ===================== */

.join-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- LEFT: Branding Panel --- */

.join-brand-panel {
    flex: 0 0 46%;
    background: linear-gradient(160deg, var(--join-navy) 0%, #0d0d1a 60%, #100e2e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.join-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(55, 19, 236, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.join-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 255, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.join-brand-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
}

.join-brand-logo {
    margin-bottom: 2.5rem;
}

.join-brand-logo img {
    height: 38px;
    filter: brightness(0) invert(1);
}

.join-brand-headline {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary-dark);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.join-brand-headline span {
    color: var(--join-accent);
}

.join-brand-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.25rem;
}

.join-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}

.join-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

.join-features li .feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(55, 19, 236, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.join-features li .feature-icon .material-symbols-outlined {
    font-size: 20px;
    color: var(--join-accent);
}

.join-brand-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--join-primary), var(--join-accent));
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.join-brand-quote {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    font-style: italic;
}

/* --- RIGHT: Form Panel --- */

.join-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    background: #f5f5fa;
    position: relative;
}

.join-form-panel-inner {
    width: 100%;
    max-width: 440px;
}

/* Mobile logo — hidden on desktop */
.join-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 1.5rem;
}

.join-mobile-logo img {
    height: 32px;
}

.join-card {
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    padding: 2.25rem 2rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.join-card h2 {
    text-align: center;
    font-weight: 700;
    color: var(--join-navy);
    margin-bottom: 0.25rem;
    font-size: 1.375rem;
}

.join-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.join-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.join-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--join-navy);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 1rem;
}

.join-input:focus {
    border-color: var(--join-primary);
    box-shadow: 0 0 0 3px var(--join-primary-light);
}

.join-input[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.join-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--join-primary);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.join-btn:hover {
    background: var(--join-primary-hover);
    transform: scale(1.01);
}

.join-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.join-footer a {
    color: var(--join-primary);
    text-decoration: none;
    font-weight: 600;
}

.join-footer a:hover {
    text-decoration: underline;
}

/* OAuth divider */
.join-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.join-auth-divider::before,
.join-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.join-auth-divider span {
    color: #9ca3af;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* OAuth buttons (join page) */
.join-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
    border: none;
}

.join-oauth-btn:hover {
    transform: scale(1.01);
    text-decoration: none;
}

.join-oauth-btn svg {
    flex-shrink: 0;
}

.join-oauth-btn-google {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    color: #3c4043;
    margin-bottom: 0.75rem;
}

.join-oauth-btn-google:hover {
    background: #f3f4f6;
}

.join-oauth-btn-facebook {
    background: #1877F2;
    color: var(--text-primary-dark);
    border: 2px solid #1877F2;
}

.join-oauth-btn-facebook:hover {
    background: #166fe5;
}

/* --- Error State --- */

.join-error-state {
    text-align: center;
    padding: 1.5rem 0;
}

.join-error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.join-error-icon .material-symbols-outlined {
    font-size: 2rem;
    color: #f59e0b;
}

.join-error-title {
    font-weight: 700;
    color: var(--join-navy);
    margin-bottom: 0.5rem;
}

.join-error-msg {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.join-progress-container {
    text-align: center;
    padding: 0.75rem 1.5rem;
    color: var(--join-primary);
    font-weight: 600;
    font-size: 0.9375rem;
}

.join-progress-container.hidden {
    display: none;
}

.join-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #991b1b;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

/* --- Team badge on form --- */

.join-team-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--join-primary-light);
    border: 1px solid rgba(55, 19, 236, 0.15);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    margin: 0 auto 1.25rem;
    width: fit-content;
}

.join-team-badge .material-symbols-outlined {
    font-size: 18px;
    color: var(--join-primary);
}

.join-team-badge span:last-child {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--join-primary);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 991px) {
    .join-brand-panel {
        flex: 0 0 42%;
        padding: 2.5rem 2rem;
    }

    .join-brand-headline {
        font-size: 1.625rem;
    }
}

@media (max-width: 767px) {
    .join-wrapper {
        flex-direction: column;
    }

    .join-brand-panel {
        display: none;
    }

    .join-mobile-logo {
        display: block;
    }

    .join-form-panel {
        padding: 1.5rem 1rem;
        min-height: 100vh;
        background: linear-gradient(165deg, #f5f5fa 0%, #ede8f5 100%);
    }

    .join-mobile-welcome {
        display: block;
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .join-mobile-welcome h3 {
        font-size: 1.125rem;
        font-weight: 700;
        color: var(--join-navy);
        margin-bottom: 0.25rem;
    }

    .join-mobile-welcome p {
        font-size: 0.8125rem;
        color: #6b7280;
    }
}

@media (min-width: 768px) {
    .join-mobile-welcome {
        display: none;
    }
}

/* ===================== INLINE STYLE REPLACEMENTS ===================== */

.join-terms-wrapper { margin-bottom: 1rem; }
.join-terms-checkbox { margin-right: 0.375rem; }
.join-terms-label { font-size: 0.8125rem; color: #374151; }
.join-terms-link { color: var(--join-primary); text-decoration: none; font-weight: 600; }
.join-warning-icon { font-size: 2rem; }
.join-code-input-styled { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.join-code-enter-btn { display: inline-block; text-align: center; text-decoration: none; max-width: 200px; margin: 0 auto; }
