﻿/* =========================================================
   CADASTRO DE CONTA — BELOVETY
   Complementa Acesso.css
   Prefixo: bvreg
   ========================================================= */

/* =========================================================
   ESTRUTURA
   ========================================================= */

.bvreg-panel {
    align-items: flex-start;
    padding-top: 30px;
    padding-bottom: 38px;
}

.bvreg-card {
    width: min(100%, 510px);
    margin-right: auto;
    margin-left: auto;
}

.bvreg-header {
    margin-bottom: 21px;
}

/* =========================================================
   PROGRESSO
   ========================================================= */

.bvreg-progress {
    display: grid;
    grid-template-columns: 30px minmax(30px, 72px) 30px;
    align-items: center;
    width: max-content;
    margin: 0 0 18px;
}

    .bvreg-progress span {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border: 1px solid var(--bvauth-border);
        border-radius: 50%;
        background: #ffffff;
        color: var(--bvauth-muted);
        font-size: .68rem;
        font-weight: 900;
    }

        .bvreg-progress span.is-active {
            border-color: var(--bvauth-accent);
            background: var(--bvauth-accent);
            color: #ffffff;
            box-shadow: 0 8px 20px rgba(255, 7, 135, .2);
        }

    .bvreg-progress i {
        height: 2px;
        background: var(--bvauth-border-soft);
    }

    .bvreg-progress span.is-active + i {
        background: linear-gradient( 90deg, var(--bvauth-accent), var(--bvauth-border-soft) );
    }

/* =========================================================
   CONVITE
   ========================================================= */

.bvreg-invite {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid rgba(255, 7, 135, .18);
    border-radius: 17px;
    background: #fff8fc;
}

    .bvreg-invite > span {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 13px;
        background: var(--bvauth-accent-soft);
        color: var(--bvauth-accent);
    }

    .bvreg-invite small,
    .bvreg-invite strong {
        display: block;
    }

    .bvreg-invite small {
        color: var(--bvauth-accent);
        font-size: .58rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .bvreg-invite strong {
        margin-top: 3px;
        color: var(--bvauth-text);
        font-size: .69rem;
        line-height: 1.4;
    }

/* =========================================================
   ETAPAS
   ========================================================= */

.bvreg-step {
    display: grid;
    gap: 17px;
}

    .bvreg-step[hidden] {
        display: none;
    }

    .bvreg-step.is-active {
        animation: bvreg-enter .2s ease both;
    }

@keyframes bvreg-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   NOTAS E STATUS
   ========================================================= */

.bvreg-field-note {
    display: block;
    color: var(--bvauth-soft);
    font-size: .61rem;
    font-style: normal;
    font-weight: 650;
    line-height: 1.45;
}

    .bvreg-field-note i {
        margin-right: 4px;
        color: var(--bvauth-accent);
    }

    .bvreg-field-note em,
    .bvauth-field > span em {
        color: var(--bvauth-muted);
        font-size: .58rem;
        font-style: normal;
        font-weight: 600;
    }

    .bvreg-field-note.is-success {
        color: #278458;
    }

    .bvreg-field-note.is-error {
        color: #bd265d;
    }

    .bvreg-field-note.is-loading {
        color: var(--bvauth-muted);
    }

/* =========================================================
   CABEÇALHO DA ETAPA 2
   ========================================================= */

.bvreg-review-title {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
}

    .bvreg-review-title > button {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 1px solid var(--bvauth-border);
        border-radius: 12px;
        background: #ffffff;
        color: var(--bvauth-soft);
    }

        .bvreg-review-title > button:hover {
            border-color: rgba(255, 7, 135, .28);
            color: var(--bvauth-accent);
        }

    .bvreg-review-title strong,
    .bvreg-review-title small {
        display: block;
    }

    .bvreg-review-title strong {
        font-size: .78rem;
        font-weight: 900;
    }

    .bvreg-review-title small {
        margin-top: 2px;
        color: var(--bvauth-soft);
        font-size: .61rem;
    }

/* =========================================================
   CIDADE SELECIONADA
   ========================================================= */

.bvreg-city {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid var(--bvauth-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--bvauth-text);
    text-align: left;
}

    .bvreg-city:hover,
    .bvreg-city:focus-visible {
        border-color: rgba(255, 7, 135, .48);
        background: #fffafd;
        box-shadow: 0 0 0 4px var(--bvauth-accent-soft);
    }

.bvreg-city__icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--bvauth-accent-soft);
    color: var(--bvauth-accent);
}

