@import url('../general-and-utility-classes.css');

/* --- Designer Modal + Approval Modal (shared styles) --- */
.designer-modal,
.dh-approval-modal {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100vw;
    max-width: 100%; 
    height: 100vh; 
    max-height: 100%; 
    border: none; 
    padding: 0; 
    margin: 0;
    overflow: hidden;

    &[open] {
        display: flex;
    }

    /* - Tablet- */
    @media only screen and (max-width: 992px) {
        height: 100%; 
        overflow: auto;
    }

    .loader-container,
    .thumbnail-preview-loader-container {
        display: none;
        align-items: center;
        height: 85%;

        &.active {
            display: flex;
        }
    }
    
    .loader,
    .thumbnail-preview-loader {
        position: relative;
        display: block;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        margin: 60px auto;
        animation: loaderRotate 1s linear infinite;

        &::before,
        &::after {
            content: "";
            box-sizing: border-box;
            position: absolute;
            inset: 0px;
            border-radius: 50%;
            border: 5px solid #737A80;
            animation: prixClipFix 2s linear infinite ;
        }

        &::before {
            width: auto;
            height: auto;
            margin: 0;
            background: none;
        }

        &::after {
            border-color: var(--color-slick-yellow);
            animation: prixClipFix 2s linear infinite , loaderRotate 0.5s linear infinite reverse;
            inset: 6px;
        }
    }

    .designer-modal__top-container,
    .dh-approval-modal__top-container {
        width: 100%;
        height: 15%;
        background-color: var(--color-black);

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            height: 20%;
        }
    }

    .designer-modal__top-subcontainer,
    .dh-approval-modal__top-subcontainer {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        width: 100%;
        max-width: 1440px;
        height: 100%;
        padding: 16px 50px;
        margin: 0 auto;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            flex-wrap: wrap;
            padding: 12px 16px;
        }
    }

    .designer-modal__top-container-left,
    .dh-approval-modal__top-container-left {
        display: flex;
        align-items: center;
        gap: 72px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            gap: 18px;
        }

        img {
            max-width: 136px;
            object-fit: contain;
        }
    }

    .designer-modal__title-container,
    .dh-approval-modal__title-container {
        max-width: 600px;
    }

    .designer-modal__title,
    .dh-approval-modal__title {
        font-size: 36px;
        font-family: 'Jost', 'Montserrat';
        color: white;
        margin: 0;

        /* - Tablet- */
        @media only screen and (max-width: 992px) {
            font-size: 24px;
        }
    }

    .designer-modal__subtitle,
    .dh-approval-modal__subtitle {
        font-size: 18px;
        color: var(--color-slick-yellow);
        margin: 0;

        /* - Tablet- */
        @media only screen and (max-width: 992px) {
            font-size: 14px;
        }
    }

    .designer-modal__top-container-right,
    .dh-approval-modal__top-container-right {
        display: flex;
        align-items: center;
        gap: 32px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            justify-content: space-between;
            width: 100%;
        }

        button {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--color-white);
            height: max-content;

            svg {
                path {
                    stroke: var(--color-white);
                    transition: .2s linear;
                }
            }

            &:hover,
            &:active,
            &:focus {
                color: var(--color-slick-yellow);
                background-color: transparent;

                svg {
                    path {
                        stroke: var(--color-slick-yellow);
                        transition: .2s linear;
                    }
                }
            }

            &.designer-modal__approve-btn {
                background-color: var(--color-slick-yellow);
                padding: 16px 28px;

                &:hover {
                    color: var(--color-white);
                }
            }
        }
    }

    .designer-modal__top-container-right-add-qr-btn,
    .dh-approval-modal__top-container-right-add-qr-btn {
        display: none;
    }
}

/* --- Designer Modal --- */
.designer-modal {

    /* --- Top --- */
    .designer-modal__top-container-right-add-qr-btn {
        display: none;
        background-color: transparent;
        padding: 0;
    }

    .designer-modal__top-container-right-back-to-product-btn {

        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--color-white);
        background-color: transparent;
        height: max-content;
        transition: .2s linear;

        &:hover {
            color: var(--color-slick-yellow);
            background-color: transparent;
            transition: .2s linear;

            svg {
                path {
                    fill: var(--color-slick-yellow);
                    transition: .2s linear;
                }
            }
        }
    }

    /* --- Bottom --- */
    .designer-modal__bottom-container {
        width: 100%;
        height: 10%;
        background-color: var(--color-black);
        order: 3;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            height: 15%;
        }
    }

    .designer-modal__bottom-subcontainer {
        width: 100%;
        max-width: 1440px;
        height: 100%;
        padding: 15px 50px;
        margin: 0 auto 6px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            padding: 12px 16px;
        }

        p {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 18px;
            line-height: 20px;
            font-weight: 700;
            color: var(--color-white);
            margin-bottom: 6px;
        }

        div {
            display: flex;
            gap: 18px;

            /* - Mobile - */
            @media only screen and (max-width: 767px) {
                flex-wrap: wrap;
                gap: 6px;
            }

            p {
                font-size: 14px;
                line-height: 18px;

                &.designer-modal__helpful-tip-qr {
                    display: none;
                }

                a {
                    font-size: 14px;
                    line-height: 18px;
                    font-weight: 500;
                    color: var(--color-white);
                    text-decoration: underline !important;
                    transition: .2s linear;

                    &:hover {
                        color: var(--color-slick-yellow);
                        transition: .2s linear;
                    }
                }
            }
        }
    }
    
    /* --- Iframe --- */
    iframe {
        order: 2;
        height: 75%;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            height: 65%;
        }
    }
}

