:root {
    --move-wrapper-factor: 0;
    --transition: cubic-bezier(.7, 0, .2, 1);
}


/* FORM  */

#form_trigger {
    position: absolute;
    left: 26.5%;
    bottom: 43%;
    width: 18%;
    height: 19%;
    min-width: 100px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 100px);
    z-index: 1000;
    opacity: 0.99;
}


#main_form {
    position: absolute;
    top: 0%;
    left: 0%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 100%;
    width: clamp(400px, 50vw, 600px);
    height: 100dvh;
    height: 100vh;
    max-width: 600px;
    background: radial-gradient(479.63% 143.99% at 100% 0%, #7F34C2 0%, #2E1D61 77.06%, #1A1140 100%);
    border-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    z-index: 2000;

    transform: translate3d(-500%, 0, 1000px);
    transition: all 0.8s var(--transition);
}

#main_form.active {
    transform: translate3d(0%, 0, 1000px);
}

#form_bg_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.5s ease;
}


#main_form.active ~ #form_bg_overlay {
    z-index: 10;
    opacity: 1;
    transition-delay: 0.8s;
}


#close_form {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 3%;
    left: 7%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    z-index: 5000;
}

#close_form svg {
    width: 60%;
    height: 60%;
}


#tabs_wrapper {
    width: 80%;
    margin: auto;
    display: grid;
    grid-auto-flow: row;
    grid-auto-rows: 100%;
    height: 100%;

    
    transform: translateY(var(--move-wrapper-factor));
    transition: all 1s var(--transition) ;
}


fieldset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border: none;
    max-height: 100%;
    opacity: 0;
    transform: translateY(1%);
    transition: all 0.5s var(--transition) ;
}

fieldset.inView {
    transform: translateY(0);
    opacity: 1;
}


fieldset > * {
    margin-bottom: 8px;
}

fieldset i {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    opacity: 0.5;
}

fieldset h2 {
    color: #fff;
    font-size: clamp(30px, 3vw, 40px);
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 500;
    font-style: normal;
    max-width: 17ch;
}

fieldset a {
    font-size: clamp(18px, 1.5vw, 25px);
    font-weight: 500;
    color: #fff;
    margin: 16px 0;
    text-decoration: none;
}

fieldset a:hover,
fieldset a:focus,
fieldset a:active {
    text-decoration: underline;
}

fieldset input,
fieldset textarea {
    font-family: "Montserrat", sans-serif;
    width: 90%;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #8A74C6;
    color: #fff;
    font-weight: 400;
    font-size: clamp(16px, 1.3vw, 20px);
    padding: 1ch;
    margin: 16px 0;
}

fieldset textarea {
    height: 25%;
    font-size: 16px;
}

fieldset input:focus,
fieldset textarea {
    outline: none;
}

fieldset input::placeholder {
    font-size: clamp(16px, 1.7vw, 25px);
    font-weight: 300;
    color: #fff;
    opacity: 0.5;
}
fieldset textarea::placeholder {
    font-weight: 300;
    color: #fff;
    opacity: 0.5;
}


.form_nav_btns {
    display: flex;
    flex-wrap: wrap;
}

.btn_next,
#submit_btn {
    display: block;
    font-size: clamp(16px, 1.3vw, 20px);
    font-weight: 400;
    padding: 1ch 6ch;
    border: none;
    border-radius: 5rem;
    margin-top: 16px;
    cursor: pointer;
    text-transform: capitalize;
    background-color: #fff;
    color: #000;
}

.btn_next:disabled {
    cursor: not-allowed;
}

.btn_prev {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 4px;
    align-items: center;

    font-size: clamp(16px, 1.3vw, 20px);
    font-weight: 300;
    padding: 1ch 2ch;
    text-transform: capitalize;
    color: #fff;
    background-color: transparent;

    border: none;
    border-radius: 5px;
    margin-top: 1ch;
    cursor: pointer;

    opacity: 0.5;
}

.btn_prev:hover,
.btn_prev:focus {
    opacity: 1;
}

.btn_prev svg {
    width: 25px;
    height: 25px;
}

.btn_prev svg path {
    fill: #fff;
}


fieldset:first-of-type .btn_prev {
    display: none;
}
fieldset:last-of-type .btn_next {
    display: none;
}


