/* registration-wizard.css v21 — gotra toggle directly after label (no far gap) */

/* ── Shell — uses site :root theme (Poppins / --primary / --dark from aiz-core + layout) ─ */
.rw-shell.rw-shell--atrium {
    --rw-font-display: inherit;
    --rw-font-ui: inherit;
    --rw-primary: var(--primary);
    --rw-primary-soft: var(--soft-primary);
    --rw-primary-deep: var(--hov-primary, var(--primary));
    --rw-bg: var(--white);
    --rw-bg-subtle: var(--light);
    --rw-border: rgba(17, 23, 35, 0.1);
    --rw-text: var(--dark);
    --rw-text-muted: var(--gray);
    --rw-plum: var(--dark);
    --rw-gold: var(--secondary);
    --rw-radius: 16px;
    --rw-radius-sm: 8px;
    --rw-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --rw-step-size: 46px;
    --rw-step-size-sm: 38px;

    font-family: inherit;
    color: var(--rw-text);
    padding: 2.5rem 0 3rem;
    min-height: 60vh;
    background-color: var(--light);
    background-image: none;
}

.rw-shell.rw-shell--atrium .rw-title,
.rw-shell.rw-shell--atrium .rw-step-label {
    font-family: inherit;
}

/* ── Card ──────────────────────────────────────────── */
.rw-card--atrium {
    position: relative;
    background: var(--rw-bg);
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius);
    box-shadow: 0 4px 24px rgba(17, 23, 35, 0.08);
    overflow: visible;
}

.rw-card-header {
    padding: 1.85rem 1.75rem 0.85rem;
}

.rw-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--rw-text);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.rw-subtitle {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--rw-text-muted);
    margin-bottom: 0;
    min-height: 1.35em;
    transition: opacity var(--rw-transition);
    letter-spacing: 0.01em;
}

/* Resume session */
.rw-card-header--resuming {
    padding-bottom: 0.5rem;
}

.rw-resume-heading {
    margin-bottom: 0.4rem;
}

.rw-resume-heading__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--rw-primary-soft), rgba(255, 255, 255, 0.5));
    color: var(--rw-primary);
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(17, 23, 35, 0.1);
    animation: rwResumePulse 1.6s ease-in-out infinite;
}

@keyframes rwResumePulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.88;
        transform: scale(0.97);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-resume-heading__icon {
        animation: none;
    }
}

.rw-card-header--resuming .rw-title {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rw-subtitle--resume-placeholder:empty {
    display: none;
    min-height: 0;
    margin: 0;
}

.rw-card-body {
    padding: 2.75rem 1.75rem 1.75rem;
}

/* ── Step Indicator (Desktop) ──────────────────────── */
.rw-steps-bar {
    padding: 0.85rem 1.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

.rw-steps-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 560px;
}

.rw-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: default;
    position: relative;
}

.rw-step-circle {
    width: var(--rw-step-size);
    height: var(--rw-step-size);
    border-radius: 50%;
    border: 2px solid var(--rw-border);
    background: linear-gradient(160deg, var(--white) 0%, var(--light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--rw-transition), box-shadow var(--rw-transition), transform var(--rw-transition), background var(--rw-transition);
    position: relative;
}

.rw-step-icon {
    font-size: 1.2rem;
    color: var(--rw-text-muted);
    transition: color var(--rw-transition), transform var(--rw-transition);
}

.rw-step-check {
    display: none;
    font-size: 1.1rem;
    color: #fff;
}

.rw-step-label {
    font-size: 0.62rem;
    color: var(--rw-text-muted);
    margin-top: 0.4rem;
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color var(--rw-transition);
}

.rw-step-line {
    flex: 1;
    height: 2px;
    background: var(--rw-border);
    margin: 0 0.3rem;
    margin-top: calc(var(--rw-step-size) / 2);
    min-width: 22px;
    transition: background var(--rw-transition), height var(--rw-transition);
}

/* Active step */
.rw-step-item.active .rw-step-circle {
    border-color: var(--rw-primary);
    background: linear-gradient(145deg, var(--white) 0%, var(--rw-primary-soft) 100%);
    box-shadow:
        0 0 0 4px var(--soft-primary),
        0 8px 20px -8px var(--soft-primary);
    transform: translateY(-1px);
}

.rw-step-item.active .rw-step-icon {
    color: var(--rw-primary);
}

.rw-step-item.active .rw-step-label {
    color: var(--rw-primary);
    font-weight: 700;
}

/* Completed step */
.rw-step-item.completed .rw-step-circle {
    border-color: var(--rw-primary);
    background: linear-gradient(145deg, var(--rw-primary) 0%, var(--rw-primary-deep) 100%);
    box-shadow: 0 6px 16px -6px var(--soft-primary);
}

.rw-step-item.completed .rw-step-icon {
    display: none;
}

.rw-step-item.completed .rw-step-check {
    display: block;
}

.rw-step-item.completed .rw-step-label {
    color: var(--rw-primary);
}

.rw-step-item.completed + .rw-step-line {
    background: linear-gradient(90deg, var(--rw-primary), var(--soft-primary));
    height: 3px;
}

/* ── Mobile Step Dots ──────────────────────────────── */
.rw-mobile-steps {
    display: none;
    text-align: center;
    padding: 0.85rem 1.5rem 0;
}

.rw-mobile-step-label {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rw-text-muted);
    display: block;
    margin-bottom: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rw-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--rw-border);
    transition: transform var(--rw-transition), background var(--rw-transition), box-shadow var(--rw-transition);
}

