/* SaaS register 3-step wizard — green mockup UI */
.pp-auth-shell--register,
.pp-auth-main .reg-wizard {
    max-width: 1100px;
    margin: 0 auto;
}

.reg-wizard {
    --reg-green: #22c55e;
    --reg-green-dark: #16a34a;
    --reg-green-soft: #ecfdf3;
    --reg-border: #e5e7eb;
    --reg-text: #374151;
    --reg-muted: #6b7280;
    --reg-heading: #111827;
    --reg-radius: 16px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem clamp(1rem, 4vw, 1.5rem) 2rem;
    box-sizing: border-box;
}

.reg-stepper {
    margin-bottom: 2rem;
}

.reg-stepper__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.reg-stepper__item {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 220px;
}

.reg-stepper__item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(50% + 28px);
    right: calc(-50% + 28px);
    top: 18px;
    height: 2px;
    background: var(--reg-border);
    z-index: 0;
}

.reg-stepper__item.is-done:not(:last-child)::after,
.reg-stepper__item.is-active:not(:last-child)::after {
    background: var(--reg-green);
}

.reg-stepper__btn {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--reg-muted);
}

.reg-stepper__btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.reg-stepper__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--reg-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--reg-muted);
}

.reg-stepper__num .fa-check {
    display: none;
    font-size: 0.85rem;
}

.reg-stepper__item.is-active .reg-stepper__num {
    background: var(--reg-green);
    border-color: var(--reg-green);
    color: #fff;
}

.reg-stepper__item.is-done .reg-stepper__num {
    background: var(--reg-green);
    border-color: var(--reg-green);
    color: #fff;
}

.reg-stepper__item.is-done .reg-stepper__num-text {
    display: none;
}

.reg-stepper__item.is-done .reg-stepper__num .fa-check {
    display: inline;
}

.reg-stepper__label {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.reg-stepper__item.is-active .reg-stepper__label,
.reg-stepper__item.is-done .reg-stepper__label {
    color: var(--reg-heading);
}

.reg-step__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.reg-step__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--reg-heading);
    margin: 0 0 0.4rem;
}

.reg-step__lead {
    margin: 0;
    color: var(--reg-muted);
    font-size: 1rem;
}

.reg-alert {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
}

.reg-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.reg-alert--error ul {
    margin: 0;
    padding-left: 1.1rem;
}

/* Plans */
.reg-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-bottom: 1rem;
}

.reg-plan-grid.is-invalid {
    /* No red outline — feedback text below is enough */
    outline: none;
}

@media (min-width: 768px) {
    .reg-plan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .reg-plan-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch;
    }
}

.reg-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid var(--reg-border);
    border-radius: 20px;
    padding: 1.35rem 1.25rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
    min-width: 0;
}

.reg-plan-card:hover {
    border-color: color-mix(in srgb, var(--reg-green) 45%, var(--reg-border));
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.reg-plan-card--popular {
    border-color: color-mix(in srgb, var(--reg-green) 55%, var(--reg-border));
    box-shadow: 0 12px 32px color-mix(in srgb, var(--reg-green) 14%, transparent);
    padding-top: 1.75rem;
}

.reg-plan-card.is-selected {
    border-color: var(--reg-green);
    border-width: 3px;
    background:
        linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--reg-green) 22%, transparent),
        0 16px 36px color-mix(in srgb, var(--reg-green) 28%, transparent);
    transform: translateY(-2px);
}

.reg-plan-card.is-selected::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--reg-green);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--reg-green) 40%, transparent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    z-index: 2;
}

.reg-plan-card.is-selected .reg-plan-card__name {
    color: var(--reg-green-dark);
}

.reg-plan-card.is-selected .reg-plan-card__amount {
    color: var(--reg-green-dark);
}

.reg-plan-card.is-selected .reg-plan-card__cta {
    background: var(--reg-green);
    color: #fff;
    border-color: var(--reg-green);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--reg-green) 35%, transparent);
}

.reg-plan-card__ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--reg-green);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
    z-index: 3;
}

.reg-plan-card__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-plan-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.reg-plan-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--reg-heading);
    margin: 0 0 0.65rem;
}

.reg-plan-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.reg-plan-card__amount {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--reg-heading);
    line-height: 1;
}

.reg-plan-card__period {
    font-size: 0.9rem;
    color: var(--reg-muted);
}

.reg-plan-card__benefits {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.reg-plan-card__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--reg-text);
    line-height: 1.35;
}

