@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --vanza-primary: #d96537;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: rgb(27, 27, 27);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(94, 94, 94, .35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .3px;
    margin: 20px 0;
}

.container span {
    font-size: 12px;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button {
    background-color: var(--vanza-primary);
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.container button:hover:not(:disabled) {
    filter: brightness(1.1);
}

.container button.hidden {
    background-color: transparent;
    border-color: #fff;
}

.container button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.container input:focus {
    box-shadow: 0 0 0 2px var(--vanza-primary);
}

/* LOGIN */

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all .6s ease-in-out, opacity .18s ease;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in {
    transform: translateX(100%);
}

/* CADASTRO */

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move .6s;
}

@keyframes move {
    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

/* ÍCONES SOCIAIS */

ul {
    list-style: none;
}

.example-2 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.example-2 .icon-content {
    margin: 0 8px;
    position: relative;
}

.example-2 .icon-content .tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 6px 10px;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    font-size: 12px;
    transition: all .3s ease;
    white-space: nowrap;
}

.example-2 .icon-content:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -45px;
}

.example-2 .icon-content a {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: 20%;
    color: #4d4d4d;
    background-color: #fff;
    border: 1px solid #ccc;
    transition: all .3s ease-in-out;
    margin: 0;
}

.example-2 .icon-content a:hover {
    color: #fff;
    box-shadow: 3px 2px 35px 0 rgb(0 0 0 / 35%);
}

.example-2 .icon-content a i {
    position: relative;
    z-index: 1;
    font-size: 22px;
}

.example-2 .icon-content a .filled {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #000;
    transition: all .3s ease-in-out;
}

.example-2 .icon-content a:hover .filled {
    height: 100%;
}

/* Google era vermelho: agora usa a cor definida pelo Admin */
.example-2 .icon-content a[data-social="google"] .filled,
.example-2 .icon-content a[data-social="google"] ~ .tooltip {
    background-color: var(--vanza-primary);
}

.example-2 .icon-content a[data-social="phone"] .filled,
.example-2 .icon-content a[data-social="phone"] ~ .tooltip {
    background-color: #2ecc71;
}

.example-2 .icon-content a[data-social="facebook"] .filled,
.example-2 .icon-content a[data-social="facebook"] ~ .tooltip {
    background-color: #1877f2;
}

.example-2 .icon-content a[data-social="apple"] .filled,
.example-2 .icon-content a[data-social="apple"] ~ .tooltip {
    background-color: #000;
}

/* INPUTS */

.input-wrapper {
    position: relative;
    width: 100%;
    margin: 8px 0;
}

.input-wrapper input {
    width: 100%;
    padding-left: 45px !important;
    padding-right: 45px !important;
    margin: 0 !important;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #777;
    z-index: 5;
}

.toggle-password {
    position: absolute !important;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    z-index: 5;
}

.toggle-password:hover {
    color: var(--vanza-primary);
}

/* CHECKBOX */

.checkbox-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.checkbox-row span {
    text-align: left;
    margin: 0;
    line-height: 16px;
}

.checkbox-row a {
    margin: 0;
    font-size: 12px;
    text-decoration: underline;
}

.checkbox-row a:hover {
    color: var(--vanza-primary);
}

.checkmark {
    display: block;
    width: 26px;
    height: 26px;
    background-color: #ddd;
    border-radius: 8px;
    position: relative;
    transition: background-color .4s;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--vanza-primary);
}

.checkmark::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%) rotateZ(40deg) scale(10);
    opacity: 0;
    transition: all .4s;
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    opacity: 1;
    transform: translate(-50%, -50%) rotateZ(40deg) scale(1);
}

/* PAINEL PRINCIPAL */

.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all .6s ease-in-out;
    border-radius: 20px;
    z-index: 1000;
}

.container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 20px;
}

.toggle {
    background-color: var(--vanza-primary);
    height: 100%;
    color: #fff;
    position: relative;
    left: -100%;
    width: 200%;
    transform: translateX(0);
    transition: all .6s ease-in-out;
}

.container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all .6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

/* TELAS INTERNAS */