.rw-dot.active {
    background: var(--rw-primary);
    transform: scale(1.35);
    box-shadow: 0 0 0 3px var(--soft-primary);
}

.rw-dot.completed {
    background: var(--rw-primary);
    opacity: 0.55;
}

/* ── Step Panels ───────────────────────────────────── */
.rw-step-panel {
    animation: rwFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rwFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Navigation Bar ────────────────────────────────── */
.rw-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    margin-top: 0.65rem;
    border-top: 1px solid var(--rw-border);
}

.rw-nav-spacer {
    flex: 1;
}

.rw-nav-bar .prev-btn,
.rw-nav-bar .next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.6rem 1.65rem;
    min-height: 44px;
    box-sizing: border-box;
    transition: transform var(--rw-transition), box-shadow var(--rw-transition), background var(--rw-transition), border-color var(--rw-transition);
}

.rw-nav-bar .next-btn {
    min-width: 148px;
}

/* Beat .btn-primary shell styles — Next is the primary ritual action */
.rw-shell.rw-shell--atrium .rw-nav-bar .next-btn.btn-primary {
    background: linear-gradient(135deg, var(--rw-primary) 0%, var(--rw-primary-deep) 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 20px -4px var(--soft-primary);
}

.rw-shell.rw-shell--atrium .rw-nav-bar .next-btn.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -6px var(--soft-primary);
    filter: brightness(1.03);
}

.rw-nav-bar .next-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.rw-nav-bar .prev-btn {
    border: 1px solid var(--rw-border);
    background: rgba(255, 255, 255, 0.7);
    color: var(--rw-text);
}

.rw-nav-bar .prev-btn:hover:not(:disabled) {
    border-color: var(--soft-primary);
    color: var(--rw-primary);
}

.rw-nav-bar--center-next {
    justify-content: center;
}

.rw-nav-bar--center-next .rw-nav-spacer {
    display: none;
}

/* ── Step 1 terms & privacy ──────────────────────── */
.rw-shell.rw-shell--atrium .rw-terms-agreement {
    background: linear-gradient(135deg, var(--rw-bg-subtle) 0%, var(--white) 100%);
    border: 1px solid var(--rw-border) !important;
    border-radius: var(--rw-radius-sm);
}

.rw-shell.rw-shell--atrium .rw-terms-agreement__text {
    line-height: 1.6;
    display: inline-block;
    max-width: 100%;
}

/* ── Form Styling ──────────────────────────────────── */
.rw-shell.rw-shell--atrium .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rw-text);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.rw-shell.rw-shell--atrium .form-control {
    border-radius: var(--rw-radius-sm);
    border-color: var(--rw-border);
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.85);
    transition: border-color var(--rw-transition), box-shadow var(--rw-transition), background var(--rw-transition);
}

.rw-shell.rw-shell--atrium .form-control:focus {
    border-color: var(--rw-primary);
    box-shadow: 0 0 0 3px var(--soft-primary);
    background: var(--white);
}

