/*
 * PageHost Register SaaS v7 RC9
 * Escopo: register.php com body.pagehost-saas-register
 */
body.pagehost-saas-register {
    --phr-primary: #3a84b5;
    --phr-primary-dark: #27678f;
    --phr-primary-soft: #eef7fd;
    --phr-ink: #172534;
    --phr-muted: #687787;
    --phr-border: #dce6ee;
    --phr-success: #23855b;
    --phr-danger: #b44141;
    --phr-shadow: 0 18px 48px rgba(27,55,82,.10);
}

body.pagehost-saas-register .sidebar,
body.pagehost-saas-register .sidebar-secondary,
body.pagehost-saas-register .sidebar-primary {
    display: none !important;
}

body.pagehost-saas-register .main-content,
body.pagehost-saas-register .primary-content,
body.pagehost-saas-register .content-area > [class*="col-md-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

body.pagehost-saas-register #registration {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto 36px;
    padding: 0 16px;
}

body.pagehost-saas-register #registration > form {
    margin: 0;
}

.pagehost-register-native-hidden {
    display: none !important;
}

#pagehost-register-shell {
    margin: 8px 0 22px;
}

.pagehost-register-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    border: 1px solid rgba(58,132,181,.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% 10%, rgba(58,132,181,.16), transparent 32%),
        linear-gradient(135deg,#fff 0%,#f7fbfe 100%);
    box-shadow: 0 12px 34px rgba(32,73,104,.07);
}

.pagehost-register-hero::after {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    right: -65px;
    top: -85px;
    border-radius: 50%;
    border: 30px solid rgba(58,132,181,.055);
    pointer-events: none;
}

.pagehost-register-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: var(--phr-primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pagehost-register-title {
    margin: 0;
    color: var(--phr-ink);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}

.pagehost-register-subtitle {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--phr-muted);
    font-size: 14px;
    line-height: 1.55;
}

.pagehost-register-access {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(58,132,181,.16);
    border-radius: 13px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 6px 18px rgba(32,73,104,.045);
}

.pagehost-register-access-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pagehost-register-access-copy strong {
    color: var(--phr-ink);
    font-size: 13px;
    line-height: 1.35;
}

.pagehost-register-access-copy span {
    margin-top: 2px;
    color: var(--phr-muted);
    font-size: 11px;
    line-height: 1.4;
}

.pagehost-register-access-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex: 0 0 auto;
}

.pagehost-register-access-actions .btn,
.pagehost-register-access-actions a,
.pagehost-register-access-google {
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0 !important;
    padding: 8px 13px !important;
    border-radius: 9px !important;
    white-space: nowrap;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.pagehost-register-access-login {
    border-color: var(--phr-primary) !important;
    background: var(--phr-primary) !important;
    color: #fff !important;
}

.pagehost-register-access-google {
    border: 1px solid #d7e0e7 !important;
    background: #fff !important;
    color: #34495a !important;
}

.pagehost-register-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    color: var(--phr-muted);
    font-size: 12px;
}

.pagehost-register-progress-track {
    height: 6px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #e7eef4;
}

#pagehost-register-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,var(--phr-primary),#58a8dc);
    transition: width .22s ease;
}

#pagehost-register-stepper {
    display: flex;
    align-items: flex-start;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.pagehost-register-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.pagehost-register-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 19px);
    right: calc(-50% + 19px);
    height: 2px;
    background: #dfe7ed;
    transition: background .2s ease;
}

.pagehost-register-step.is-complete:not(:last-child)::after {
    background: #8ccab2;
}

.pagehost-register-step-button {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--phr-muted);
    cursor: default;
}

.pagehost-register-step.is-complete .pagehost-register-step-button,
.pagehost-register-step.is-active .pagehost-register-step-button,
.pagehost-register-step.is-available .pagehost-register-step-button {
    cursor: pointer;
}

.pagehost-register-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 2px solid #d9e3eb;
    border-radius: 50%;
    background: #fff;
    color: #8997a4;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(29,54,79,.06);
    transition: all .2s ease;
}

.pagehost-register-step.is-active .pagehost-register-step-dot {
    border-color: var(--phr-primary);
    background: var(--phr-primary);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(58,132,181,.12);
}

