/* =========================================================
   LAYOUT GERAL
========================================================= */

.cadastro-page {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.cadastro-page__panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* =========================================================
   PAINEL ESQUERDO
========================================================= */

.cadastro-page__panel--left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    padding: 2rem;
    height: 100vh
}

.cadastro-left__card {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden; /* mantém a imagem dentro da curva */
    position: relative;
    box-shadow: 0px 12px 32px rgba(23, 81, 108, 0.18);
}

.cadastro-left__logo {
    width: 160px;
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.95;
}

.cadastro-left__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cadastro-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* =========================================================
   PAINEL DIREITO
========================================================= */

.cadastro-page__panel--right {
    padding: 2.5rem 3rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}

/* =========================================================
   BOX PRINCIPAL (FORM + SELEÇÃO)
========================================================= */

.cadastro-box {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    text-align: left;
}

.cadastro-box__title {
    margin-bottom: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--cor-secundaria);
    margin-bottom: 2rem;
}

/* =========================================================
   SELEÇÃO DO TIPO DE USUÁRIO
========================================================= */

.tipo-usuario {
    display: flex;
    width: 100%;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.tipo-usuario__btn {
    flex: 1;
    background-color: var(--cor-clara);
    border: 2px solid transparent;
    padding: 0.85rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    font-size: 0,95rem;
    font-weight: 500;
    font-family: var(--fonte-principal);
    white-space: nowrap;
    color: var(--cor-texto);
}

.tipo-usuario__icon {
    width: 28px;
    height: 28px;
}

.tipo-usuario__label {
    flex: 1;
}

/* =========================================================
   FORMULÁRIO
========================================================= */

.cadastro-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cadastro-form__label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 3px;
    margin-left: 4px;
    color: #5f6b73;
}

.cadastro-form__row {
    display: flex;
    gap: 1rem;
}

.cadastro-form__group {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.cadastro-form__group--nome {
    flex: 0.7;
}

.cadastro-form__group--sobrenome {
    flex: 1.3;
}

.cadastro-form__input {
    height: 46px;
    padding: 0 16px;
    border-radius: 24px;
    border: 1px solid var(--input-nao-clicado);
    font-size: 0.9rem;
    font-family: var(--fonte-principal);
    background-color: var(--cor-fundo);
    transition: border 0.2s, box-shadow 0.2s;
    color: var(--cor-texto);
}


.cadastro-form__input--whatsapp {
    max-width: 70%;
}

/* Campo de senha (com ícone do olho) */
.cadastro-form__password {
    position: relative;
    display: flex;
    align-items: center;
}

.cadastro-form__password .cadastro-form__input {
  padding-right: 34px;
}

.cadastro-form__toggle {
    width: 22px;
    height: 22px;
    position: absolute;
    right: 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.cadastro-form__toggle:hover {
  opacity: 1;
}

/* =========================================================
   BOTÃO SUBMIT
========================================================= */

.cadastro-form__submit {
    width: 100%;
    background-color: var(--cor-secundaria);
    color: #ffffff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 0.9rem;
    height: 48px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-radius: 24px;
    margin-top: 1.6rem;
    font-family: var(--fonte-principal);
}

/* =========================================================
   DIVIDER
========================================================= */

.cadastro-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0 0.9rem 0;
    color: #8b949a;
    font-size: 0.8rem;
}

.cadastro-divider::before,
.cadastro-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e6e6e6;
}

.cadastro-divider span {
    padding: 0 12px;
}

/* =========================================================
   GOOGLE
========================================================= */

/* Oculta o botão real do Google */
.g_id_signin {
  display: none !important;
}

#google_btn {
    transition: opacity 0.25s ease;
}

.cadastro-google {
    display: flex;
    justify-content: center;
}

.google-login-btn {
    width: 100%;
    height: 46px;
    border-radius: 24px;
    border: 1px solid #dadce0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    font-family: var(--fonte-principal);
    color: var(--cor-texto);
}

.google-login-btn:hover {
    background: #f7f7f7;
}

.google-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.google-icon {
    width: 18px;
}

.fade-out {
opacity:0;
pointer-events:none;
transition:0.25s;
}

.cadastro-aviso-google {

  background: rgba(33,150,243,0.08);
  border: 1px solid rgba(33,150,243,0.25);

  padding: 14px 16px;
  margin-bottom: 20px;

  border-radius: 8px;

  font-size: 14px;
  line-height: 1.4;

}