.rw-shell.rw-shell--atrium .form-control.is-invalid {
    border-color: #dc3545 !important;
}

.rw-shell.rw-shell--atrium .form-text {
    font-size: 0.78rem;
}

.rw-shell.rw-shell--atrium .bootstrap-select .dropdown-toggle {
    border-radius: var(--rw-radius-sm) !important;
    border-color: var(--rw-border) !important;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.85) !important;
}

.rw-shell.rw-shell--atrium .bootstrap-select .dropdown-toggle:focus {
    border-color: var(--rw-primary) !important;
    box-shadow: 0 0 0 3px var(--soft-primary) !important;
}

.rw-shell.rw-shell--atrium .btn-primary {
    background: linear-gradient(135deg, var(--rw-primary) 0%, var(--rw-primary-deep) 100%);
    border: none;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 6px 18px -4px var(--soft-primary);
}

.rw-shell.rw-shell--atrium .btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 22px -4px var(--soft-primary);
}

.rw-shell.rw-shell--atrium .btn-outline-primary {
    color: var(--rw-primary);
    border-color: var(--rw-primary);
    border-radius: 999px;
    font-weight: 600;
}

.rw-shell.rw-shell--atrium .btn-outline-primary:hover {
    background: var(--rw-primary);
    color: #fff;
    border-color: var(--rw-primary);
}

.rw-shell.rw-shell--atrium .btn-outline-secondary {
    border-radius: 999px;
    font-weight: 600;
}

.rw-shell.rw-shell--atrium .btn-success {
    background: linear-gradient(135deg, #12b981 0%, #0d8f65 100%);
    border: none;
    border-radius: 999px;
}

.rw-shell.rw-shell--atrium .btn-success:hover {
    filter: brightness(1.06);
}

.rw-shell.rw-shell--atrium .text-primary {
    color: var(--rw-primary) !important;
}

/* ── Login Link ────────────────────────────────────── */
.rw-login-link {
    color: var(--rw-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--rw-transition), color var(--rw-transition);
}

.rw-login-link:hover {
    border-bottom-color: var(--soft-primary);
    text-decoration: none;
}

/* ── Agreement Box ─────────────────────────────────── */
.rw-shell.rw-shell--atrium .agreement-box {
    background: var(--rw-bg-subtle);
    border-color: var(--rw-border) !important;
}

/* ── Section Borders in Partials ───────────────────── */
.rw-shell.rw-shell--atrium .border {
    border-color: var(--rw-border) !important;
    border-radius: var(--rw-radius-sm);
}

.rw-shell.rw-shell--atrium .border h5 {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rw-text);
    letter-spacing: -0.01em;
}

/* ── Sibling Cards ─────────────────────────────────── */
.rw-shell.rw-shell--atrium .back-secondary {
    background: linear-gradient(160deg, var(--white) 0%, var(--rw-bg-subtle) 100%);
    border: 1px solid var(--rw-border);
    border-radius: var(--rw-radius-sm);
}

.rw-shell.rw-shell--atrium .back-secondary h6 {
    font-weight: 700;
    color: var(--rw-text);
    margin-bottom: 0.5rem;
    font-family: inherit;
}

/* ── Social Login — ritual “seals”, not flat icons ─── */
.rw-shell.rw-shell--atrium .separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--rw-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: inherit;
}

.rw-shell.rw-shell--atrium .separator::before,
.rw-shell.rw-shell--atrium .separator::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--rw-border);
}

.rw-shell.rw-shell--atrium .separator span {
    padding: 0 1rem;
}

.rw-shell.rw-shell--atrium .social.colored {
    gap: 0.5rem;
}

.rw-shell.rw-shell--atrium .social.colored li.list-inline-item {
    margin: 0 0.2rem;
}

.rw-shell.rw-shell--atrium .social.colored a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    font-size: 1.35rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--rw-border);
    color: var(--rw-text-muted);
    box-shadow: 0 4px 12px rgba(26, 21, 35, 0.06);
    transition: transform var(--rw-transition), box-shadow var(--rw-transition), border-color var(--rw-transition), color var(--rw-transition), background var(--rw-transition);
}

.rw-shell.rw-shell--atrium .social.colored a:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -8px rgba(17, 23, 35, 0.12);
    border-color: var(--soft-primary);
    color: var(--rw-primary);
    background: var(--white);
}