/* --- Layout Modal & QR Modal (Shared Styles) --- */
.layouts-modal,
.qr-modal,
.helpful-tips-modal {
    display: none;
    max-width: min(90vw, 1440px);
    padding: 0;
    border: none;
    border-radius: 2px;
    background-color: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    outline: none;
    margin: auto;

    &::backdrop {
        background: rgba(0, 0 , 0, .3);
    }

    &[open] {
        display: flex;
    }
}

/* --- Layout Modal --- */
.layouts-modal {

    .layouts-modal__container {
        padding: 40px 80px;

        /* - Tablet- */
        @media only screen and (max-width: 1024px) {
            padding: 32px 24px;
        }

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            padding: 42px 18px;
        }
    }

    .layouts-modal__content-header {
        display: flex;
        align-items: center;
        padding: 0 82px;
        margin-bottom: 42px;

        /* - Tablet- */
        @media only screen and (max-width: 1024px) {
            gap: 32px;
            padding: 0;
        }
        
        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 20px;
        }
    }

    .layouts-modal__fixed-thumbnail-container {
        max-width: 40%;
        margin-right: 42px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            max-width: 100%;
        }
    }

    .layouts-modal__content-title {
        font-size: 36px;
        line-height: 40px;
        color: var(--color-black);
        text-align: center;
        margin: 0 auto;

        /* - Tablet- */
        @media only screen and (max-width: 1024px) {
            font-size: 24px;
            line-height: 28px;
        }

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            margin: 0;
        }

        span {
            display: block;
            text-align: center;
            margin-top: 20px;

            /* - Tablet- */
            @media only screen and (max-width: 1024px) {
                margin-top: 12px;
            }
        }
    }

    .layouts-modal__layouts-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 32px;

        /* - Tablet- */
        @media only screen and (max-width: 1024px) {
            gap: 20px;
        }
                        
        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            flex-wrap: wrap;
        }
    }

    .layouts-modal__layout-container {
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        max-width: 30%;
        padding: 20px;
        transition: .2s linear;

        img {
            max-width: 100%;
            height: auto;
        }

        &:hover {
            cursor: pointer;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);

            .layouts-modal__layout-title {
                color: var(--color-slick-yellow);
            }
        }

        /* - Tablet- */
        @media only screen and (max-width: 1024px) {
            padding: 10px;
        }
    }

    .layouts-modal__layout-title {
        font-size: 18px;
        line-height: 22px;
        font-family: "Montserrat", sans-serif;;
        transition: .2s linear;
        margin-bottom: 18px;
    }
}

/* --- QR Modal --- */
.qr-modal {

    .qr-modal__container {
        padding: 80px 24px 24px;
    }

    .qr-modal__cancel-btn {
        appearance: none;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 32px;
        height: 32px;
        border: none;
        padding: 8px;
        cursor: pointer;
        transition: .2s linear;

        svg {
            path {
                transition: .2s linear;
            }
        }

        &:hover {

            svg {
                path {
                    stroke: var(--color-slick-yellow);
                    transition: .2s linear;
                }
            }  
        }
    }

    .qr-modal__content {
        display: flex;
        flex-direction: column;
        min-width: 424px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            min-width: none;
        }
    }

    .qr-modal__label {
        font-size: 22px;
        line-height: 24px;
        font-weight: bold;
        color: #15212C;
        text-align: left;
        margin-bottom: 8px;
    }

    .qr-modal__input {
        color: var(--color-text-black);
        width: 100%;
        border: 1px solid var(--color-input-border-gray);
        border-radius: 4px;
        margin-bottom: 16px;
    }

    .qr-modal__generate-btn.button {
        width: max-content;
        padding: 16px 28px;
        margin-top: 12px;
        margin-left: auto;
    }
}