.auth-code,
.forgot-password,
.loading-screen {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.container.auth .sign-in,
.container.auth .sign-up,
.container.auth .forgot-password,
.container.loading .sign-in,
.container.loading .sign-up,
.container.loading .forgot-password,
.container.loading .auth-code {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.container.auth .auth-code {
    opacity: 1;
    pointer-events: all;
    z-index: 999;
    transform: none !important;
}

.container.active.auth .auth-code {
    transform: translateX(100%) !important;
}

.container.forgot .sign-in {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transform: none !important;
}

.container.forgot .forgot-password {
    opacity: 1;
    pointer-events: all;
    z-index: 999;
    transform: none !important;
}

.container.loading .loading-screen {
    opacity: 1;
    pointer-events: all;
    z-index: 999;
    transform: none !important;
}

.container.active.loading .loading-screen {
    transform: translateX(100%) !important;
}

/* CÓDIGO */

.auth-inputs {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
}

.auth-inputs input {
    width: 42px;
    height: 48px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 0;
}

/* LOADER */

.loader {
    width: fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

.truckWrapper {
    width: 200px;
    height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-end;
    overflow-x: hidden;
}

.truckBody {
    width: 130px;
    margin-bottom: 6px;
    animation: motion 1s linear infinite;
}

.trucksvg path:first-child {
    fill: var(--vanza-primary) !important;
}

@keyframes motion {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }

    100% {
        transform: translateY(0);
    }
}

.truckTires {
    width: 130px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 15px;
    position: absolute;
    bottom: 0;
}

.truckTires svg {
    width: 24px;
}

.road {
    width: 100%;
    height: 1.5px;
    background-color: #282828;
    position: relative;
    bottom: 0;
    border-radius: 3px;
}

.road::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 100%;
    background-color: #282828;
    right: -50%;
    border-radius: 3px;
    animation: roadAnimation 1.4s linear infinite;
    border-left: 10px solid #fff;
}

.road::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 100%;
    background-color: #282828;
    right: -65%;
    border-radius: 3px;
    animation: roadAnimation 1.4s linear infinite;
    border-left: 4px solid #fff;
}

@keyframes roadAnimation {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-350px);
    }
}

/* ALERTAS */

.form-alert {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: all .2s ease;
    opacity: 1;
}

.form-alert.error {
    background: var(--vanza-primary);
    color: #fff;
    border: 1px solid var(--vanza-primary);
}

.form-alert.success {
    background: #e7fff2;
    color: #00a65a;
    border: 1px solid #8ff0b7;
}

/* REENVIAR CÓDIGO */