/* =========================================================
   TERMOS
========================================================= */

.cadastro-form__checkbox {
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cadastro-form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cadastro-form__checkbox a {
    color: var(--cor-primaria); /* Mantém coerência com o design */
    font-weight: 600;
    text-decoration: none;
}

.cadastro-form__checkbox a:hover {
    opacity: 0.8;
}

.cadastro-form__checkbox a:active {
    opacity: 0.6;
}

.cadastro-form__checkbox label {
    line-height: 1.4;
    cursor: pointer;
}

/* =========================================================
   ERROS
========================================================= */

.erro-campo {
    color: #FF4D4D;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
    min-height: 14px; /* evita o layout "pular" */
    padding-left: 4px;
    font-weight: 500;
}

.cadastro-form__input.erro {
    border-color: #FF4D4D !important;
    box-shadow: 0 0 0 3px rgba(195, 50, 50, 0.15);
}

/* =========================================================
   INTERAÇÕES & HOVERS
========================================================= */

/* BOTÕES DE TIPO DE USUÁRIO */
.tipo-usuario__btn:hover {
    border-color: var(--cor-primaria);
    box-shadow: 0 6px 18px rgba(23, 81, 108, 0.15);
    transform: translateY(-2px);
}

.tipo-usuario__btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(23, 81, 108, 0.12);
}

.tipo-usuario__btn.ativo {
    border-color: var(--cor-secundaria);
    background-color: #E8F7F3;
    box-shadow: 0 6px 18px rgba(67, 170, 139, 0.25);
    color: var(--cor-secundaria);
}

/* INPUTS */
.cadastro-form__input:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(23, 81, 108, 0.15);
    outline: none;
}

/* BOTÃO SUBMIT */
.cadastro-form__submit:hover {
    background-color: #133d52;
}

.cadastro-form__submit:active {
    transform: scale(0.98);
}

/* LINKS */
.cadastro-form__checkbox a:hover {
    text-decoration: underline;
}

/* CHECKBOX */
.cadastro-form__checkbox label:hover {
    opacity: 0.8;
}

/* ÍCONE DO "OLHO" (senha) */
.cadastro-form__toggle:active {
    transform: scale(1.1);
}

/* ===============================
   SPINNER DO BOTÃO
================================ */

#criar_conta_btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Oculta o spinner inicialmente */
#criar_conta_btn .btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

/* Animação */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Quando o botão está carregando */
#criar_conta_btn.loading .btn-text {
    display: none;
}

#criar_conta_btn.loading .btn-spinner {
    display: inline-block;
}

.hidden{
display:none;
}

.btn-email{
width:100%;
height:46px;
border-radius:24px;
border:1px solid var(--input-nao-clicado);
background:white;
font-family:var(--fonte-principal);
font-size:0.95rem;
cursor:pointer;
transition:0.2s;
font-weight: 500;
}

.btn-email:hover{
background:#f7f7f7;
}

.cadastro-metodos{
display:flex;
flex-direction:column;
gap:10px;
}

/* ===============================
   RESPONSIVIDADE - TABLET
================================ */