/* --- Helpful Tips Modal --- */
.helpful-tips-modal {

    .helpful-tips-modal__container {
        max-width: 900px;
        padding: 40px 80px;
    }

    .helpful-tips-modal__content {
        display: flex;
        flex-wrap: wrap;
    }

    .helpful-tips-modal__content-title {
        font-size: 32px;
        line-height: 38px;
        margin-bottom: 24px;
    }

    .helpful-tips-modal__content-text {

        p {
            line-height: 20px;
            text-align: left;
            margin-bottom: 12px;

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    .helpful-tips-modal__content-btn {
        margin-top: 32px;
    }
}

/* --- Approval Modal --- */
.dh-approval-modal {

    .dh-approval-modal__approval-modal-save {

        &.button {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--color-white);
            background-color: transparent;
            height: max-content;
            transition: .2s linear;

            &:hover {
                color: var(--color-slick-yellow);
                transition: .2s linear;

                svg {
                    path {
                        fill: var(--color-slick-yellow);
                        transition: .2s linear;
                    }
                }
            }
        }
    }

    .dh-approval-modal__approval-modal-download.button {

        &:hover {
            svg {
                path {
                    stroke: initial;
                }
            }  
        }

        &.disabled {
            color: var(--color-white);
            padding: 0;
        }
    }
    
    .dh-approval-modal__body-container {
        display: flex;
        align-items: center;
        gap: 80px;
        height: 85%;
        max-width: 1440px;
        padding: 64px 50px 80px;
        margin: 0 auto;

        /* - Tablet- */
        @media only screen and (max-width: 992px) {
            flex-wrap: wrap;
        }
        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            gap: 62px;
            padding: 24px 16px 32px;
        }
    }

    /* --- Left --- */
    .dh-approval-modal__body-container-left {
        height: 100%;
        max-width: 50%;

        /* - Tablet- */
        @media only screen and (max-width: 992px) {
            height: auto;
            max-width: 100%;
        }
    }
    
    .dh-approval-modal__approval-modal-thumbnail-preview-container {
        position: relative;
        height: calc(100% - 70px);
    }

    .dh-approval-modal__approval-modal-thumbnail-preview-container-back,
    .dh-approval-modal__approval-modal-thumbnail-preview-container-front {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: .2s linear;
        height: 100%;
        
        &.active {
            opacity: 1;
            transition: .2s linear;
        }

        img {
            max-width: 100%;
            max-height: 100%;
        }
    }

    .dh-approval-modal__approval-modal-thumbnail-preview-container-back {
        position: absolute;
        inset: 0;
    }
    
    .dh-approval-modal__preview-multiple-pages-btn-container {
        display: none;
        justify-content: center;
        gap: 12px;
        margin-top: 12px;
        
        button {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 14px 17px;
            
            &.disabled {

                svg {
                    path {
                        fill: #B9B9B9;
                        transition: .2s linear;
                    }
                }
            }
        }
    }

    .dh-approval-modal__preview-disclaimer-copy {
        font-size: 14px;
        line-height: 22px;
        color: var(--color-gray);
        text-align: center;
        margin: 32px 0 0;
    }

    /* --- Right --- */
    .dh-approval-modal__body-container-right {
        max-width: min(484px, 45%);

        /* - Tablet- */
        @media only screen and (max-width: 992px) {
            max-width: min(100%);
        }
    }

    .dh-approval-modal__body-container-right-title {
        font-size: 36px;
        color: var(--color-black);
        margin: 0;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            font-size: 32px;
        }
    }

    .dh-approval-modal__body-container-right-subtitle {
        font-size: 18px;
        font-weight: 500;
        color: #54595F;
        margin: 12px 0 0;
    }

    .dh-approval-modal__body-container-right-checklist {
        list-style: none;
        padding-left: 2px;
        margin-top: 36px;

        li {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 16px;
            color: var(--color-gray);

            svg {
                min-width: 24px;
            }

            span {
                font-weight: 700;
            }
        }
    }

    .dh-approval-modal__body-container-right-terms-conditions-title {
        font-size: 24px;
        font-weight: 500;
        color: #15212C;
        margin: 32px 0 12px;
    }

    .dh-approval-modal__body-container-right-terms-conditions-copy {
        font-size: 16px;
        line-height: 26px;
        font-weight: 500;
        color: var(--color-gray);
        margin: 0;
    }

    .dh-approval-modal__body-container-right-terms-conditions-checkbox {
        display: flex;
        align-items: center;
        font-size: 14px;
        line-height: 20px;
        font-weight: 700;
        color: #232E39;
        margin-top: 32px;
        cursor: pointer;

        input {
            position: relative;
            appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #232E39;
            border-radius: 4px;
            background-color: transparent;
            outline: none;
            margin-right: 8px;
            cursor: pointer;

            &:checked {
                border-color: var(--color-slick-yellow);
            }

            &:checked::after {
                content: "✓";
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -45%);
                color: var(--color-slick-yellow);
                font-weight: bold;
            }
        }
    }

    .dh-approval-modal__body-container-right-btns-container {
        display: flex;
        gap: 12px;
        margin-top: 32px;

        /* - Mobile - */
        @media only screen and (max-width: 767px) {
            flex-wrap: wrap;
        }

        button {
            padding: 18px 24px;

            /* - Mobile - */
            @media only screen and (max-width: 767px) {
                width: 100%;
            }
        }
    }
}