.multi_choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 90%;
    margin: 16px 0;
}

.custom_checkbox {
    display: flex;
    cursor: pointer;
}

.custom_checkbox input {
    display: none;
}

.custom_checkbox span {
    display: block;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    text-align: center;

    padding: 1.5ch 0;
    color: #fff;
    border: 1px solid #8A74C6;
    background-color: transparent;
    transition: all 0.65s ease;
    border-radius: 5px;
}

.custom_checkbox input:checked ~ span {
    background-color: #8A74C6;
}

.multi_choice input {
    padding: 0;
    margin: 0;
    width: 100%;
    font-size: 16px;
}

.multi_choice input::placeholder {
    font-size: 16px;
}

.two_inputs {
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    margin: 16px 0;
}



#processing_form_wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(479.63% 143.99% at 100% 0%, #7F34C2 0%, #2E1D61 77.06%, #1A1140 100%);
    border-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 250;

    opacity: 0;
    transition: all 0.5s var(--transition);

    user-select: none;
    pointer-events: none;
    touch-action: none;
}

#processing_form_wrapper.show {
    opacity: 1;
    pointer-events: all;
    touch-action: auto;
}

#processing_form_wrapper p {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-top: 2ch;
    max-width: 70%;
    text-align: center;
}

.processing_animation {
  width: 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.processing_animation span {
  width: 10px;
  height: 40px;
  background: #eee;
  border-radius: 1px;
  bottom: 0;
}
.processing_animation span:first-of-type {
  margin-top: 0;
}
.processing_animation span:nth-child(1) {
  animation: animationTest 1.3s infinite ease-in-out;
}
.processing_animation span:nth-child(2) {
  animation: animationTest 1.3s infinite ease-in-out;
  animation-delay: 0.2s;
}
.processing_animation span:nth-child(3) {
  animation: animationTest 1.3s infinite ease-in-out;
  animation-delay: 0.4s;
}


@keyframes animationTest {
  0% {
    height: 8px;
    opacity: 0.6;
  }
  50% {
    height: 40px;
    opacity: 1;
  }
  100% {
    height: 8px;
    opacity: 0.6;
  }
}


#rotate_device_message {
    display: none;
}


@media screen and (max-width: 760px) {
    #main_form {
        width: 100vw;
        border-radius: 0;
    }
}

@media screen and (orientation: portrait) {
    #video_wrapper, #main_form, #form_trigger {
        filter: brightness(0.1);
        animation: removeFilter 2s 5s ease forwards;
    }

    #rotate_device_message {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        
        min-width: 100px;
        aspect-ratio: 1 / 1;
        padding: 16px;
        border-radius: 50%;
        background-color: #000;

        z-index: 300;
        animation: removeGuide 2s 5s ease forwards;
    }


    #rotate_device_message p {
        font-size: calc(13px, 1.5vw, 20px);
        font-weight: 400;
        color: #fff;
        text-align: center;
        max-width: 10ch;
        margin-top: 16px;
    }

    #rotate_device_message svg {
        animation: rotateSvg 2s var(--transition) infinite;
    }

    @keyframes rotateSvg {
        0% {
            opacity: 0.3;
            rotate: 0deg;
        }
        50% {
            opacity: 1;
            rotate: 90deg;
        }
        100% {
            opacity: 0.3;
            rotate: 0deg;
        }
    }

    @keyframes removeGuide {
        0% {
            opacity: 1;
            display: flex;
        }
        50% {
            opacity: 0;
        }
        100% {
            opacity: 0;
            display: none;
        }
    }
    @keyframes removeFilter {
        0% {
            filter: brightness(0.1);
        }
        100% {
            filter: brightness(1);
        }
    }
}


@media screen and (orientation: portrait) {

    #video_wrapper #video {
        position: absolute;
        -webkit-transform: rotate(90deg);
        -moz-transform: rotate(90deg);
        transform: rotate(90deg);

        -webkit-transform-origin: bottom left;
        -moz-transform-origin: bottom left;
        transform-origin: bottom left;
        width: 100vh;
        height: 100vw;
        margin-top: -100vw;
        object-fit: cover;

        z-index: 4;
        visibility: visible;
    }

    #form_trigger {
        top: 26.5%;
        left: 44%;
        bottom: unset;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        z-index: 100;
    }
}