.reg-plan-card__benefits .fa-check {
    color: var(--reg-green);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.reg-plan-card__cta {
    width: 100%;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.reg-plan-card__cta--outline {
    background: #fff;
    color: var(--reg-green-dark);
    border: 2px solid var(--reg-green);
}

.reg-plan-card__cta--outline:hover {
    background: var(--reg-green-soft);
}

.reg-plan-card__cta--solid {
    background: var(--reg-green);
    color: #fff;
    border: 2px solid var(--reg-green);
}

.reg-plan-card__cta--solid:hover {
    background: var(--reg-green-dark);
    border-color: var(--reg-green-dark);
}

.reg-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.75rem;
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    color: var(--reg-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.reg-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.reg-trust .fa-ban,
.reg-trust .fa-rotate-left,
.reg-trust .fa-shield-halved {
    color: var(--reg-green);
}

/* Form fields */
.reg-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.15rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .reg-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.reg-field {
    margin-bottom: 1rem;
    min-width: 0;
}

.reg-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--reg-heading);
    margin-bottom: 0.4rem;
}

.reg-input {
    width: 100%;
    border: 1.5px solid var(--reg-border);
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: 1rem;
    color: var(--reg-heading);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/*
 * auth-pages.css sets -webkit-text-fill-color on all inputs, which also
 * paints placeholders black. Reset fill + color for placeholders only.
 */
.pp-auth-page .reg-wizard input.reg-input::placeholder,
.pp-auth-page .reg-wizard input.reg-slug__input::placeholder,
.pp-auth-page .reg-wizard #phone::placeholder,
.pp-auth-page .reg-wizard .iti input::placeholder,
.reg-wizard input.reg-input::placeholder,
.reg-wizard input.reg-slug__input::placeholder,
.reg-wizard #phone::placeholder,
.reg-wizard .iti input::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.pp-auth-page .reg-wizard input.reg-input::-webkit-input-placeholder,
.pp-auth-page .reg-wizard input.reg-slug__input::-webkit-input-placeholder,
.pp-auth-page .reg-wizard #phone::-webkit-input-placeholder,
.pp-auth-page .reg-wizard .iti input::-webkit-input-placeholder,
.reg-wizard input.reg-input::-webkit-input-placeholder,
.reg-wizard input.reg-slug__input::-webkit-input-placeholder,
.reg-wizard #phone::-webkit-input-placeholder,
.reg-wizard .iti input::-webkit-input-placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.pp-auth-page .reg-wizard input.reg-input::-moz-placeholder,
.pp-auth-page .reg-wizard input.reg-slug__input::-moz-placeholder,
.pp-auth-page .reg-wizard #phone::-moz-placeholder,
.pp-auth-page .reg-wizard .iti input::-moz-placeholder,
.reg-wizard input.reg-input::-moz-placeholder,
.reg-wizard input.reg-slug__input::-moz-placeholder,
.reg-wizard #phone::-moz-placeholder,
.reg-wizard .iti input::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* Typed / real values stay dark */
.pp-auth-page .reg-wizard input.reg-input,
.pp-auth-page .reg-wizard input.reg-slug__input,
.pp-auth-page .reg-wizard #phone,
.pp-auth-page .reg-wizard .iti input {
    color: #111827;
    -webkit-text-fill-color: #111827;
}

.reg-step__actions--plan {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.25rem;
}

.reg-input:focus {
    outline: none;
    border-color: var(--reg-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--reg-green) 20%, transparent);
}

.reg-input.is-invalid,
.reg-slug.is-invalid {
    border-color: #dc2626;
}

.reg-input.is-valid,
.reg-slug.is-valid {
    border-color: var(--reg-green);
}

.reg-field-feedback {
    min-height: 1.15em;
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.reg-field-feedback.is-error { color: #dc2626; }
.reg-field-feedback.is-success { color: var(--reg-green-dark); }
.reg-field-feedback.is-checking { color: var(--reg-muted); }

.reg-phone-help,
.reg-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--reg-muted);
}

.reg-hint--muted {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Slug */
.reg-slug {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--reg-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
}

.reg-slug:focus-within {
    border-color: var(--reg-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--reg-green) 20%, transparent);
}

.reg-slug__prefix {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 0.85rem;
    background: #f3f4f6;
    color: var(--reg-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-right: 1px solid var(--reg-border);
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reg-slug__input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    background: transparent;
}

.reg-slug__input:focus {
    outline: none;
    box-shadow: none;
}

.reg-slug__status {
    flex: 0 0 auto;
    display: none;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.85rem 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.reg-slug__status.is-available,
.reg-slug__status.is-taken {
    display: inline-flex;
}

.reg-slug__status.is-available { color: var(--reg-green-dark); }
.reg-slug__status.is-taken { color: #dc2626; }

/* Password */
.reg-password {
    position: relative;
}

.reg-password .reg-input {
    padding-right: 2.75rem;
}

.reg-password__toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--reg-muted);
    padding: 0.35rem;
    cursor: pointer;
}

.reg-password__toggle:hover {
    color: var(--reg-heading);
}

/* Buttons / actions */
.reg-step__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

@media (min-width: 576px) {
    .reg-step__actions {
        flex-direction: row;
        align-items: center;
    }

    .reg-step__actions .reg-btn--ghost {
        flex: 0 0 auto;
    }

    .reg-step__actions .reg-btn--block {
        flex: 1 1 auto;
    }
}

.reg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

.reg-btn--primary {
    background: var(--reg-green);
    color: #fff;
    border-color: var(--reg-green);
}

.reg-btn--primary:hover:not(:disabled) {
    background: var(--reg-green-dark);
    border-color: var(--reg-green-dark);
}

.reg-btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.reg-btn--ghost {
    background: #fff;
    color: var(--reg-text);
    border-color: var(--reg-border);
}

.reg-btn--ghost:hover {
    border-color: var(--reg-muted);
}

.reg-btn--block {
    width: 100%;
}

.reg-switch,
.reg-legal {
    text-align: center;
    margin: 1.15rem 0 0;
    font-size: 0.9rem;
    color: var(--reg-muted);
}

.reg-switch a,
.reg-legal a {
    color: var(--reg-green-dark);
    font-weight: 600;
    text-decoration: none;
}

.reg-switch a:hover,
.reg-legal a:hover {
    text-decoration: underline;
}

/* intl-tel-input inside wizard */
.reg-wizard .iti {
    width: 100%;
    display: block;
}

.reg-wizard .iti input.reg-input {
    width: 100%;
}

.reg-wizard .iti__country-list {
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1060;
}

.reg-wizard .iti--show-selected-dial-code .iti__selected-flag {
    background-color: transparent !important;
    border-right: 1px solid #d7dbe0;
    padding: 0 12px 0 12px;
    margin-right: 0;
    cursor: pointer;
    position: relative;
}

.reg-wizard .iti--show-selected-dial-code .iti__selected-flag:hover,
.reg-wizard .iti--show-selected-dial-code .iti__selected-flag:focus {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

.reg-wizard .iti--show-selected-dial-code .iti__selected-dial-code {
    color: #8a919a;
    font-size: 1rem;
    margin-left: 8px;
}

/* Extra gap between country selector and the typed number (ITI sets padding-left inline) */
.reg-wizard .iti--show-selected-dial-code input.reg-input,
.reg-wizard .iti--show-selected-dial-code input#phone {
    padding-left: calc(var(--reg-iti-flag-width, 92px) + 20px) !important;
}

.reg-wizard #phone.is-invalid { border-color: #dc2626; }
.reg-wizard #phone.is-valid { border-color: var(--reg-green); }

@media (max-width: 480px) {
    .reg-wizard .iti__country-list {
        max-width: 260px;
        white-space: normal;
    }

    .reg-stepper__label {
        font-size: 0.7rem;
    }

    .reg-stepper__item:not(:last-child)::after {
        left: calc(50% + 22px);
        right: calc(-50% + 22px);
        top: 16px;
    }

    .reg-stepper__num {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .reg-slug {
        flex-wrap: wrap;
    }

    .reg-slug__prefix {
        max-width: 100%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--reg-border);
        justify-content: flex-start;
    }

    .reg-slug__status {
        width: 100%;
        justify-content: flex-end;
        padding: 0 0.75rem 0.5rem;
    }
}

/* Soften old auth card chrome when wizard is present */
.pp-auth-main:has(.reg-wizard) {
    background: #fafafa;
    padding-left: clamp(0.75rem, 3vw, 1.25rem);
    padding-right: clamp(0.75rem, 3vw, 1.25rem);
    box-sizing: border-box;
}

.pp-auth-main:has(.reg-wizard) .pp-auth-shell {
    max-width: 1100px;
    background: transparent;
    box-shadow: none;
    padding: 1rem clamp(0.75rem, 3vw, 1.25rem) 2rem;
}

@media (max-width: 575.98px) {
    .pp-auth-main:has(.reg-wizard) {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .reg-wizard {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .reg-plan-card {
        margin-left: 0;
        margin-right: 0;
    }

    .reg-plan-card--popular {
        /* Keep ribbon inside viewport */
        margin-top: 0.75rem;
    }
}