@media (max-width: 1130px) {
     /* Painel esquerdo vira bloco sólido */
    .cadastro-page__panel--left {
        padding: 1.5rem;
        flex: 1;
    }
    

    .cadastro-left__card {
        background: linear-gradient(145deg, #0d1e26, #1f4254);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .cadastro-page__panel--right {
        flex: 3; /* parte maior */
    }

    /* Remove a imagem de background */
    .cadastro-left__image {
        display: none;
    }

    /* Centraliza o logo verticalmente e horizontalmente */
    .cadastro-left__logo {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        
        opacity: 1;
        padding: 2rem;
    }

    .cadastro-page__panel--left {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* remove espaço roxo lateral */
        justify-content: flex-start; /* remove espaçamento vertical */
        padding: 1.5rem; /* opcional, mas geralmente desejado */
        box-sizing: border-box;
    }

    /* Agora o card ocupa TODO o espaço do painel */
    .cadastro-left__card {
        width: 100%;
        height: calc(100vh - 3rem); /* permite altura natural — remove estouro */
        padding: 1rem 0; /* pode ajustar */
        box-sizing: border-box; /* mantém layout correto */
    }

    .cadastro-box__title {
        font-size: 1.9rem;
        margin-bottom: 1.4rem;
    }

    .tipo-usuario {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .tipo-usuario__btn {
        padding: 0.8rem 0.9rem;
        font-size: 0.95rem;
        gap: 0.4rem;
    }

    .tipo-usuario__icon {
        width: 30px;
        height: 30px;
    }

    .cadastro-form {
        gap: 0.8rem;
    }

    .cadastro-form__label {
        font-size: 0.85rem;
        margin-left: 0.4rem;
    }

    .cadastro-form__row {
        gap: 0.8rem;
    }

    .cadastro-form__input {
        padding: 0.75rem 0.9rem; /* antes: 0.875rem 1rem */
        font-size: 0.85rem;      /* antes: 0.9rem */
    }

    .cadastro-form__password .cadastro-form__input {
        padding-right: 43px;
    }

    .cadastro-form__toggle {
        right: 12px;             /* antes: 14px */
        width: 20px;             /* antes: 22px */
        height: 20px;
    }

    .cadastro-form__checkbox {
        font-size: 0.8rem;       /* antes: 0.9rem */
        gap: 0.4rem;
    }

    .cadastro-form__checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .cadastro-form__submit {
        font-size: 1.05rem;      /* antes: 1.2rem */
        padding: 0.8rem;         /* antes: 0.9rem */
        margin-top: 1.2rem;      /* antes: 1.5rem */
    }

    #criar_conta_btn .btn-spinner {
        width: 18px;             /* antes: 20px */
        height: 18px;
        border-width: 2.5px;
    }
}

/* ===============================
   RESPONSIVIDADE - MOBILE
================================ */

@media (max-width: 768px) {
    .cadastro-page {
        flex-direction: column-reverse;
        height: auto;
        overflow: visible;
    }

    .cadastro-page__panel--left {
        height: auto;
        padding: 1rem 1.2rem;
        order: 1;
    }

    .cadastro-left__card {
        height: auto;
        border-radius: 16px;
    }

    .cadastro-left__logo {
        width: 100px;
        padding: 0;
    }

    .cadastro-page__panel--right {
        padding: 1.8rem 1.2rem;
        align-items: center;
    }

    .cadastro-box {
        max-width: 100%;
        padding: 0 1.5rem;
    }

    .cadastro-box__title {
        font-size: 1.75rem;
        margin-bottom: 1.2rem;
        text-align: center;
    }

    .cadastro-form__row {
        flex-direction: column;
        gap: 0.6rem;
    }

    .cadastro-form__input--whatsapp {
        max-width: 100%;
    }

    .tipo-usuario {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1.4rem;
    }

    .tipo-usuario_btn {
        flex: 0 0 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        padding: 0.9rem 1rem;
        border-radius: 16px;
        white-space: normal;
        text-align: center;
        min-height: 60px; 
        font-size: 1rem;
    }

    .tipo-usuario__label {
        flex: auto;     
        display: inline-block;
        text-align: center;
        line-height: 1.2;
        font-size: 1rem;
    }

    .tipo-usuario__icon {
        width: 30px;
        height: 30px;
        flex: 0 0 auto;     /* ícone fixo */
        display: block;
    }

    .cadastro-form {
        gap: 0.75rem;
    }

    .cadastro-form__row {
        flex-direction: column;
        gap: 0.6rem;
    }

    .cadastro-form__label {
        font-size: 0.85rem;
    }

    .cadastro-form__input {
        padding: 0.78rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }

    .cadastro-form__input--whatsapp {
        max-width: 100%;
    }

    .cadastro-form__password {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

    .cadastro-form__password .cadastro-form__input {
        padding-right: 45px;
    }

    .cadastro-form__toggle {
        width: 20px;
        height: 20px;
        left: 200px;
    }

    /* CHECKBOX (TERMOS) */
    .cadastro-form__checkbox {
        font-size: 0.82rem;
        gap: 0.45rem;
        margin-top: 0.4rem;
        line-height: 1.3;
    }

    .cadastro-form__checkbox input[type="checkbox"] {
        width: 17px;
        height: 17px;
    }

    /* BOTÃO SUBMIT */
    .cadastro-form__submit {
        font-size: 1.05rem;
        padding: 0.9rem;
        border-radius: 20px;
        margin-top: 1.1rem;
    }

     #criar_conta_btn .btn-spinner {
        width: 18px;
        height: 18px;
        border-width: 2.5px;
    }
}