.rw-shell.rw-shell--atrium .social.colored a.google {
    color: #c5221f;
}

.rw-shell.rw-shell--atrium .social.colored a.google:hover {
    color: #a50e0b;
    border-color: rgba(197, 34, 31, 0.35);
}

.rw-shell.rw-shell--atrium .social.colored a.facebook {
    color: #1877f2;
}

.rw-shell.rw-shell--atrium .social.colored a.twitter {
    color: #1d9bf0;
}

.rw-shell.rw-shell--atrium .social.colored a.apple {
    color: var(--dark);
}

/* ── Separator chip (theme bg, not hardcoded white) ─── */
.rw-shell.rw-shell--atrium .separator .rw-separator-chip,
.rw-separator-chip {
    display: inline-block;
    padding: 0 1rem;
    background: var(--rw-bg, var(--white));
}

/* ── Social sign-up row (aligned with login pill row) ─ */
.rw-shell.rw-shell--atrium .rw-social-grid,
.rw-social-connect .rw-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rw-shell.rw-shell--atrium .rw-social-btn,
.rw-social-connect .rw-social-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rw-text, var(--dark));
    background: var(--rw-bg, var(--white));
    border: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
    border-radius: var(--rw-radius-sm, 8px);
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.rw-shell.rw-shell--atrium .rw-social-btn:hover,
.rw-social-connect .rw-social-btn:hover {
    border-color: var(--rw-primary, var(--primary));
    box-shadow: 0 4px 14px rgba(17, 23, 35, 0.08);
    transform: translateY(-1px);
    color: var(--rw-text, var(--dark));
    text-decoration: none;
}

.rw-shell.rw-shell--atrium .rw-social-btn:focus,
.rw-social-connect .rw-social-btn:focus {
    outline: none;
}

.rw-shell.rw-shell--atrium .rw-social-btn:focus-visible,
.rw-social-connect .rw-social-btn:focus-visible {
    outline: 2px solid var(--rw-primary, var(--primary));
    outline-offset: 2px;
}

.rw-shell.rw-shell--atrium .rw-social-btn__icon,
.rw-social-connect .rw-social-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rw-shell.rw-shell--atrium .rw-social-btn__icon svg,
.rw-social-connect .rw-social-btn__icon svg {
    display: block;
}

.rw-shell.rw-shell--atrium .rw-social-btn__icon .lab,
.rw-social-connect .rw-social-btn__icon .lab {
    font-size: 1.25rem;
    line-height: 1;
}

.rw-shell.rw-shell--atrium .rw-social-btn--google .rw-social-btn__icon,
.rw-social-connect .rw-social-btn--google .rw-social-btn__icon {
    width: 20px;
    height: 20px;
}

/* Step 1: social strip at top of form (scroll offset under fixed headers) */
.rw-social-connect--step1-top {
    scroll-margin-top: 4.5rem;
}

.rw-social-connect__hint {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
}

/* Centered hairline with feathered ends + faint bloom (reads softer than a hard 100% rule) */
.rw-social-connect__divider {
    display: block;
    width: min(19rem, 92%);
    height: 2px;
    margin: 0.35rem auto 1.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(17, 23, 35, 0) 0%,
        rgba(17, 23, 35, 0.035) 18%,
        rgba(17, 23, 35, 0.12) 48%,
        rgba(17, 23, 35, 0.12) 52%,
        rgba(17, 23, 35, 0.035) 82%,
        rgba(17, 23, 35, 0) 100%
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.35) inset,
        0 0 18px rgba(17, 23, 35, 0.06);
}

/* ── Photo Upload Area ─────────────────────────────── */
.rw-shell.rw-shell--atrium .photo-upload-area {
    background: linear-gradient(160deg, var(--white) 0%, var(--rw-bg-subtle) 100%);
    border-color: var(--rw-border) !important;
    border-radius: var(--rw-radius-sm);
    border-style: dashed !important;
    text-align: center;
}

/* ── Alert in Partials ─────────────────────────────── */
.rw-shell.rw-shell--atrium .alert-info {
    background: linear-gradient(135deg, var(--rw-primary-soft), rgba(255, 255, 255, 0.6));
    border: 1px solid var(--soft-primary);
    color: var(--rw-text);
    border-radius: var(--rw-radius-sm);
}

