@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

.ar-studio-tryon-button {
    width: 110px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: #0d0d0d;
    border: none;
    border-radius: 1px;
    font-family: inherit;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 250ms ease-in-out;

    &:hover {
        transform: scale(1.01);
    }
}

.ar-studio-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.ar-studio-image-highlighter {
    cursor: pointer !important;
    position: relative;
    transition: box-shadow 250ms ease, outline 250ms ease;
    outline: 3px solid yellow !important;
    box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.6);
}

.ar-studio-image-highlighter::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 4px;
    box-shadow: 0 0 20px 16px rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 250ms ease;
    z-index: -1;
}

.ar-studio-image-highlighter:hover::before,
.ar-studio-image-highlighter.active::before {
    opacity: 1;
}

.ar-studio-image-highlighter:hover,
.ar-studio-image-highlighter.active {
    outline-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.9);
}




.ar-studio-tryon-modal-class {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(.48, 1.5, .61, 1), opacity 0.28s;
    width: 95vw;
    height: 95vh;
    max-width: 1400px;
    z-index: 999999999;
    /* max-width: 1300px; */
    pointer-events: all;
    border-radius: 10px;

    &::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 2.5px;

        z-index: 2;
        background: linear-gradient(45deg,
                #ff3a82, #4ecdc4, #5233ff, #96ceb4,
                #ffeaa7, #dda0dd, #98d8c8);
        background-size: 400% 400%;
        animation: moveGradient 3s ease-in-out infinite;
        -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        font-family: "Outfit", sans-serif;
        font-display: swap;
    }
}

.ar-studio-tryon-modal-class.ar-studio-modal-active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}


.ar-studio-modal-inner {
    border-radius: 10px;
    background-color: #0d0d0d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
    width: 100%;
    height: 100%;
    overflow: hidden;
    scrollbar-width: thin;
    /* padding: 20px 10px; */
}

.ar-studio-modal-inner-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.ar-studio-modal-title {
    font-size: 55px;
    font-weight: 400;
    line-height: 80px;
    color: gainsboro;
    /* text-align: center; */
    margin: 0;
    display: flex;
    align-items: center;
    padding: 0px 10px;
    width: 100%;
    gap: 20px;
    animation: fadeInUp 0.9s cubic-bezier(.77, 0, .18, 1) 0.18s both;
    border-bottom: 1px solid #3d3d3b;

    .studio-name {
        color: #fff;
    }
}

.ar-studio-model-inner-upper {
    display: flex;
    align-items: center;
    width: 100%;
    height: max-content;
    gap: 15px;
    /* overflow: auto; */
}

.ar-studio-modal-left-part,
.ar-studio-modal-right-part {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;

    input {
        display: none;
    }

    h4 {
        text-align: center;
        color: #fff;
        font-weight: 400;
    }

    img {
        width: 100%;
        max-width: 300px;
        height: 250px;
        object-fit: cover;
        border-radius: 5px;
    }
}

#ar-studio-edit-image-btn {
    position: absolute;
    top: 2px;
    right: 5px;
    cursor: pointer;
    height: 17px;
    width: 17px;
    /* visibility: hidden; */
}

.ar-studio-image-uploader-box {
    border: 2px dashed gray;
    width: 100%;
    max-width: 300px;
    height: 250px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 250ms ease-in-out;
    position: relative;

    p {
        text-align: center;
        font-size: 0.9rem;
        color: gray;
        font-weight: 500;
        transition: all 200ms ease-in-out;
    }

    &:hover {
        border-color: #fff;

        p {
            color: #fff;
        }
    }


    .ar-studio-upload-icon {
        object-fit: cover;
        width: 65px;
        height: 65px;
    }
}


.ar-studio-model-inner-lower {
    display: flex;
    justify-content: center;
    height: max-content;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ar-studio-lower-cta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    width: 100%;
}

.ar-studio-model-generate-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #fffdf5;
    background-color: #141414;
    border: 1px solid #fff;
    width: 100%;
    height: 45px;
    min-height: 45px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    border-radius: 2px;
    transition: all 250ms ease-in-out;
    letter-spacing: 0.4px;
    font-size: 14px;
    border-radius: 30px;

    &:hover {
        color: #141414;
        background-color: #fffdf5;
    }
}

.ar-studio-model-generate-button-disabled {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
    pointer-events: none;
    opacity: 0.5;
}

.ar-studio-final-result-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation-delay: 150ms;
    animation: fadeInReveal 0.9s cubic-bezier(.77, 0, .18, 1) 0.15s forwards;
}



.ar-studio-modal-content {
    width: 100%;
    flex: 1;
    height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: gray transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 20px;
    position: relative;

}

