dialog.modal::backdrop {
    background: rgba(1, 1, 1, .5);
    backdrop-filter: blur(8px);
}

dialog.modal {
    width: 90%;
    /* max-width: 500px; */
    width: 100%;
    margin: auto;
    inset: 0;
    z-index: 10;
    border: none;
    background-color: transparent;
    position: fixed;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
    /* overflow: hidden; */
}

.login, .signup {
    display: none;
    max-width: 400px;
    height: 100%;
    padding: 2px;
    margin: auto;
    background: var(--color-two);
    background: radial-gradient(125% 125% at 50% 10%, #fff 20%, #63e 100%);
    border-radius: 16px;
    z-index: 11;
    position: relative;
}
   

.login__form, .signup__form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: radial-gradient(200% 125% at 8% 10%, var(--color-three), var(--color-dark), var(--color-dark));
    box-shadow: inset 0 10px 30px rgb(0 0 0 / 24%);
    padding: 1rem;
    border-radius: 15px;
}

.login__form{
    gap: 2rem;
}

.modal[open] {
    opacity: 1;
    visibility: visible;
}

.modal[open]::backdrop {
    animation: overlay-in 1s both;
}

.modal[open] .login, 
.modal[open] .signup {
    opacity: 1;
    visibility: visible;
    animation: modalIn 1s;
}

.login__header,
.signup__header {
    width: 100%;
    text-align: center;
    position: relative;
    padding-top: 1rem;
}

.modal__close{
    position: absolute;
    top: 0;
    right: 0;
    text-decoration: none;
    margin-bottom: 2rem;
}

.close-icon{
    width: 30px;
}

.login__logo-name,
.signup__logo-name {
    font-family: 'Now-font';
    font-size: 5rem;
    font-weight: 300;
    color: transparent;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: #fff;
    transition: transform .5s;
    cursor: pointer;
}

.login__logo-name:hover,
.signup__logo-name:hover {
    transform: scale(1.05);
}

.login__title,
.signup__title {
    text-align: center;
    color: #fff;
    font-weight: 400;
}

.login__input,
.signup__input {

    position: relative;

    & input {
        width: 100%;
        height: 60px;
        border-radius: 30px;
        font-size: 16px;
        outline: 0;
        border: 1px solid var(--color-three);
        background-color: transparent;
        padding: 1.5rem 1.5rem 0;
        /* font-size: 16px; */
    }

    & label {
        padding-inline: 4px;
        pointer-events: none;
        background: transparent;
        color: #ccc9cc;
        position: absolute;
        left: 18px;
        top:32%;
        transition: all .3s;
    }

    & input::placeholder {
        color: transparent;
    }

    & input:focus-visible {
        border: 1px solid var(--color-four);
    }

    & input:focus-visible+label {
        transform: translateY(-9px);
        font-size: 14px;
        color: var(--color-four);
        /* transform: scale(.7); */
    }

    & input:not(:placeholder-shown)+label {
        transform: translateY(-9px);
        font-size: 14px;
    }
}

.login__buttons,
.signup__buttons {
    display: flex;
    gap: 1.5rem;
}

.login__info-password,
.signup__info-password {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-inline: 1rem;

    & a {
        text-decoration: none;
        color: #ccc9cc;
    }

    & .login__password-new {
        font-style: italic;
        transition: text-decoration .3s;
    }

    & .login__password-new:hover {
        text-decoration: underline;
    }

}

.signup__info-password{
    justify-content: flex-start;
}

.btn-login-form,
.btn-signup-form {
    border: none;
    text-align: center;
    font-size: 16px;
    padding: 1rem;
    border-radius: 24px;
    color: #ffffffed;
    width: 100%;
    min-width: max-content;
}

.login__or {
    border: 1px solid #ccc;
    border-radius: 10px;
    position: relative;
    width: 90%;
    margin: 0 auto;

    &::before {
        position: absolute;
        content: 'Ó Iniciar con';
        top: -12px;
        right: 30%;
        background-color: #06090f;
        padding: 0 10px;
    }
}

.login__social {
    width: 100%;
    display: flex;
    gap: 1rem;
}

.btn__social {
    width: 100%;
    background: transparent;
    border: 1px solid var(--color-three);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn__icon-social {
    width: 20px;
    color: #ccc;
}

.login__signup,
.signup__login {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.login__link,
.signup__link {
    display: flex;
    gap: .3rem;
    color: #fff;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: text-decoration .3s;

    & svg {
        width: 24px;
    }

    &:hover {
        text-decoration: underline;
    }

}

/* .login__or span {

    position: relative;
    text-transform: uppercase;

    &::before {
        content: "";
        width: 30px;
        height: 2px;
        background-color: #ccc9cc;
        position: absolute;
        left: 0;
        top: 0;
    }
} */




@keyframes overlay-in {
    0% {
        scale: 0 0.004;
    }

    33% {
        scale: 1 0.004;
    }

    66%,
    100% {
        scale: 1 1;
    }
}

@keyframes modalIn {

    0%,
    66% {
        opacity: 0;
        visibility: hidden;
        translate: -50% -40%;
    }

    100% {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes fadeOut {
    0%{
        opacity: 1;
        transform: rotate(5deg) translateX(0);
    }
    0%{
        opacity: 1;
        transform: rotate(-15deg) translateX(-100%);
    }
}

@keyframes fadeIn {
    0%{
        opacity: 0;
        transform: rotate(15deg) translateX(100%);
    }
    0%{
        opacity: 1;
        transform: rotate(0deg) translateX(0);
    }
}

@keyframes shake {
    0% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(4deg);
    }

    50% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0);
    }
}