.pagehost-register-step.is-complete .pagehost-register-step-dot {
    border-color: var(--phr-success);
    background: var(--phr-success);
    color: #fff;
}

.pagehost-register-step-label {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagehost-register-stage-panel {
    position: relative;
    margin: 0 0 20px;
    padding: 26px;
    border: 1px solid var(--phr-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--phr-shadow);
}

.pagehost-register-stage-panel[hidden] {
    display: none !important;
}

.pagehost-register-stage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf1f4;
}

.pagehost-register-stage-kicker {
    margin-bottom: 4px;
    color: var(--phr-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.pagehost-register-stage-title {
    margin: 0;
    color: var(--phr-ink);
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
}

.pagehost-register-stage-description {
    margin: 5px 0 0;
    color: var(--phr-muted);
    font-size: 13px;
    line-height: 1.5;
}

.pagehost-register-stage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--phr-primary-soft);
    color: var(--phr-primary-dark);
    font-size: 18px;
}

.pagehost-register-stage-error {
    display: none;
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid #efcccc;
    border-radius: 10px;
    background: #fff6f6;
    color: var(--phr-danger);
    font-size: 12px;
    line-height: 1.45;
}

.pagehost-register-stage-error.is-visible {
    display: block;
}

.pagehost-register-stage-body .row {
    margin-left: -7px;
    margin-right: -7px;
}

.pagehost-register-stage-body .row > [class*="col-"] {
    padding-left: 7px;
    padding-right: 7px;
}

body.pagehost-saas-register #frmCheckout .form-group {
    margin-bottom: 14px;
}

body.pagehost-saas-register #frmCheckout .form-control,
body.pagehost-saas-register #frmCheckout select.form-control,
body.pagehost-saas-register #frmCheckout .field.form-control,
body.pagehost-saas-register #frmCheckout input.field,
body.pagehost-saas-register #frmCheckout select.field {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d8e2ea;
    border-radius: 10px;
    background-color: #fff;
    color: #263748;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

body.pagehost-saas-register #frmCheckout textarea.form-control {
    min-height: 108px;
    padding-top: 12px;
    resize: vertical;
}

body.pagehost-saas-register #frmCheckout .input-group-addon,
body.pagehost-saas-register #frmCheckout .input-group-text {
    border-color: #d8e2ea;
    background: #f7fafc;
}

body.pagehost-saas-register #frmCheckout .pagehost-field-valid,
body.pagehost-saas-register #frmCheckout .has-success .form-control {
    border-color: #9fd2bc !important;
    background-color: #fbfffd !important;
}

body.pagehost-saas-register #frmCheckout .pagehost-cpf-awaiting[readonly],
body.pagehost-saas-register #frmCheckout .pagehost-cep-locked,
body.pagehost-saas-register #frmCheckout [data-pagehost-cep-locked="1"] {
    border-color: #e0e6eb !important;
    background-color: #f3f6f8 !important;
    color: #7a8996 !important;
    cursor: not-allowed !important;
}

.pagehost-register-stage-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1f4;
}

.pagehost-register-stage-nav .btn,
.pagehost-register-submit {
    min-width: 120px;
    min-height: 42px;
    border-radius: 10px !important;
    font-weight: 700 !important;
}

.pagehost-register-btn-next,
.pagehost-register-submit {
    border-color: var(--phr-primary) !important;
    background: var(--phr-primary) !important;
    color: #fff !important;
}

.pagehost-register-btn-next:disabled,
.pagehost-register-btn-next.is-disabled,
.pagehost-register-submit:disabled,
.pagehost-register-submit.pagehost-register-submit-disabled {
    border-color: #cdd8e0 !important;
    background: #dfe7ed !important;
    color: #80909d !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.pagehost-register-btn-back {
    border-color: #d6e0e8 !important;
    background: #fff !important;
    color: #526779 !important;
}

body.pagehost-saas-register #pagehost-registration-gate,
body.pagehost-saas-register .pagehost-registration-card,
body.pagehost-saas-register .pagehost-registration-summary {
    margin: 0 !important;
}

