:root {
    /* --ucd-custom-editor-add-photo: url(https://d32u6scf3pzwp7.cloudfront.net/images/ai_stickers/icons/add-photo-Opt--05.svg); */
}

.ai-sticker-dialog {
    color: #2D2B2B;
}
.ui-dialog.ai_sticker_upload_dialog {
    border-radius: 1.6rem;
    padding: 0;
    overflow: hidden;
}
.ui-dialog.ai_sticker_upload_dialog .ui-dialog-titlebar {
    padding: 0 !important;
}
.ui-dialog.ai_sticker_upload_dialog .ui-dialog-title {
    display: none;
}
.ui-dialog.ai_sticker_upload_dialog .ui-dialog-titlebar-close {
    margin-top: 0;
    top: 1.6rem;
    right: 1.6rem !important;
    width: 1.6rem;
    height: 1.6rem;
    z-index: 2;
}
.ui-dialog.ai_sticker_upload_dialog .ui-icon-closethick.ui-icon {
    width: 100%;
    height: 100%;
    margin: 0;
    left: 0;
    top: 0;
    right: 0;
    background: url(/templates/images/icons/icon-close.svg) no-repeat;
    background-size: 100% 100%;
}
/* common */
.ai-sticker-dialog .step-panel {
    min-height: 55.6rem;
}
.ai-sticker-dialog .step-btn {
    width: 40.3rem;
    color: var(--color-white);
    font-size: 1.4rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.6rem;
    padding: 1.2rem;
    border-radius: 0.8rem;
    background: var(--color-primary);
    margin: 1.8rem auto 0;
    cursor: pointer;
}
/* 1. upload panel */
/* - 1.1 header */
.ai-sticker-dialog .panel-upload .upload-header {
    font-size: 2rem;
    line-height: 2.4rem;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.3rem;
    margin-top: 1.3rem;
}
.ai-sticker-dialog .panel-upload .upload-header .tip-icon {
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
    background: url("/templates/images/icon-info-gray.svg") no-repeat;
    background-size: 100% 100%;
    cursor: pointer;
    display: block;
}
/* - 1.2 content */
.ai-sticker-dialog .upload-inner-container {
    display: flex;
    gap: 2.5rem;
}

.ai_sticker_upload_dialog .image-item.selected:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    bottom: 10px;
    right: 10px;
    background: url(/templates/images/icons/checkmark-circle-solid.svg) no-repeat center center / contain;
}

/* - 1.2.1 content (left upload photo) */
.ai-sticker-dialog .upload-inner-container .upload-container {
    flex: 1;
}
.ai-sticker-dialog .upload-container .upload-tip-container {
    text-align: center;
    margin: 1.7rem 0 1.4rem;
}
.ai-sticker-dialog .upload-container .upload-tip-container >h5 {
    color: #435663;
    font-size: 1.9rem;
    font-weight: var(--font-weight-regular);
    line-height: 2.5rem;
}
.ai-sticker-dialog .upload-container .upload-tip-container >p {
    color: #252B42;
    font-size: 1.2rem;
    font-weight: var(--font-weight-regular);
    line-height: 1.9rem;
}