.bvreg-city__copy {
    min-width: 0;
}

    .bvreg-city__copy small,
    .bvreg-city__copy strong,
    .bvreg-city__copy em {
        display: block;
    }

    .bvreg-city__copy small {
        color: var(--bvauth-accent);
        font-size: .56rem;
        font-weight: 900;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .bvreg-city__copy strong {
        margin-top: 2px;
        overflow: hidden;
        color: var(--bvauth-text);
        font-size: .75rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bvreg-city__copy em {
        margin-top: 2px;
        overflow: hidden;
        color: var(--bvauth-soft);
        font-size: .61rem;
        font-style: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.bvreg-city > i {
    color: var(--bvauth-muted);
    font-size: .64rem;
}

/* =========================================================
   CONFIRMAÇÃO DA CIDADE SUGERIDA
   ========================================================= */

.bvreg-city-confirm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 7, 135, .18);
    border-radius: 13px;
    background: #fff8fc;
}

    .bvreg-city-confirm[hidden] {
        display: none;
    }

    .bvreg-city-confirm p {
        margin: 0;
        color: var(--bvauth-soft);
        font-size: .61rem;
        line-height: 1.4;
    }

    .bvreg-city-confirm button {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 6px 10px;
        border: 1px solid var(--bvauth-accent);
        border-radius: 999px;
        background: #ffffff;
        color: var(--bvauth-accent);
        font-size: .59rem;
        font-weight: 900;
    }

/* =========================================================
   TELEFONE
   ========================================================= */

.bvreg-form .iti {
    width: 100%;
    display: block;
}

.bvreg-phone {
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding-right: 14px !important;
    border: 1px solid var(--bvauth-border);
    border-radius: 15px;
    outline: 0;
    background: #ffffff;
    color: var(--bvauth-text);
    font-size: .78rem;
    font-weight: 600;
    line-height: normal;
}

    .bvreg-phone:focus {
        border-color: rgba(255, 7, 135, .58);
        box-shadow: 0 0 0 4px var(--bvauth-accent-soft);
    }

    .bvreg-phone::placeholder {
        color: #9da3ad;
        opacity: 1;
        font-weight: 500;
    }

.bvreg-form .iti__flag-container {
    height: 52px;
    border-radius: 15px 0 0 15px;
}

.bvreg-form .iti__selected-flag {
    min-width: 92px;
    padding: 0 12px 0 10px;
    border-right: 1px solid var(--bvauth-border-soft);
    border-radius: 15px 0 0 15px;
    background: #f7f8fa;
}

.bvreg-form .iti__selected-dial-code {
    margin-left: 7px;
    color: var(--bvauth-text);
    font-size: .72rem;
    font-weight: 800;
}

.bvreg-form .iti--separate-dial-code .bvreg-phone,
.bvreg-form .iti--show-selected-dial-code .bvreg-phone {
    padding-left: 108px !important;
}

.bvreg-form
.iti:not(.iti--separate-dial-code):not(.iti--show-selected-dial-code)
.bvreg-phone {
    padding-left: 58px !important;
}

/* =========================================================
   CANAL DE VALIDAÇÃO
   ========================================================= */

.bvreg-channel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

    .bvreg-channel legend {
        grid-column: 1 / -1;
        margin-bottom: 1px;
        color: var(--bvauth-text);
        font-size: .7rem;
        font-weight: 850;
    }

    .bvreg-channel label {
        position: relative;
        cursor: pointer;
    }

    .bvreg-channel input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .bvreg-channel label > span {
        min-height: 96px;
        display: grid;
        align-content: start;
        gap: 5px;
        padding: 13px;
        border: 1px solid var(--bvauth-border);
        border-radius: 15px;
        background: #ffffff;
    }

        .bvreg-channel label > span > i {
            color: var(--bvauth-accent);
            font-size: .95rem;
        }

    .bvreg-channel strong {
        font-size: .7rem;
    }

    .bvreg-channel small {
        color: var(--bvauth-soft);
        font-size: .59rem;
        line-height: 1.38;
    }

    .bvreg-channel input:checked + span {
        border-color: var(--bvauth-accent);
        background: #fff8fc;
        box-shadow: 0 0 0 3px var(--bvauth-accent-soft);
    }

    .bvreg-channel input:focus-visible + span {
        outline: 3px solid rgba(255, 7, 135, .28);
        outline-offset: 2px;
    }

/* =========================================================
   GOOGLE CONFIRMADO
   ========================================================= */

.bvreg-google-confirmed {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px;
    border: 1px solid #cdebdc;
    border-radius: 15px;
    background: #f3fbf7;
}

    .bvreg-google-confirmed > i {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: #e3f6ec;
        color: #278458;
    }

    .bvreg-google-confirmed strong,
    .bvreg-google-confirmed small {
        display: block;
    }

    .bvreg-google-confirmed strong {
        font-size: .69rem;
    }

    .bvreg-google-confirmed small {
        margin-top: 3px;
        color: #567365;
        font-size: .59rem;
    }

/* =========================================================
   CONTRATOS
   ========================================================= */

.bvreg-contract {
    position: relative;
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    align-items: flex-start;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(255, 7, 135, .18);
    border-radius: 15px;
    background: #fff8fc;
    color: var(--bvauth-soft);
    font-size: .63rem;
    line-height: 1.5;
    cursor: pointer;
}

    .bvreg-contract input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.bvreg-contract__check {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border: 1px solid var(--bvauth-border);
    border-radius: 7px;
    background: #ffffff;
    color: transparent;
}

.bvreg-contract input:checked + .bvreg-contract__check {
    border-color: var(--bvauth-accent);
    background: var(--bvauth-accent);
    color: #ffffff;
}

.bvreg-contract input:focus-visible + .bvreg-contract__check {
    box-shadow: 0 0 0 4px var(--bvauth-accent-soft);
}

.bvreg-contract a {
    color: var(--bvauth-accent);
    font-weight: 850;
    text-decoration: none;
}

    .bvreg-contract a:hover {
        text-decoration: underline;
    }

/* =========================================================
   MODAL DE CIDADE
   ========================================================= */

.bvreg-city-dialog {
    width: min(calc(100% - 32px), 600px);
    max-width: 600px;
    height: min(720px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #ffffff;
    color: var(--bvauth-text);
    box-shadow: var(--bvauth-shadow);
}

    .bvreg-city-dialog::backdrop {
        background: rgba(15, 17, 23, .62);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

.bvreg-city-dialog__surface {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--bvauth-border);
    border-radius: inherit;
    background: #ffffff;
}

.bvreg-city-dialog header {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 12px;
}

    .bvreg-city-dialog header > div {
        min-width: 0;
    }

    .bvreg-city-dialog header small {
        display: block;
        color: var(--bvauth-accent);
        font-size: .57rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .bvreg-city-dialog header h2 {
        margin: 4px 0 0;
        overflow-wrap: anywhere;
        color: var(--bvauth-text);
        font-size: 1.08rem;
        font-weight: 900;
        line-height: 1.2;
    }

    .bvreg-city-dialog header button {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 1px solid transparent;
        border-radius: 50%;
        background: #f1f2f5;
        color: var(--bvauth-soft);
        transition: border-color .18s ease, background-color .18s ease, color .18s ease;
    }

        .bvreg-city-dialog header button:hover,
        .bvreg-city-dialog header button:focus-visible {
            border-color: rgba(255, 7, 135, .2);
            background: var(--bvauth-accent-soft);
            color: var(--bvauth-accent);
        }

.bvreg-city-search {
    min-width: 0;
    min-height: 52px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid var(--bvauth-border);
    border-radius: 15px;
    background: #ffffff;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

    .bvreg-city-search:focus-within {
        border-color: rgba(255, 7, 135, .58);
        background: #fffafd;
        box-shadow: 0 0 0 4px var(--bvauth-accent-soft);
    }

    .bvreg-city-search > i {
        color: var(--bvauth-accent);
        font-size: .86rem;
        text-align: center;
    }

    .bvreg-city-search input {
        min-width: 0;
        width: 100%;
        height: 50px;
        padding: 0;
        border: 0;
        outline: 0;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        color: var(--bvauth-text);
        caret-color: var(--bvauth-accent);
        font-size: .78rem;
        font-weight: 600;
        line-height: normal;
    }

        .bvreg-city-search input::placeholder {
            color: #9da3ad;
            opacity: 1;
            font-weight: 500;
        }

        .bvreg-city-search input::-webkit-search-decoration {
            -webkit-appearance: none;
        }

.bvreg-city-results {
    min-width: 0;
    min-height: 0;
    margin-top: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.bvreg-city-start,
.bvreg-city-loading {
    min-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    padding: 24px 18px;
    color: var(--bvauth-soft);
    text-align: center;
}

    .bvreg-city-start > span {
        width: 50px;
        height: 50px;
        display: grid;
        place-items: center;
        border-radius: 15px;
        background: var(--bvauth-accent-soft);
        color: var(--bvauth-accent);
        font-size: .92rem;
    }

    .bvreg-city-start strong {
        color: var(--bvauth-text);
        font-size: .74rem;
        font-weight: 900;
    }

    .bvreg-city-start p {
        max-width: 320px;
        margin: 0;
        color: var(--bvauth-soft);
        font-size: .63rem;
        line-height: 1.45;
    }

    .bvreg-city-loading > i {
        color: var(--bvauth-accent);
        font-size: 1rem;
    }

.bvreg-city-result {
    width: 100%;
    min-height: 66px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid var(--bvauth-border-soft);
    border-radius: 0;
    background: #ffffff;
    color: var(--bvauth-text);
    text-align: left;
    transition: background-color .16s ease;
}

    .bvreg-city-result:hover,
    .bvreg-city-result:focus-visible {
        background: #fff8fc;
    }

    .bvreg-city-result:focus-visible {
        outline: 2px solid rgba(255, 7, 135, .34);
        outline-offset: -2px;
    }

    .bvreg-city-result__icon,
    .bvreg-city-result > span:first-child,
    .bvreg-city-result > img:first-child {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        flex: 0 0 44px;
        border-radius: 13px;
        background: var(--bvauth-accent-soft);
        color: var(--bvauth-accent);
    }

    .bvreg-city-result > img:first-child {
        display: block;
        object-fit: cover;
        object-position: center;
        border: 1px solid var(--bvauth-border-soft);
    }

    .bvreg-city-result > div {
        min-width: 0;
    }

    .bvreg-city-result strong,
    .bvreg-city-result small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bvreg-city-result strong {
        color: var(--bvauth-text);
        font-size: .72rem;
        font-weight: 850;
    }

    .bvreg-city-result small {
        margin-top: 4px;
        color: var(--bvauth-soft);
        font-size: .61rem;
        line-height: 1.35;
    }

    .bvreg-city-result > i {
        color: var(--bvauth-muted);
        font-size: .62rem;
        text-align: center;
    }

/* =========================================================
   VALIDAÇÃO
   ========================================================= */

.bvreg-validation {
    width: min(100%, 520px);
}

.bvreg-code-help {
    display: block;
    margin-top: -7px;
    color: var(--bvauth-soft);
    font-size: .61rem;
    text-align: center;
}

.bvreg-start-over {
    width: 100%;
    margin-top: 7px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--bvauth-soft);
    font-size: .64rem;
    font-weight: 850;
}

    .bvreg-start-over:hover {
        color: var(--bvauth-accent);
    }

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 781px) {
    .bvreg-panel {
        height: 100dvh;
        min-height: 0;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 780px) {
    .bvreg-panel {
        height: auto;
        min-height: 100dvh;
        max-height: none;
        padding-top: max(25px, env(safe-area-inset-top));
        overflow: visible;
    }

    .bvreg-card {
        width: min(100%, 540px);
    }

    .bvreg-header .bvauth-discover-trigger {
        margin-top: 15px;
    }

    /* A seleção de cidade vira uma tela dedicada no celular. */
    .bvreg-city-dialog {
        position: fixed;
        inset: 0;
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .bvreg-city-dialog__surface {
        width: 100%;
        height: 100dvh;
        max-height: none;
        padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .bvreg-city-search {
        margin-top: 16px;
    }

        .bvreg-city-search input {
            /* 16px evita zoom automático do iOS ao focar a busca. */
            font-size: 1rem;
        }

    .bvreg-city-results {
        margin-right: -6px;
        padding-right: 6px;
    }

    .bvreg-city-result {
        min-height: 70px;
        padding: 11px 6px;
    }
}

@media (max-width: 520px) {
    .bvreg-progress {
        margin-bottom: 16px;
    }

    .bvreg-channel {
        grid-template-columns: 1fr;
    }

        .bvreg-channel label > span {
            min-height: 78px;
        }

    .bvreg-city-confirm {
        align-items: stretch;
        flex-direction: column;
    }

        .bvreg-city-confirm button {
            width: 100%;
        }
}

@media (prefers-reduced-motion: reduce) {
    .bvreg-step.is-active {
        animation: none;
    }

    .bvreg-city,
    .bvreg-channel label > span {
        transition: none;
    }
}