body.pagehost-saas-register .pagehost-registration-card {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.pagehost-saas-register .pagehost-registration-actions {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px !important;
}

body.pagehost-saas-register .pagehost-registration-actions .btn {
    min-height: 54px;
    margin: 0 !important;
    border-radius: 12px !important;
    font-weight: 700;
}

body.pagehost-saas-register .pagehost-registration-summary {
    min-height: 54px;
    padding: 12px 14px !important;
    border-color: #cce6da !important;
    border-radius: 12px !important;
    background: #f5fbf8 !important;
}

.pagehost-register-optional-label {
    color: #7890a3;
    font-weight: 500;
}

.pagehost-register-field-label {
    display: block;
    margin-bottom: 6px;
    color: #5e6f7e;
    font-size: 12px;
    font-weight: 500;
}

.pagehost-register-address-detail-row {
    align-items: flex-start;
}

.pagehost-register-number-group {
    margin-bottom: 0;
}

.pagehost-register-number-group .form-control {
    margin-bottom: 8px;
}

.pagehost-register-no-number-group {
    display: flex;
    align-items: flex-end;
    min-height: 68px;
    padding-bottom: 8px;
}

.pagehost-register-no-number-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #617382;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.pagehost-register-no-number-inline {
    margin-top: 4px;
}

.pagehost-register-no-number-label input {
    margin: 0;
}

body.pagehost-saas-register #containerNewUserSecurity .card,
body.pagehost-saas-register #containerNewUserSecurity .card-body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.pagehost-saas-register #containerNewUserSecurity .card-title {
    display: none !important;
}

body.pagehost-saas-register #containerNewUserSecurity .generate-password,
body.pagehost-saas-register #containerNewUserSecurity [data-targetfields*="inputNewPassword"] {
    display: inline-block;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
}

body.pagehost-saas-register #containerNewUserSecurity .progress {
    clear: both;
    margin-top: 18px !important;
    margin-bottom: 8px !important;
}

body.pagehost-saas-register #pagehost-register-stage-final .card {
    margin: 14px 0 !important;
    border: 1px solid #e3e9ee !important;
    border-radius: 12px !important;
    background: #fafcfd !important;
    box-shadow: none !important;
}

body.pagehost-saas-register #pagehost-register-stage-final .card-body {
    padding: 14px 16px !important;
}

body.pagehost-saas-register #pagehost-register-stage-final p.text-center {
    margin-top: 14px;
    margin-bottom: 14px;
}

body.pagehost-saas-register #pagehost-register-stage-final .pagehost-register-stage-nav {
    margin-bottom: 0;
}

/* Campos obrigatórios pendentes: mesma linguagem visual homologada no checkout. */
body.pagehost-saas-register #frmCheckout .pagehost-register-required-pending:not([type="checkbox"]):not([type="radio"]),
body.pagehost-saas-register #frmCheckout .pagehost-register-required-group .form-control,
body.pagehost-saas-register #frmCheckout .pagehost-register-required-group select,
body.pagehost-saas-register #frmCheckout #pagehost-register-address-number-column.pagehost-register-required-group #pagehostRegisterAddressNumber {
    border-color: #d9534f !important;
    outline: 1px solid rgba(217,83,79,.86) !important;
    outline-offset: -1px !important;
    box-shadow: 0 0 0 1px rgba(217,83,79,.05) !important;
}

body.pagehost-saas-register #frmCheckout input[type="checkbox"].pagehost-register-required-pending,
body.pagehost-saas-register #frmCheckout .pagehost-register-required-label input[type="checkbox"] {
    outline: 1px solid #d9534f !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px rgba(217,83,79,.12) !important;
}

body.pagehost-saas-register #frmCheckout input[type="checkbox"].pagehost-register-required-ok {
    outline: 1px solid #67b892;
    outline-offset: 2px;
}

body.pagehost-saas-register #frmCheckout .pagehost-register-required-label {
    color: #a94442 !important;
}

body.pagehost-saas-register #containerNewUserSignup.pagehost-register-native-container {
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 900px) {
    .pagehost-register-step-label { font-size: 10px; }
    .pagehost-register-stage-panel { padding: 22px 20px; }
}