/* - 1.2.1.1 upload footer */
.ai-sticker-dialog .upload-footer {
    width: 48.9rem;
    margin: 0 auto;
    padding-top: 1.8rem;
    text-align: center;
}
.ai-sticker-dialog .comfirm-permission label {
    color: #252B42;
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: var(--font-weight-regular);
}
.ai-sticker-dialog .comfirm-permission .g-form-input.checkbox+label:before {
    top: 0.4rem;
    transform: none;
    width: 1.5rem;
    height: 1.5rem;
    border-color: #A5A5A5;
}
.ai-sticker-dialog .operate-button,
.ai-sticker-replace-dialog .operate-button {
    border-radius: 0.8rem;
    padding: 0.8rem 1.6rem;
    width: 40.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2.3rem auto 0.8rem;
    gap: 0.4rem;
    background: var(--color-primary);
    cursor: pointer;
}
.ai-sticker-dialog .operate-button.disabled,
.ai-sticker-replace-dialog .operate-button.disabled {
    cursor: default;
    background: #C7C7C7;
}
.ai-sticker-dialog .operate-button .icon {
    width: 2.4rem;
    height: 2.4rem;
    background: url(/templates/images/icons/icon-magic.svg) no-repeat;
    background-size: 100% 100%;
}
.ai-sticker-dialog .operate-button .text,
.ai-sticker-replace-dialog .operate-button .text {
    font-size: 1.4rem;
    line-height: 1.6rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
}
/* 5. limit text */
.ai-sticker-dialog .generate-limit {
    color: var(--color-primary);
    font-size: 1rem;
    line-height: 1.6rem;
}
.ai-sticker-dialog .generate-limit >span {
    font-weight: var(--font-weight-bold);
}
/* 1.2.1.2 no generations */
.ai-sticker-dialog .no-generations-container {
    text-align: center;
    flex: 1;
    align-self: flex-start;
    min-height: 42rem;
    text-align: center;
    padding: 1.6rem;
    background: #F2F4F5;
    border: dashed 2px #DDDEE0;
    border-radius: 1rem;
    margin-top: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-sticker-dialog .no-generations-container .message {
    color: #868686;
    text-align: center;
    font-size: 1.2rem;
    line-height: 2rem;
    max-width: 30rem;
}
/* - 1.2.2 content (right your stickers) */
.ai-sticker-dialog .stickers-container {
    width: 27rem;
    flex-shrink: 0;
    display: none;
}
.ai-sticker-dialog .stickers-container .stickers-area {
    height: 43rem;
    width: 100%;
    border-radius: 0.8rem;
    background: #F3F3F3;
    padding: 1rem 1.2rem;
    margin-top: 1.7rem;
}
.ai-sticker-dialog .stickers-container .header {
    color: #2D2B2B;
    text-align: center;
    font-size: 1.6rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}
.ai-sticker-dialog .stickers-container .stickers-list,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list {
    max-height: 38rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 0.6rem;
}
.ai-sticker-dialog .stickers-container .stickers-list::-webkit-scrollbar,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list::-webkit-scrollbar {
    background-color: #F4F4F4;
    width: 0.5rem;
}

.ai-sticker-dialog .stickers-container .stickers-list::-webkit-scrollbar-thumb,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-color);
    width: 0.5rem;
    border-radius: var(--btn-border-radius);
}