/* ── Validation Errors ─────────────────────────────── */
.rw-shell.rw-shell--atrium .invalid-feedback {
    font-size: 0.78rem;
    font-weight: 500;
}

.rw-shell.rw-shell--atrium .bootstrap-select.border-danger .dropdown-toggle {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

/* ── Loading Spinner ───────────────────────────────── */
.rw-shell.rw-shell--atrium #rw-resume-loader .spinner-border,
.rw-shell.rw-shell--atrium .rw-step-panel > .text-center .spinner-border {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--rw-primary) !important;
    border-right-color: transparent;
}

.rw-shell.rw-shell--atrium .rw-nav-bar .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.1875em;
    flex-shrink: 0;
}

/* ── Success modal (registration completion step 1) — theme-aligned ─ */
.rw-success-modal {
    --rw-sm-primary: var(--primary);
    --rw-sm-text: var(--dark);
    --rw-sm-muted: var(--gray);
    --rw-radius: 16px;
}

.rw-success-modal .modal-dialog {
    max-width: 420px;
}

.rw-success-modal__content {
    border: none;
    border-radius: var(--rw-radius);
    overflow: hidden;
    box-shadow: 0 20px 48px -20px rgba(17, 23, 35, 0.22);
    background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

.rw-success-modal__content::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--dark));
}

.rw-success-modal__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rw-success-modal__glyph .las {
    font-size: 3.75rem;
    line-height: 1;
    color: var(--rw-sm-primary);
    filter: drop-shadow(0 6px 16px var(--soft-primary));
}

.rw-success-modal__title {
    font-family: inherit;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--rw-sm-text);
    letter-spacing: -0.02em;
}

.rw-success-modal__lead {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--rw-sm-text);
    line-height: 1.55;
    font-weight: 500;
}

.rw-success-modal__hint {
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--rw-sm-muted);
    line-height: 1.5;
}

.rw-success-modal__cta {
    border-radius: 999px !important;
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--hov-primary, var(--primary)) 100%) !important;
    border: none !important;
    box-shadow: 0 8px 22px -4px var(--soft-primary);
}

.rw-success-modal__cta:hover {
    filter: brightness(1.05);
}

/* ── Google “new from login” invite modal — theme-aligned ─ */
.rw-google-invite-modal {
    --rw-gi-radius: 16px;
}

.rw-google-invite-modal__dialog {
    max-width: 440px;
}

.rw-google-invite-modal__content {
    position: relative;
    border-radius: var(--rw-gi-radius);
    overflow: hidden;
    box-shadow: 0 20px 48px -20px rgba(17, 23, 35, 0.22);
    background:
        radial-gradient(ellipse 120% 90% at 50% -20%, var(--soft-primary), transparent 55%),
        linear-gradient(168deg, var(--white) 0%, var(--light) 100%);
    transform: translateY(18px) scale(0.96);
    opacity: 0;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.36s ease;
}

.rw-google-invite-modal.show .rw-google-invite-modal__content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.rw-google-invite-modal__content::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--dark));
}

.rw-google-invite-modal__body {
    padding: 2rem 1.75rem 2.15rem;
}

@media (min-width: 576px) {
    .rw-google-invite-modal__body {
        padding: 2.25rem 2.25rem 2.35rem;
    }
}

.rw-google-invite-modal__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 16px;
    line-height: 1;
    background: linear-gradient(155deg, var(--white) 0%, var(--light) 100%);
    border: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
    box-shadow: 0 8px 22px rgba(17, 23, 35, 0.08);
}

.rw-google-invite-modal__mark svg {
    display: block;
}

.rw-google-invite-modal__eyebrow {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.45rem;
}

.rw-google-invite-modal__title {
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(1.35rem, 3.5vw, 1.65rem);
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.85rem;
}

.rw-google-invite-modal__lead {
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 1.15rem;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.rw-google-invite-modal__email-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.55rem 1rem 0.55rem 0.75rem;
    margin-bottom: 1.35rem;
    border-radius: 999px;
    border: 1px dashed rgba(17, 23, 35, 0.18);
    background: linear-gradient(180deg, var(--white), var(--light));
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--gray);
}