@media (max-width: 767px) {
    body.pagehost-saas-register #registration {
        padding-left: 10px;
        padding-right: 10px;
    }

    .pagehost-register-hero {
        padding: 19px 17px;
        border-radius: 15px;
    }

    .pagehost-register-title { font-size: 23px; }
    .pagehost-register-subtitle { font-size: 13px; }

    .pagehost-register-access {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 13px;
    }

    .pagehost-register-access-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .pagehost-register-access-actions .btn,
    .pagehost-register-access-actions a,
    .pagehost-register-access-google {
        width: 100% !important;
        min-height: 42px;
    }

    #pagehost-register-stepper {
        overflow-x: auto;
        gap: 0;
        margin-left: -4px;
        margin-right: -4px;
        padding: 2px 4px 8px;
        scrollbar-width: thin;
    }

    .pagehost-register-step { flex: 0 0 84px; }
    .pagehost-register-step:not(:last-child)::after { left: 54px; right: -30px; }
    .pagehost-register-step-label {
        max-width: 80px;
        margin-left: auto;
        margin-right: auto;
        white-space: normal;
    }

    .pagehost-register-stage-panel {
        padding: 18px 15px;
        border-radius: 15px;
    }

    .pagehost-register-stage-header {
        margin-bottom: 17px;
        padding-bottom: 15px;
    }

    .pagehost-register-stage-title { font-size: 19px; }
    .pagehost-register-stage-icon { width: 38px; height: 38px; }

    body.pagehost-saas-register .pagehost-registration-actions {
        grid-template-columns: 1fr !important;
    }

    .pagehost-register-stage-nav {
        align-items: stretch;
        margin-top: 26px;
        padding-top: 22px;
    }

    .pagehost-register-stage-nav .btn,
    .pagehost-register-submit {
        flex: 1 1 0;
        min-width: 0;
    }

    body.pagehost-saas-register #containerNewUserSecurity .progress {
        margin-top: 20px !important;
    }

    .pagehost-register-no-number-group {
        min-height: 0;
        padding: 0 0 10px;
    }

    .pagehost-register-address-detail-row > [class*="col-"] + [class*="col-"] {
        margin-top: 10px;
    }
}

/* RC6: proteção do host de login social. Nunca renderizar tags auxiliares como conteúdo. */
.pagehost-register-access-actions > style,
.pagehost-register-access-actions > script,
.pagehost-register-access-actions > link,
.pagehost-register-access-actions > noscript {
    display: none !important;
}

.pagehost-register-access-google iframe {
    display: block !important;
    max-width: 100%;
    margin: 0 !important;
}


/* =========================================================
   RC7 - Google sem moldura duplicada
   ========================================================= */
.pagehost-register-access-google-host {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1;
}

.pagehost-register-access-google-host > * {
    margin: 0 !important;
}

/* =========================================================
   RC7 - Pop de validação/criação da conta
   ========================================================= */
.pagehost-register-processing {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 35, 52, .42);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
}

.pagehost-register-processing.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pagehost-register-processing-card {
    width: min(460px, 100%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid rgba(58,132,181,.16);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(19, 48, 70, .22);
}

.pagehost-register-processing-spinner {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 4px solid #dcecf6;
    border-top-color: #3a84b5;
    border-radius: 50%;
    animation: pagehost-register-spin .75s linear infinite;
}

.pagehost-register-processing-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pagehost-register-processing-copy strong {
    color: #102b3c;
    font-size: 17px;
    line-height: 1.3;
}

.pagehost-register-processing-copy span {
    color: #617482;
    font-size: 13px;
    line-height: 1.5;
}

@keyframes pagehost-register-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .pagehost-register-processing { padding: 18px; }
    .pagehost-register-processing-card {
        align-items: flex-start;
        padding: 20px;
    }
}

/* =========================================================
   RC9 - Google sem wrapper/moldura externa do WHMCS
   ========================================================= */
.pagehost-register-access-google-host > .pagehost-register-google-origin-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.pagehost-register-access-google-host > .pagehost-register-google-origin-wrapper > * {
    margin: 0 !important;
}