.ai-sticker-dialog .stickers-container .stickers-list::-webkit-scrollbar-track,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list::-webkit-scrollbar-track {
    background: var(--scrollbar-trace-color);
    border-radius: var(--btn-border-radius);
}
.ai-sticker-dialog .stickers-container .stickers-list ul {
    width: 23rem;
}
.ai-sticker-dialog .stickers-container .stickers-list ul,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 auto;
}
.ai-sticker-dialog .stickers-container .stickers-list .sticker-item,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list .sticker-item {
    width: 11.2rem;
    height: 11.2rem;
    border: 0.1rem solid #434444;
}
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list .sticker-item {
    cursor: pointer;
}
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list .sticker-item.selected {
    border: 0.5rem solid var(--color-primary);
}
.ai-sticker-dialog .stickers-container .stickers-list .sticker-item >img,
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list .sticker-item >img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
/* - 1.3 upload footer area */
.ai-sticker-dialog .step-footer {
    text-align: center;
    margin-top: 1.6rem;
}
.ai-sticker-dialog .step-footer .close {
    color: #646565;
    font-size: 1.4rem;
    font-weight: var(--font-weight-regular);
    line-height: 1.6rem;
    text-decoration: underline;
    display: inline-block;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

/* - 1.4 upload panel tips */
.ai-sticker-dialog .upload-tip-overlay {
    position: absolute;
    z-index: 3;
    border-radius: 1.6rem;
    background: rgb(0 0 0 / 50%);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-sticker-dialog .upload-tip-overlay .upload-tip-inner {
    background: var(--color-white);
    width: 81.2rem;
    border-radius: 1.6rem;
    overflow: hidden;
    position: relative;
    text-align: center;
    padding: 4rem 7.8rem;
}
.ai-sticker-dialog .upload-tip-overlay .upload-tip-inner .close-btn {
    background: url(/templates/images/icons/icon-close.svg) no-repeat;
    background-size: 100% 100%;
    width: 1.6rem;
    height: 1.6rem;
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    cursor: pointer;
}
.ai-sticker-dialog .upload-tip-overlay .upload-tip-inner >p {
    color: #252B42;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6rem;
}
.ai-sticker-dialog .upload-tip-overlay .transform-container {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    margin: 2.3rem auto 3rem;
    width: 100%;
    justify-content: center;
}
.ai-sticker-dialog .upload-tip-overlay .transform-container .transform-before {
    width: 12.6rem;
    height: 12.6rem;
    background: url(https://d32u6scf3pzwp7.cloudfront.net/images/ai_stickers/ai_stickers_before_girl.png) no-repeat;
    background-size: 100% auto;
    background-position: center;
    border-radius: 0.5rem;
}
.ai-sticker-dialog .upload-tip-overlay .transform-container .transform-arrow {
    width: 2.4rem;
    height: 1.7rem;
    background: url(/templates/images/icons/icon-arrow-transform.svg) no-repeat;
    background-size: 100% 100%;
}
.ai-sticker-dialog .upload-tip-overlay .transform-container .transform-after {
    width: 19.8rem;
    height: 13.9rem;
    background: url(https://d32u6scf3pzwp7.cloudfront.net/images/ai_stickers/ai_stickers_after.png) no-repeat;
    background-size: 100% 100%;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition {
    border-radius: 0.8rem;
    border: 1px solid var(--color-primary);
    background: var(--color-white);
    padding: 1.6rem;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-header,
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-content {
    margin: 0;
}
.ai-sticker-dialog .upload-tip-overlay .exhibition.cartoon-exhibition .exhibition-title {
    color: var(--color-primary);
    font-size: 1.6rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4rem;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item {
    margin: 1.6rem 0 0;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item-icon >i.g-icon {
    width: 4rem;
    height: 4rem;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item .exhibition-item-title {
    color: var(--color-primary);
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: var(--font-weight-regular);
    margin: 1.6rem 0 0;
}
.ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item .exhibition-item-title b {
    font-weight: var(--font-weight-bold);
}

/* 2. uploading panel */
.ai-sticker-dialog .panel-uploading {
    padding: 4.3rem 0 10rem;
}
.ai-sticker-dialog .panel-uploading .uploading-image {
    width: 59.2rem;
    height: 41.5rem;
    margin: 0 auto;
}
.ai-sticker-dialog .panel-uploading .uploading-image >img {
    width: 100%;
    height: auto;
}
.ai-sticker-dialog .panel-uploading .progress-area {
    width: 40rem;
    margin: 2.6rem auto 0;
}
.ai-sticker-dialog .panel-uploading .progress-area .progress-text {
    color: #505050;
    font-size: 1.4rem;
    line-height: 1.6rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.4rem;
    display: block;
    text-align: center;
}
.ai-sticker-dialog .panel-uploading .progress-area .progress-bar {
    width: 100%;
    height: 1rem;
    border-radius: 1rem;
    background: #D9D9D9;
    position: relative;
}
.ai-sticker-dialog .panel-uploading .progress-area .progress-bar .current {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1rem;
    border-radius: 1rem;
    background: #505050;
}

/* 3. Failed panel */
.ai-sticker-dialog .panel-fail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4.3rem 0 4.5rem;
}
.ai-sticker-dialog .panel-fail .header {
    color: #2D2B2B;
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    line-height: 2.4rem;
    margin-bottom: 1.3rem;
}
.ai-sticker-dialog .panel-fail .fail-message {
    color: #E23A3A;
    font-size: 1.7rem;
    font-weight: var(--font-weight-semibold);
    line-height: 2.6rem;
}
.ai-sticker-dialog .panel-fail .failed-image {
    width: 47.2rem;
    height: 33.1rem;
}
.ai-sticker-dialog .panel-fail .failed-image >img {
    width: 100%;
    height: auto;
    display: block;
}
.ai-sticker-dialog .panel-fail .ok-btn {
    text-transform: uppercase;
    margin-top: 11.7rem;
}

/* 3.  with stickers */
.panel-upload.with-stickers .stickers-container {
    display: block;
}
.panel-upload.with-stickers .photos-upload-wrapper .image-list-wrapper .list-wrapper {
    width: 52rem;
    gap: 0.8rem;
}
/* 4. replace sticker */
.ui-dialog[aria-describedby="ai_sticker_replace_dialog"] .ui-dialog-content {
    padding: 1.6rem 1.2rem !important;
}
.ai-sticker-replace-dialog .replace-stickers-container .stickers-list ul {
    width: 34.8rem;
}
.ai-sticker-replace-dialog .replace-stickers-container .replace-button {
    width: 100%;
    margin-top: 1.6rem;
}
.ai-sticker-replace-dialog .replace-stickers-container .stickers-buttons {
    text-align: center;
}
.ai-sticker-replace-dialog .replace-stickers-container .close {
    color: #646565;
    font-size: 1.4rem;
    font-weight: var(--font-weight-regular);
    line-height: 1.6rem;
    text-decoration: underline;
    display: inline-block;
    cursor: pointer;
}
/* mobile */
@media (max-width: 575px) {
    .ui-dialog.ai_sticker_upload_dialog {
        padding: 0;
        overflow: hidden;
        position: static !important;
        max-width: 100%;
        border-radius: 0;
        border: none;
    }
    .ui-dialog.ai_sticker_upload_dialog .ui-dialog-content {
        padding: 0 !important;
        font-family: var(--font-family);
    }
    /* common */
    .ai-sticker-dialog .step-panel {
        height: auto;
    }
    .ai-sticker-dialog .step-btn {
        width: 100%;
    }
    /* 1. upload panel */
    /* - 1.1 header */
    .ai-sticker-dialog .panel-upload .upload-header {
        color: #2D2B2B;
        text-align: center;
        font-size: 5.12vmin;
        line-height: 6.15vmin;
        font-weight: var(--font-weight-semibold);
    }
    /* - 1.2 content */
    .ai-sticker-dialog .upload-inner-container {
        flex-direction: column-reverse;
        gap: 0;
    }
    /* - 1.2.1 content (left upload photo) */
    .ai-sticker-dialog .upload-container .upload-tip-container {
        margin: 0 0 4.1vmin 0;
    }
    .ai-sticker-dialog .upload-container .upload-tip-container >h5 {
        font-size: 4.1vmin;
        line-height: 1.5;
    }
    .ai-sticker-dialog .upload-container .upload-tip-container >p {
        font-size: 3.07vmin;
        line-height: 1.5;
    }
    /* - 1.2.1.1 upload footer */
    .ai-sticker-dialog .upload-footer {
        width: 100%;
        padding: 0 7.18vmin;
        height: auto;
    }
    .ai-sticker-dialog .comfirm-permission label {
        font-size: 2.56vmin;
        text-align: left;
    }
    .ai-sticker-dialog .operate-button {
        width: 100%;
        margin: 5.12vmin 0;
    }
    .panel-upload.with-stickers .photos-upload-wrapper .image-list-wrapper .image-item {
        width: 18.8vmin;
        height: 18.8vmin;
        margin: 0.8vmin;
    }
    .ai-sticker-dialog .upload-container {
        order: 3;
    }
    /* 1.2.1.2 no generations */
    .ai-sticker-dialog .no-generations-container {
        border: none;
        border-radius: 0;
        width: 100%;
        min-height: 24vmin;
        order: 2;
    }
    /* - 1.2.2 content (right your stickers) */
    .ai-sticker-dialog .stickers-container {
        width: 100%;
        margin: 4.1vmin 0;
        border-radius: 0;
        height: auto;
        order: 1;
    }
    .ai-sticker-dialog .stickers-container .stickers-area {
        height: auto;
        border-radius: 0;
        padding: 2.05vmin 4.1vmin 4.1vmin;
        margin-top: 0;
    }
    .ai-sticker-dialog .stickers-container .stickers-list ul {
        width: 88.15vmin;
        gap: 2.05vmin;
    }
    .ai-sticker-dialog .stickers-container .stickers-list {
        max-height: 33vmin;
    }
    .ai-sticker-dialog .stickers-container .stickers-list .sticker-item {
        width: 20.5vmin;
        height: 20.5vmin;
    }
    .ai-sticker-dialog .stickers-container .stickers-buttons {
        padding: 0 4.1vmin;
    }
    /* - 1.3 upload footer area */
    .ai-sticker-dialog .step-footer {
        margin: 4.1vmin 0;
    }
    .ai-sticker-dialog .step-footer .close {
        font-size: 3.07vmin;
        line-height: 1.5;
        margin: 0 auto;
    }
    /* - 1.4 upload panel tips */
    .ai-sticker-dialog .upload-tip-overlay {
        position: fixed;
        z-index: 3;
        padding: 0 4.1vmin;
    }
    .ai-sticker-dialog .upload-tip-overlay .upload-tip-inner {
        width: 100%;
        padding: 10vmin 4.1vmin 4.1vmin;
    }
    .ai-sticker-dialog .upload-tip-overlay .transform-container {
        gap: 2.05vmin;
        margin: 1.6rem 0;
    }
    .ai-sticker-dialog .upload-tip-overlay .transform-container .transform-before {
        width: 20.5vmin;
        height: 20.5vmin;
    }
    .ai-sticker-dialog .upload-tip-overlay .transform-container .transform-after {
        width: 40.6vmin;
        height: 28.5vmin;
    }
    .ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item,
    .ai-sticker-dialog .upload-tip-overlay .cartoon-exhibition .exhibition-item .exhibition-item-title {
        margin-top: 2.05vmin;
    }
    /* 2. uploading panel */
    .ai-sticker-dialog .panel-uploading {
        padding: 8.2vmin 0;
    }
    .ai-sticker-dialog .panel-uploading .uploading-image {
        width: 100vmin;
        height: 70.1vmin;
    }
    .ai-sticker-dialog .panel-uploading .progress-area {
        width: 100%;
        padding: 0 8.2vmin;
        margin: 4.1vmin auto;
    }
    /* 3. Failed panel */
    .ai-sticker-dialog .panel-fail {
        padding: 4.1vmin;
    }
    .ai-sticker-dialog .panel-fail .failed-image {
        width: 100%;
        height: 70vmin;
    }
    .ai-sticker-dialog .panel-fail .ok-btn {
        width: 100%;
        margin-top: 4.1vmin;
    }

    /* 4. replace sticker */
    .ai-sticker-replace-dialog .replace-stickers-container {
        width: 100%;
    }
    .ai-sticker-replace-dialog .replace-stickers-container .replace-button {
        margin-top: 4.1vmin;
    }
    .ai-sticker-replace-dialog .replace-stickers-container .stickers-list {
        max-height: 74vmin;
    }
    .ai-sticker-replace-dialog .replace-stickers-container .stickers-buttons {
        padding: 0 4.1vmin;
    }
    .ai-sticker-replace-dialog .replace-stickers-container .stickers-list ul {
        width: 59.45vmin;
        gap: 2.05vmin;
    }
    .ai-sticker-replace-dialog .replace-stickers-container .stickers-list .sticker-item {
        width: 28.7vmin;
        height: 28.7vmin;
    }

    /* 5. limit text */
    .ai-sticker-dialog .generate-limit br {
        display: none;
    }
}