/* KAN-748 — Beta-enrollment modal.
 * Self-contained styles so the modal works on any page that includes
 * /js/betaModal.js, including pages with their own design system (the
 * marketing site, public profile, public rating, register, invite, etc.).
 * Uses literal colors rather than CSS variables for that reason.
 */
.bm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}
.bm-overlay.bm-open { display: flex; }
.bm-modal {
    background: #ffffff;
    color: #1F2937;
    border-radius: 14px;
    max-width: 440px;
    width: 100%;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.bm-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    padding: 4px 8px;
}
.bm-close:hover { color: #1F2937; }
.bm-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #16A34A;
}
.bm-lede {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
}
.bm-field { display: block; margin: 0 0 12px; }
.bm-field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}
.bm-field-label .bm-optional {
    color: #9CA3AF;
    font-weight: 500;
    font-size: 0.75rem;
}
.bm-input, .bm-select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    color: #1F2937;
    background: #ffffff;
    font-family: inherit;
}
.bm-input:focus, .bm-select:focus {
    outline: none;
    border-color: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.bm-submit {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #16A34A, #15803D);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}
.bm-submit:disabled { opacity: 0.7; cursor: progress; }
.bm-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
}
.bm-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 0 0;
    font-size: 0.9rem;
}
.bm-fine {
    margin: 14px 0 0;
    font-size: 0.78rem;
    color: #9CA3AF;
    line-height: 1.5;
}
.bm-overlay [hidden] { display: none !important; }

/* KAN-763 — two-step group-join flow (replaces the email form). */
.bm-account-note {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 18px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.bm-step {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 12px;
}
.bm-step2 {
    border-color: #A7F3D0;
    background: #F0FDF4;
}
.bm-step-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.98rem;
    color: #1F2937;
    margin: 0 0 10px;
}
.bm-step-head--next::before {
    content: '\25B8'; /* ▸ subtle "next step" chevron */
    color: #16A34A;
    font-weight: 700;
    margin-right: 2px;
}
.bm-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #16A34A;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    flex: 0 0 auto;
}
.bm-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}
.bm-btn-primary {
    /* Darker gradient than the brand #16A34A so white text clears WCAG AA
       (white on #16A34A is only ~2.5:1; on #15803D→#166534 it's 5:1–7:1). */
    background: linear-gradient(135deg, #15803D, #166534);
    /* !important defeats host-page anchor color rules — these buttons are <a>
       elements and some surfaces (e.g. register.html) colour links brand-green,
       which rendered the label green-on-green. */
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}
.bm-btn-ghost {
    background: #ffffff;
    border: 1px solid #16A34A;
    color: #15803D !important;
    margin-top: 10px;
}
.bm-step1-confirm { margin-top: 12px; }
.bm-confirm-msg {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
}