.rw-google-invite-modal__email-icon {
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.rw-google-invite-modal__email-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
    color: var(--dark);
    font-weight: 600;
}

@media (min-width: 400px) {
    .rw-google-invite-modal__email-text {
        max-width: 320px;
    }
}

.rw-google-invite-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.rw-google-invite-modal__cta {
    border-radius: 999px !important;
    padding: 0.65rem 1.85rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border: none !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--hov-primary, var(--primary)) 100%) !important;
    box-shadow: 0 10px 26px -6px var(--soft-primary);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.rw-google-invite-modal__cta:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    color: #fff !important;
}

.rw-google-invite-modal__ghost {
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.rw-google-invite-modal__ghost:hover {
    color: var(--dark);
    border-bottom-color: rgba(17, 23, 35, 0.25);
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .rw-google-invite-modal__content {
        transition: none;
        transform: none;
        opacity: 1;
    }

    .rw-google-invite-modal.show .rw-google-invite-modal__content {
        transform: none;
    }

    .rw-google-invite-modal__cta:hover {
        transform: none;
    }
}

/* Legacy modal button hooks (cropper + success) */
.rw-shell + .modal .btn-primary,
#successModal .btn-primary:not(.rw-success-modal__cta) {
    background-color: var(--primary);
    border-color: var(--primary);
}

#successModal .text-primary {
    color: var(--primary) !important;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 991px) {
    .rw-steps-bar {
        padding: 0.55rem 1rem 0;
    }
    .rw-step-circle {
        width: var(--rw-step-size-sm);
        height: var(--rw-step-size-sm);
    }
    .rw-step-icon {
        font-size: 1.05rem;
    }
    .rw-step-label {
        font-size: 0.58rem;
    }
    .rw-step-line {
        margin-top: calc(var(--rw-step-size-sm) / 2);
    }
}

@media (max-width: 767px) {
    .rw-shell.rw-shell--atrium {
        padding: 1.5rem 0 2rem;
        background-attachment: scroll;
    }
    .rw-steps-bar {
        display: none;
    }
    .rw-mobile-steps {
        display: block;
    }
    .rw-card-header {
        padding: 1.35rem 1rem 0.55rem;
    }
    .rw-title {
        font-size: 1.22rem;
    }
    .rw-nav-bar .next-btn {
        min-width: 128px;
    }
    .rw-nav-bar .prev-btn,
    .rw-nav-bar .next-btn {
        font-size: 0.88rem;
        padding: 0.52rem 1.35rem;
        min-height: 42px;
    }
}

@media (max-width: 576px) {
    .rw-card--atrium {
        border-radius: 16px;
        margin: 0 -0.15rem;
    }
    .rw-card-body {
        padding: 2.25rem 0.85rem 1.25rem;
    }
    .rw-title {
        font-size: 1.12rem;
    }
    .rw-subtitle {
        font-size: 0.84rem;
    }
    .rw-shell.rw-shell--atrium .form-label {
        font-size: 0.8rem;
    }
    .rw-shell.rw-shell--atrium .form-control {
        font-size: 0.88rem;
    }
    .rw-shell.rw-shell--atrium .bootstrap-select .dropdown-toggle {
        font-size: 0.88rem;
    }
    .rw-shell.rw-shell--atrium .bootstrap-select .dropdown-menu li a span.text {
        font-size: 12px;
    }
    .rw-nav-bar {
        padding-top: 0.85rem;
    }
    .rw-shell.rw-shell--atrium .social.colored a {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-step-panel {
        animation: none;
    }
    .rw-step-circle,
    .rw-step-icon,
    .rw-step-label,
    .rw-step-line,
    .rw-dot,
    .rw-shell.rw-shell--atrium .form-control,
    .rw-nav-bar .next-btn,
    .rw-nav-bar .prev-btn,
    .rw-shell.rw-shell--atrium .social.colored a {
        transition: none;
    }
    .rw-nav-bar .next-btn:hover:not(:disabled),
    .rw-shell.rw-shell--atrium .social.colored a:hover {
        transform: none;
    }
    .rw-shell.rw-shell--atrium .rw-social-btn,
    .rw-social-connect .rw-social-btn {
        transition: none;
    }
    .rw-shell.rw-shell--atrium .rw-social-btn:hover,
    .rw-social-connect .rw-social-btn:hover {
        transform: none;
    }
    .rw-oauth-banner {
        animation: none;
    }
}

/* ── Google step-1 (OAuth) — editorial banner + locked email ───────── */
.rw-oauth-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    border-radius: var(--rw-radius-sm);
    border: 1px solid var(--soft-primary);
    background: linear-gradient(
        125deg,
        var(--white) 0%,
        var(--soft-primary) 55%,
        var(--soft-secondary) 100%
    );
    box-shadow: 0 8px 24px -16px rgba(17, 23, 35, 0.15);
    animation: rwOauthBannerIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rwOauthBannerIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rw-oauth-banner__icon {
    display: inline-flex;
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--white) 0%, var(--light) 100%);
    border: 1px solid var(--rw-border);
    box-shadow: 0 6px 18px rgba(17, 23, 35, 0.08);
    flex-shrink: 0;
}

