.pc_side{
    vertical-align: top;
    display: inline-block;
    width: 280px;
    float: left;
}

.pc_parent_group,
.pc_group{
    cursor: pointer;
    margin-bottom: 5px;
}

.pc_group {
    width: 270px;
}

.pc_parent_group .pc_groups {
    position: relative;
    padding: 5px 0px 0px 10px;
}

.pc_parent_group .pc_groups .pc_left_border {
    transition: width .2s linear;
    position: absolute;
    left: 0px;
    top: -1px;
    bottom: 0px;
    width: 6px;
    box-sizing: border-box;
    background: #FFF;
    border: 1px solid #A2A2A2;
    border-top-width: 0px;
}

.pc_parent_group > .pc_title {
    width: 270px;
}

.pc_group.pc_upload_layer{
    display: none;
}

.pc_parent_group.pc_collapsed .pc_groups{
    height: 0px !important;
    overflow: hidden;
}

.pc_parent_group.pc_collapsed .pc_groups .pc_left_border{
    width: 0px;
    border-width: 0px;
}

.pc_group.pc_collapsed .pc_images{
    height: 0px !important;
    overflow: hidden;
}

.pc_group.pc_collapsed .pc_text_fields,
.pc_group.pc_collapsed .pc_file_fields,
.pc_group.pc_collapsed .pc_text_container{
    height: 0px !important;
    padding: 0 !important;
    overflow: hidden;
}

/* the text of a group is shown only while the group is open */
.pc_group.pc_collapsed > .pc_group_comment{
    display: none !important;
}

.pc_group .pc_title,
.pc_parent_group > .pc_title{
	position: relative;
	border: 1px solid #A2A2A2;
	padding: 6px 5px;
	text-align: left;
	padding-left: 10px;
}

.pc_group.pc_collapsed .pc_indicator{
	display: none;
}

.pc_parent_group > .pc_title > .pc_indicator{
	display: none !important;
}

.pc_title .pc_indicator{
	position: absolute;
	top: 0px;
	left: 0px;
	width: 5px;
	height: 100%;
}

.pc_expand{
    text-decoration: none !important;
    float: right;
}

.pc_group.pc_collapsed .pc_expand {
    -o-transform: rotate(-180deg);
    -webkit-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg);

}

.pc_parent_group.pc_collapsed > .pc_title > .pc_expand{
    -o-transform: rotate(-180deg);
    -webkit-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg);
}

.pc_min .pc_min_hide{
    display: none;
}

.pc_max .pc_min_show{
    display: none !important;
}

.pc_main{
   
    position: relative;
    /* own stacking context: the z-index of the layers (watermark 9999) must not
       rise above the sticky header of the theme */
    isolation: isolate;
    z-index: 0;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
}

.pc_main img{
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    top: 0px;
    left:5px;
}

/* CABALL: the layers lie exactly on the preview (no 5px shift): the custom fields (stored as a part of the
   preview) must reach the edges of the graphic, also in the editor, and the flip must mirror them exactly */
.pc_main > img{
    left: 0;
}

.pc_pixel{
    position: static !important;
}

.pc_loader{
    position: absolute;
    display: none;
    width: 500px;
    height: 500px;
    max-width: 90%;
    max-height: 90%;
    margin: 0;
    transform-origin: 50% 50%;
    background: transparent url(../../img/loader-logo.png) no-repeat center / contain;
    aspect-ratio: 1 / 1;
    /* centered over the preview (= centered in the right column) */
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    z-index: 10000;
    pointer-events: none;
    -webkit-animation: pc_loader_spin 1.2s linear infinite;
    animation: pc_loader_spin 1.2s linear infinite;
}