.resend-code-area {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.resend-code-area[hidden] {
    display: none;
}

.resend-code-area span {
    color: #777;
    font-size: 11px;
    margin: 0;
}

.container button.resend-code {
    background: transparent;
    color: var(--vanza-primary);
    border: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: underline;
    box-shadow: none;
}

.container button.resend-code:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

.container button.resend-code:not(:disabled):hover {
    color: var(--vanza-primary);
    filter: brightness(1.1);
}

/* DESKTOP */

@media (min-width: 901px) {
    .container.reversing .sign-up {
        opacity: 1;
        z-index: 5;
        animation: reverseSignUp .6s forwards;
    }

    .container.reversing .sign-in {
        animation: reverseSignIn .6s forwards;
    }

    @keyframes reverseSignUp {
        0%,
        49.99% {
            opacity: 1;
            z-index: 5;
        }

        50%,
        100% {
            opacity: 0;
            z-index: 1;
        }
    }

    @keyframes reverseSignIn {
        0%,
        49.99% {
            opacity: 0;
            z-index: 1;
        }

        50%,
        100% {
            opacity: 1;
            z-index: 2;
        }
    }
}

/* MOBILE / TABLET */

@media (max-width: 900px) {
    body {
        padding: 0;
        height: 100vh;
        overflow: hidden;
    }

    .container {
        --mobile-form-height: 64%;
        --mobile-panel-height: 36%;
        --mobile-form-shift: 56.25%;
        --mobile-panel-shift: -177.7778%;

        width: 100%;
        max-width: 100%;
        height: 100vh;
        min-height: 100vh;
        border-radius: 0;
    }

    .form-container {
        left: 0;
        top: 0;
        width: 100%;
        height: var(--mobile-form-height);
        transition: transform .6s ease-in-out;
    }

    .sign-in,
    .sign-up,
    .auth-code,
    .forgot-password,
    .loading-screen {
        top: 0;
        left: 0;
        width: 100%;
        height: var(--mobile-form-height);
    }

    .sign-in {
        opacity: 1;
        z-index: 2;
        transform: translateY(0);
    }

    .sign-up {
        opacity: 0;
        z-index: 1;
        transform: translateY(0);
        pointer-events: none;
    }

    .auth-code,
    .forgot-password,
    .loading-screen {
        opacity: 0;
        z-index: 1;
        pointer-events: none;
        transform: translateY(0);
    }

    .container form {
        padding: 7px 28px 6px;
        justify-content: center;
    }

    .container h1 {
        font-size: 23px;
        margin-bottom: 5px;
    }

    .container span {
        font-size: 11px;
        line-height: 14px;
        margin-bottom: 5px;
    }

    .container a {
        margin: 7px 0 4px;
    }

    .container button {
        padding: 9px 34px;
        margin-top: 5px;
    }

    .example-2 {
        margin: 6px 0;
    }

    .example-2 .icon-content {
        margin: 0 4px;
    }

    .example-2 .icon-content a {
        width: 34px;
        height: 34px;
    }

    .example-2 .icon-content a i {
        font-size: 20px;
    }

    .input-wrapper {
        margin: 5px 0;
    }

    .container input {
        padding: 10px 13px;
        margin: 0;
    }

    .input-wrapper input {
        padding-left: 42px !important;
        padding-right: 42px !important;
    }

    .checkbox-row {
        margin: 6px 0 3px;
    }

    .checkmark {
        width: 23px;
        height: 23px;
        border-radius: 7px;
    }

    .auth-inputs {
        margin: 10px 0;
        gap: 6px;
    }

    .auth-inputs input {
        width: 36px;
        height: 44px;
    }

    .container.active .sign-in {
        transform: translateY(var(--mobile-form-shift));
        opacity: 1;
        z-index: 2;
        pointer-events: none;
    }

    .container.active .sign-up {
        transform: translateY(var(--mobile-form-shift));
        opacity: 1;
        z-index: 5;
        pointer-events: all;
        animation: mobileMove .6s forwards;
    }

    @keyframes mobileMove {
        0%,
        49.99% {
            opacity: 0;
            z-index: 1;
        }

        50%,
        100% {
            opacity: 1;
            z-index: 5;
        }
    }

    .container.reversing .sign-up {
        opacity: 1;
        z-index: 5;
        pointer-events: none;
        animation: mobileReverseSignUp .6s .28s both;
    }

    .container.reversing .sign-in {
        opacity: 0;
        z-index: 1;
        pointer-events: none;
        animation: mobileReverseSignIn .6s .28s both;
    }

    @keyframes mobileReverseSignUp {
        0%,
        49.99% {
            opacity: 1;
            z-index: 5;
        }

        50%,
        100% {
            opacity: 0;
            z-index: 1;
        }
    }

    @keyframes mobileReverseSignIn {
        0%,
        49.99% {
            opacity: 0;
            z-index: 1;
        }

        50%,
        100% {
            opacity: 1;
            z-index: 2;
        }
    }

    .container.auth .sign-in,
    .container.auth .sign-up,
    .container.auth .forgot-password {
        opacity: 0;
        pointer-events: none;
        z-index: 1;
    }

    .container.auth:not(.active) .auth-code {
        opacity: 1;
        z-index: 999;
        pointer-events: all;
        transform: none !important;
    }

    .container.active.auth .auth-code {
        transform: translateY(var(--mobile-form-shift)) !important;
        opacity: 1;
        z-index: 999;
        pointer-events: all;
    }

    .container.active.auth .auth-code form {
        justify-content: center;
        padding-top: 8px;
    }

    .container.forgot .sign-in {
        opacity: 0;
        pointer-events: none;
        z-index: 1;
    }

    .container.forgot .forgot-password {
        opacity: 1;
        pointer-events: all;
        z-index: 999;
        transform: none !important;
    }

    .container.loading .auth-code {
        opacity: 0;
        pointer-events: none;
    }

    .container.loading .loading-screen {
        opacity: 1;
        pointer-events: all;
        z-index: 999;
        transform: none !important;
    }

    .container.active.loading .loading-screen {
        transform: translateY(var(--mobile-form-shift)) !important;
    }

    .toggle-container {
        top: var(--mobile-form-height);
        left: 0;
        width: 100%;
        height: var(--mobile-panel-height);
        border-radius: 30px 30px 0 0;
        transition: all .6s ease-in-out;
    }

    .container.active .toggle-container,
    .container.active.auth .toggle-container,
    .container.active.loading .toggle-container {
        transform: translateY(var(--mobile-panel-shift));
        border-radius: 0 0 30px 30px;
    }

    .toggle {
        top: -100%;
        left: 0;
        width: 100%;
        height: 200%;
        transform: translateY(0);
        transition: all .6s ease-in-out;
    }

    .container.active .toggle,
    .container.active.auth .toggle,
    .container.active.loading .toggle {
        transform: translateY(50%);
    }

    .toggle-panel {
        width: 100%;
        height: 50%;
        padding: 18px 28px 10px;
    }

    .toggle-panel h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .toggle-panel p {
        font-size: 11px;
        line-height: 14px;
        margin: 5px 0;
    }

    .toggle-panel button {
        padding: 7px 24px;
        margin-top: 4px;
        pointer-events: auto;
    }

    .toggle-left {
        top: 0;
        width: 100%;
        height: 50%;
        transform: translateY(-200%);
        z-index: 2;
    }

    .container.active .toggle-left {
        transform: translateY(0);
    }

    .toggle-right {
        top: 50%;
        right: auto;
        width: 100%;
        height: 50%;
        transform: translateY(0);
        z-index: 3;
    }

    .resend-code-area {
        margin-top: 7px;
        min-height: 36px;
    }

    .resend-code-area span {
        font-size: 10px;
    }

    .container button.resend-code {
        padding: 0;
        margin: 0;
        font-size: 11px;
    }
}