.rw-oauth-banner__icon svg {
    display: block;
}

.rw-oauth-banner__text strong {
    font-family: inherit;
    letter-spacing: -0.02em;
    color: var(--rw-text);
    font-size: 1.05rem;
}

.rw-oauth-email-readonly {
    background: linear-gradient(180deg, var(--white), var(--light)) !important;
    border-style: dashed !important;
    border-color: rgba(17, 23, 35, 0.15) !important;
    cursor: default;
    color: var(--rw-text-muted);
}

.rw-card--atrium .form-step.step-1.rw-step-panel {
    animation-duration: 0.48s;
}

/* ── Gotra: list / custom switch (theme-aligned; works inside + outside .rw-shell) ─ */
.rw-gotra-field {
    --rw-gt-accent: var(--rw-primary, var(--primary));
    --rw-gt-accent-soft: var(--rw-primary-soft, var(--soft-primary));
    --rw-gt-accent-deep: var(--rw-primary-deep, var(--hov-primary, var(--primary)));
    --rw-gt-surface: var(--rw-bg, var(--white));
    --rw-gt-surface-mid: var(--rw-bg-subtle, var(--light));
    --rw-gt-border: var(--rw-border, rgba(17, 23, 35, 0.12));
    --rw-gt-text: var(--rw-text, var(--dark));
    --rw-gt-muted: var(--rw-text-muted, var(--gray));
}

/* Label + list/custom pill grouped at the start (toggle sits right after the label text) */
.rw-gotra-field .rw-gotra-label-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    column-gap: 0.45rem;
    /* margin-bottom: 0.5rem; */
    min-height: 2.25rem;
}

.rw-gotra-field .rw-gotra-label-row__label {
    flex: 0 1 auto;
    min-width: 0;
    margin-bottom: 0;
    padding-inline-end: 0;
    line-height: 1.3;
    font-weight: 600;
    align-self: center;
}

.rw-gotra-field .rw-gotra-mode {
    display: flex;
    justify-content: flex-start;
}

.rw-gotra-field .rw-gotra-mode--label-row {
    flex: 0 0 auto;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0;
    margin-inline-start: 0;
    align-self: center;
    max-width: none;
}

.rw-gotra-field .rw-gotra-mode--label-row .rw-gotra-pill-toggle {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .rw-gotra-field .rw-gotra-label-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        column-gap: 0.35rem;
        min-height: 2.5rem;
    }

    .rw-gotra-field .rw-gotra-pill-toggle {
        padding: 0.18rem 0.32rem 0.18rem 0.22rem;
        gap: 0.32rem;
    }

    .rw-gotra-field .rw-gotra-pill-toggle__title {
        font-size: 0.68rem;
    }

    .rw-gotra-field .rw-gotra-pill-toggle__label-hint {
        max-width: 100%;
        font-size: 0.55rem;
    }
}

@media (max-width: 374px) {
    .rw-gotra-field .rw-gotra-pill-toggle__track {
        width: 1.85rem;
        height: 1rem;
    }

    .rw-gotra-field .rw-gotra-pill-toggle__knob {
        width: 0.7rem;
        height: 0.7rem;
    }

    .rw-gotra-field .rw-gotra-pill-toggle input:checked + .rw-gotra-pill-toggle__track .rw-gotra-pill-toggle__knob {
        left: calc(100% - 0.08rem - 0.7rem);
    }
}