.ar-studio-result-part {
    flex: 1;
    max-width: 640px;
    overflow: hidden;
    position: relative;
    background-color: #141414;
    /* background-color: transparent; */

    /* border-left: 1px solid gray; */
    h4 {
        text-align: center;
        color: #fff;
        font-weight: 400;
    }

    video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.ar-studio-download-asset-button {
    position: absolute;
    top: 10px;
    right: 13px;
    border-radius: 2px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    border: none;
    outline: none;
    justify-content: center;
    width: 34px;
    height: 28px;
    padding: 5px 7px;
    z-index: 99999;
    transition: all 250ms ease-in-out;
    display: none;

    &:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

.ar-studio-process-part {
    flex: 1;
    padding: 10px 0px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
    max-width: 650px;
    margin: auto;
}

.ar-studio-modal-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0rem;
    text-transform: capitalize;
    text-decoration: underline;
    transition: all 250ms ease-in-out;
    cursor: pointer;
    background: none;
    font-weight: 500;
    border: none;
    color: #fff;
    text-underline-offset: 2px;
    font-size: 14px;
    letter-spacing: 0.5px;
    z-index: 9999;

    &:hover {
        color: gainsboro;
    }
}




.ar-studio-input-text {
    padding: 5px 10px;
    background-color: transparent;
    border: 1px solid gray;
    resize: none;
    width: 100%;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    outline: none;
    transition: all 250ms ease-in-out;

    &:active,
    &:focus {
        border-color: #fff;
    }
}

.ar-studio-modal-generate-loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    display: none;
}

.ar-studio-loader-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    letter-spacing: 0.5px;
    gap: 15px;
    display: none;

    span {
        color: #fff;
        font-size: 14px;
        transition: opacity 0.5s ease;
    }
}

.ar-studio-result-loader {
    background: currentcolor;
    position: relative;
    animation: resultSpinner 1s ease-in-out infinite;
    animation-delay: 0.4s;
    width: 3.5px;
    height: 10px;
    margin: 0 .5em;

    &:after,
    &:before {
        content: '';
        position: absolute;
        width: inherit;
        height: inherit;
        background: inherit;
        animation: inherit;
    }

    &:before {
        right: 10px;
        animation-delay: 0.2s;
    }

    &:after {
        left: 10px;
        animation-delay: 0.6s;
    }
}

.ar-studio-instructions-container{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    height: 100%;
    h4{
        font-size: 14px;
        color: #fff;
    }
}

.ar-studio-instructions-steps-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    
    li{
        font-size: 13px;
        color: #fffdf5;
    }
}


@media(max-width:1050px) {
    .ar-studio-tryon-modal-class {
        height: 90vh;
    }

    .ar-studio-modal-left-part,
    .ar-studio-modal-right-part {
        img {
            height: 200px;
        }
    }


    .ar-studio-image-uploader-box {
        height: 200px;

        .ar-studio-upload-icon {
            width: 55px;
            height: 55px;
        }
    }
}

@media(max-width:850px) {
    .ar-studio-modal-title {
        font-size: 50px;
        line-height: 70px;
    }

    .ar-studio-tryon-modal-class {
        /* height: 85vh; */
    }

    .ar-studio-modal-content {
        padding: 10px;
    }

    .ar-studio-modal-left-part,
    .ar-studio-modal-right-part {
        img {
            height: 180px;
        }
    }

    .ar-studio-image-uploader-box {
        height: 180px;

        p {
            font-size: 0.85rem;
        }

        .ar-studio-upload-icon {
            width: 50px;
            height: 50px;
        }
    }

    .ar-studio-lower-cta {
        flex-direction: column;
        gap: 10px;
    }


    .ar-studio-model-generate-button {
        margin-left: auto;

        &:hover {
            color: #fffdf5;
            background-color: #0d0d0d;
        }
    }
}


@media(max-width : 720px) {
    .ar-studio-modal-inner {
        overflow: auto;
    }

    .ar-studio-modal-inner-content {
        flex-direction: column;
        gap: 0px;
        height: auto;
        padding: 10px;
        min-height: 100%;

        &::-webkit-scrollbar {
            display: none;
        }
    }

    .ar-studio-modal-title {
        font-size: 40px;
        line-height: 60px;
    }

    .ar-studio-modal-content {
        overflow: hidden;
        height: 100%;
        padding: 10px;
    }

    .ar-studio-modal-close-btn {
        right: 10px;
        top: 10px;
    }

    .ar-studio-modal-left-part,
    .ar-studio-modal-right-part {
        width: 90%;

        img {
            height: 200px;
        }
    }

    .ar-studio-image-uploader-box {
        height: 200px;
    }

    .ar-studio-result-part {
        padding: 0px 8px;
        flex: unset;
        background-color: transparent;

        video {
            display: none;
        }
    }

    .ar-studio-final-result-image {
        border-radius: 5px;
        aspect-ratio: 1 / 1;
        margin-top: 15px;
        margin-bottom: 8px;
    }
}

@media(max-width:500px) {
    .ar-studio-tryon-modal-class {
        height: 80vh;
    }

    .ar-studio-modal-title {
        font-size: 35px;
        line-height: 50px;
    }

    .ar-studio-modal-left-part,
    .ar-studio-modal-right-part {
        img {
            height: 180px;
        }
    }

    .ar-studio-image-uploader-box {
        height: 180px;

        .ar-studio-upload-icon {
            height: 30px;
            width: 30px;
        }

        p {
            font-size: 0.8rem;
            width: 70%;
        }
    }
}

@media(max-width : 400px) {

    .ar-studio-modal-left-part,
    .ar-studio-modal-right-part {
        img {
            height: 160px;
        }
    }

    .ar-studio-image-uploader-box {
        height: 160px;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(36px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@keyframes resultSpinner {

    0%,
    100% {
        box-shadow: 0 0 0 currentcolor, 0 0 0 currentcolor;
    }

    50% {
        box-shadow: 0 -.25em 0 currentcolor, 0 .25em 0 currentcolor;
    }
}

@keyframes fadeInReveal {
    from {
        opacity: 0;
        transform: scale(0.98);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}