@-webkit-keyframes pc_loader_spin {
    from { -webkit-transform: translate(-50%, -50%) rotate(0deg); }
    to { -webkit-transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pc_loader_spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

#pc_price{
    font-weight: bold;
}

.pc_mask, .pc_above_upload{
    pointer-events: none;
}

.pc_has_upload .pc_hover .pc_mask,
.pc_has_upload .pc_hover .pc_above_upload{
    opacity: 1;
}

.pc_pe.pc_has_upload .pc_main:hover .pc_mask,
.pc_pe.pc_has_upload .pc_main:hover .pc_above_upload{
    opacity: 1;
}

.pc_main.pc_hover .pc_mask{
    opacity: 1;
}

.pc_no_pe .pc_main.pc_hover .pc_mask{
    visibility: hidden;
}

.pc_wrapper{
    position: absolute;
    display: inline-block;
}

.pc_wrapper .pc_uploaded{
    width: 100% !important;
    height: 100% !important;
}

.pc_main .ui-resizable-handle{
    cursor: pointer;
}

.pc_se, .pc_s, .pc_e{
    display: none !important;
    color: #000;
    background-color: #f66d1f;
    font-size: 16px !important;
    line-height: 20px;
    width: 20px !important;
    height: 20px !important;
}

.pc_s{
    left: 50% !important;
    margin-left: -5px;
    bottom: 0px !important;
}

.pc_narrow_w .pc_s {
    display: none !important;
    visibility: hidden !important;
}

.pc_e{
    top: 50% !important;
    margin-top: -5px;
    right: 0px !important;
}

.pc_narrow_h .pc_e {
    display: none !important;
    visibility: hidden !important;
}

.pc_upload_btn{
    position: absolute;
    color: red;
    top: 3px;
    font-size: 0px;
    z-index: 4;
}

.pc_del_upload{
    right: 2px;
	font-size:10px
}

.pc_front{
    right: 0px;
}

.pc_back{
    right: 0px;
}

.pc_upload_btn_bg{
    display: none;
    background: white;
    position: absolute;
    height: 20px;
    width: 16px;
    top: 0px;
    right: 0px;
    z-index: 3;
    border-radius: 0px 0px 0px 5px;
}

.pc_hover .pc_upload_btn_bg,
.pc_hover .pc_rotate,
.pc_hover .pc_se,
.pc_hover .pc_s,
.pc_hover .pc_e
{
    display: block !important;
}

/* wide screens: options column fills the space up to the preview, the preview is
   aligned to the right (see pc_fit.js) */
#pc_content.pc_fit {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

#pc_content.pc_fit > .pc_side {
    float: none;
    flex: 0 0 280px;
    text-align: left;
}

#pc_content.pc_fit.pc_fluid > .pc_side {
    min-width: 0;
}

#pc_content.pc_fluid .pc_group,
#pc_content.pc_fluid .pc_parent_group > .pc_title,
#pc_content.pc_fluid .pc_images {
    width: 100%;
    box-sizing: border-box;
}

#pc_content.pc_fit > .pc_main {
    float: none;
    flex: 0 0 auto;
    display: block;
    max-width: none;
    /* the preview stays in view while the options (left column) are scrolled */
    position: -webkit-sticky;
    position: sticky;
    top: 10px;
    align-self: flex-start;
}

#pc_content.pc_fit > .pc_main .pc_pixel {
    width: 100% !important;
    height: auto;
}

#pc_content.pc_notrans,
#pc_content.pc_notrans * {
    -webkit-transition: none !important;
    transition: none !important;
}

#pc_content.pc_stack > .pc_side {
    float: none !important;
    display: block;
    text-align: left;
}

#pc_content.pc_stack > .pc_main {
    display: block;
    max-width: none;
    margin-left: 0;
}

#pc_content.pc_stack > .pc_main .pc_pixel {
    width: 100% !important;
    height: auto;
}


/* texts: the handles and the delete button are outside of the text, always on top */
.pc_main .pc_wrapper:hover,
.pc_main .pc_wrapper.ui-resizable-resizing,
.pc_main .pc_wrapper.ui-draggable-dragging {
    z-index: 9000 !important;
}

.pc_main .pc_wrapper .pc_se,
.pc_main .pc_wrapper .pc_s,
.pc_main .pc_wrapper .pc_e {
    width: 24px !important;
    height: 24px !important;
    line-height: 24px;
    text-align: center;
    z-index: 9001 !important;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.pc_main .pc_wrapper .pc_se {
    right: -28px !important;
    bottom: -28px !important;
}

.pc_main .pc_wrapper .pc_s {
    bottom: -28px !important;
    margin-left: -12px;
}

.pc_main .pc_wrapper .pc_e {
    right: -28px !important;
    margin-top: -12px;
}

/* small texts keep all the handles (they are outside, so they never cover the text) */
.pc_hover .pc_narrow_w .pc_s,
.pc_hover .pc_narrow_h .pc_e {
    display: block !important;
    visibility: visible !important;
}

.pc_main .pc_wrapper .pc_upload_btn_bg {
    width: 28px;
    height: 28px;
    top: -32px;
    right: -32px;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    z-index: 9001;
}

.pc_main .pc_wrapper .pc_del_upload {
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 20px;
}

.pc_main .pc_wrapper .pc_del_upload i {
    font-size: 20px;
    line-height: 28px;
}

/* rotation handle: top left corner, outside of the text */
.pc_rotate {
    display: none;
    position: absolute;
    left: -28px;
    top: -28px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    color: #000;
    background-color: #f66d1f;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    cursor: grab;
    z-index: 9001;
    touch-action: none;
}

.pc_rotate svg {
    vertical-align: middle;
}

.pc_wrapper > img.pc_uploaded {
    transform-origin: 50% 50%;
}

/* the watermark never blocks the clicks (also when the custom fields stylesheet is not loaded) */
.pc_main > img.pc_watermark {
    pointer-events: none !important;
}