.rw-gotra-field .rw-gotra-pill-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    padding: 0.2rem 0.42rem 0.2rem 0.26rem;
    border-radius: 999px;
    border: 1px solid var(--rw-gt-border);
    background: linear-gradient(135deg, var(--rw-gt-surface) 0%, var(--rw-gt-surface-mid) 100%);
    box-shadow: 0 2px 10px rgba(17, 23, 35, 0.06);
    transition: border-color var(--rw-transition), box-shadow var(--rw-transition),
        transform 0.18s ease;
}

.rw-gotra-field .rw-gotra-pill-toggle:hover {
    border-color: var(--rw-gt-accent-soft);
    box-shadow: 0 4px 14px rgba(17, 23, 35, 0.08);
}

.rw-gotra-field .rw-gotra-pill-toggle:active {
    transform: scale(0.99);
}

.rw-gotra-field .rw-gotra-pill-toggle__track {
    position: relative;
    width: 2rem;
    height: 1.08rem;
    border-radius: 999px;
    background: var(--rw-gt-surface-mid);
    border: 1px solid var(--rw-gt-border);
    flex-shrink: 0;
    transition: border-color var(--rw-transition), background 0.22s ease,
        box-shadow var(--rw-transition);
}

.rw-gotra-field .rw-gotra-pill-toggle__knob {
    position: absolute;
    top: 50%;
    left: 0.09rem;
    width: 0.76rem;
    height: 0.76rem;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--rw-gt-surface) 0%, var(--rw-gt-surface-mid) 100%);
    border: 1px solid var(--rw-gt-border);
    box-shadow: 0 1px 4px rgba(17, 23, 35, 0.12);
    transform: translateY(-50%);
    transition: left 0.24s cubic-bezier(0.4, 0, 0.2, 1), background 0.22s ease, box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.rw-gotra-field .rw-gotra-pill-toggle__label {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
    line-height: 1.25;
    text-align: start;
}

.rw-gotra-field .rw-gotra-pill-toggle__label-main {
    position: relative;
    min-height: 1.05em;
}

.rw-gotra-field .rw-gotra-pill-toggle__title {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--rw-gt-text);
}

.rw-gotra-field .rw-gotra-pill-toggle__title--custom {
    display: none;
}

.rw-gotra-field .rw-gotra-pill-toggle__label-hint {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--rw-gt-muted);
    max-width: 16rem;
}

.rw-gotra-field .rw-gotra-pill-toggle__hint {
    display: block;
}

.rw-gotra-field .rw-gotra-pill-toggle__hint--custom {
    display: none;
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__title--list {
    display: none;
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__title--custom {
    display: block;
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__hint--list {
    display: none;
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__hint--custom {
    display: block;
}

.rw-gotra-field .rw-gotra-pill-toggle input:focus + .rw-gotra-pill-toggle__track {
    box-shadow: 0 0 0 2px var(--rw-gt-accent-soft);
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked + .rw-gotra-pill-toggle__track {
    border-color: var(--rw-gt-accent);
    background: var(--rw-gt-accent-soft);
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked + .rw-gotra-pill-toggle__track .rw-gotra-pill-toggle__knob {
    left: calc(100% - 0.09rem - 0.76rem);
    background: linear-gradient(160deg, var(--rw-gt-accent-soft) 0%, var(--rw-gt-accent) 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(17, 23, 35, 0.14);
}

.rw-gotra-field .rw-gotra-pill-toggle input:not(:checked) ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__title--list {
    color: var(--rw-gt-accent-deep);
}

.rw-gotra-field .rw-gotra-pill-toggle input:checked ~ .rw-gotra-pill-toggle__label .rw-gotra-pill-toggle__title--custom {
    color: var(--rw-gt-accent-deep);
}

.rw-gotra-field .rw-gotra-custom-shell .rw-gotra-custom-input {
    border-radius: var(--rw-radius-sm);
    border-color: var(--rw-gt-border);
}

.rw-gotra-field[data-mode='custom'] .rw-gotra-custom-shell .rw-gotra-custom-input {
    border-color: var(--rw-gt-accent-soft);
}

@media (prefers-reduced-motion: reduce) {
    .rw-gotra-field .rw-gotra-pill-toggle,
    .rw-gotra-field .rw-gotra-pill-toggle__knob {
        transition: none;
    }
}
