/* Join CRC — membership journey */

.join-journey {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.join-panel {
    display: none;
    animation: joinFadeIn 0.45s ease;
}

.join-panel-active,
.join-panel.join-panel-success {
    display: block;
}

@keyframes joinFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.join-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 2rem;
}

.join-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a227;
    margin: 0 0 0.35rem;
}

.join-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f5e6a8;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.join-title-sm {
    font-size: 1.45rem;
}

.join-lead {
    color: rgba(248, 249, 250, 0.72);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.55;
}

/* Progress ring */
.join-progress-ring {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

.join-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.join-ring-bg {
    fill: none;
    stroke: rgba(212, 175, 55, 0.15);
    stroke-width: 8;
}

.join-ring-fill {
    fill: none;
    stroke: #d4af37;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 0.4s ease;
}

.join-progress-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #d4af37;
}

/* Blocks */
.join-block {
    background: linear-gradient(145deg, rgba(30, 37, 41, 0.95), rgba(22, 28, 32, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.join-block-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffd54a;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.join-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.join-type-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #f8f9fa;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.join-type-pill:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
}

.join-type-pill.join-type-selected {
    background: linear-gradient(135deg, #b8922a, #d4af37);
    color: #1a1a1a;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

/* Fields */
.join-field {
    margin-bottom: 1rem;
}

.join-field:last-child {
    margin-bottom: 0;
}

.join-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #f5e6a8;
    margin-bottom: 0.35rem;
}

.join-required {
    color: #ffd54a;
    font-weight: 500;
    font-size: 0.75rem;
}

.join-optional {
    color: rgba(248, 249, 250, 0.45);
    font-weight: 400;
    font-size: 0.75rem;
}

.join-field input,
.join-field textarea {
    width: 100%;
    background: #1e2529;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    color: #f8f9fa;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.join-field input:focus,
.join-field textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.join-input-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.join-input-wrap input {
    flex: 1;
}

.join-otp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.65rem;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    border: 1px solid transparent;
    min-width: 5.5rem;
    justify-content: center;
}

.join-otp-idle {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(248, 249, 250, 0.45);
    border-color: rgba(255, 255, 255, 0.08);
}

.join-otp-sent {
    background: rgba(46, 125, 154, 0.2);
    color: #7ec8e3;
    border-color: rgba(46, 125, 154, 0.4);
}

.join-otp-sent .join-otp-text::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #7ec8e3;
    border-radius: 50%;
    margin-left: 4px;
    animation: joinPulse 1.5s infinite;
}

@keyframes joinPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.join-otp-error {
    background: rgba(220, 53, 69, 0.15);
    color: #f5a5ad;
    border-color: rgba(220, 53, 69, 0.35);
}

/* Actions */
.join-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.join-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #b8922a, #d4af37);
    color: #1a1a1a;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.35);
}

.join-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(212, 175, 55, 0.45);
}

.join-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.join-btn-outline {
    text-decoration: none;
    margin-top: 1rem;
    background: transparent;
    color: #d4af37;
    border: 2px solid #d4af37;
    box-shadow: none;
}

.join-hint {
    font-size: 0.78rem;
    color: rgba(248, 249, 250, 0.45);
    margin: 0.75rem 0 0;
}

.join-error {
    color: #f5a5ad;
    font-size: 0.88rem;
    margin: 0.75rem 0 0;
}

/* Verify step */
.join-verify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.join-back-btn {
    background: none;
    border: none;
    color: rgba(248, 249, 250, 0.65);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.join-back-btn:hover {
    color: #d4af37;
}

.join-ref-badge {
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.join-verify-target {
    font-size: 0.85rem;
    color: rgba(248, 249, 250, 0.55);
    margin: -0.5rem 0 0.75rem;
}

.join-otp-boxes {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.join-otp-digit {
    width: 2.75rem;
    height: 3.25rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    background: #1e2529;
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    color: #f8f9fa;
}

.join-otp-digit:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Success */
.join-panel-success {
    text-align: center;
    padding: 2rem 0;
}

.join-success-icon {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 24px rgba(76, 175, 80, 0.4));
}

.join-ref-large {
    font-family: ui-monospace, monospace;
    font-size: 1.25rem;
    color: #d4af37;
    font-weight: 700;
    margin: 1rem 0 1.5rem;
}

@media (max-width: 576px) {
    .join-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .join-progress-ring {
        margin: 0 auto;
    }

    .join-input-wrap {
        flex-direction: column;
    }

    .join-otp-chip {
        justify-content: flex-start;
    }

    .join-otp-digit {
        width: 2.35rem;
        height: 2.85rem;
        font-size: 1.15rem;
    }
}
