.pc_custom_field {
  outline: none;
  position: absolute;
  z-index: 100;
  text-align: center;
}

/* CABALL: the field being edited (selected, or with an item under the cursor) is above the overlapping fields,
   so its handles (move, resize, rotate, delete) are never covered by another field */
.pc_custom_field.pc_selected {
  z-index: 101;
}

.pc_custom_field:has(> .pc_wrapper:hover),
.pc_custom_field:has(> .pc_wrapper.ui-draggable-dragging),
.pc_custom_field:has(> .pc_wrapper.ui-resizable-resizing) {
  z-index: 102;
}

.pc_hover .pc_custom_field.pc_selected {
  outline: 2px solid #8bc34a;
}

.pc_hover .pc_custom_field {
  outline: 2px dotted #03A9F4;
  display: block;
  -webkit-transition: background-color 0.12s;
  transition: background-color 0.12s;
}

/* the field under the cursor is darkened, a click flashes it green (the colour of the selected frame) */
.pc_hover .pc_custom_field:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.pc_hover .pc_custom_field.pc_flash,
.pc_hover .pc_custom_field.pc_flash:hover {
  background-color: rgba(139, 195, 74, 0.6);
}

/* second side (flip): the items of the hidden side keep their layout (they are measured when the data is collected) */
/* the id raises the specificity: nothing of the hidden side may show up (also not the handles of small texts) */
#pc_composer .pc_side_inactive,
#pc_composer .pc_side_inactive *,
.pc_side_inactive,
.pc_side_inactive * {
  visibility: hidden !important;
  pointer-events: none !important;
}

.pc_main.pc_flipped > img.pc_layer:not(.pc_noflip),
.pc_main.pc_flipped > img.pc_mask,
.pc_main.pc_flipped > img.pc_bg {
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}

#pc_flip,
#pc_flip:focus,
#pc_flip.pc_active {
  box-shadow: none;
  outline: none;
}

.pc_flip_icon {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
}

/* the flip must not be animated layer by layer */
.pc_main > img.pc_layer,
.pc_main > img.pc_mask,
.pc_main > img.pc_bg {
  -webkit-transition-property: opacity;
  transition-property: opacity;
}


/* watermark layer: always on top, never mirrored, never blocks the editing */
.pc_main > img.pc_watermark {
  pointer-events: none;
  -webkit-transform: none !important;
  transform: none !important;
}


/* text above the options of a group */
.pc_group .pc_group_comment {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.pc_flip_icon svg {
  display: inline-block;
  vertical-align: middle;
}

/* CABALL: price of marking, shown over an empty field while the fields are highlighted */
.pc_field_price {
  display: none;
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 5;
  padding: 0 6px;
  font: bold 11px/17px Arial, sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
}

.pc_hover .pc_custom_field:not(:has(> .pc_wrapper)) > .pc_field_price {
  display: block;
}

/* CABALL: popup about the graphic design fee */
.pc_fee_modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
}
.pc_fee_modal_box {
  background: #fff;
  max-width: 440px;
  width: calc(100% - 32px);
  padding: 28px 28px 24px;
  text-align: center;
  box-shadow: 0 0 30px 6px rgba(0, 0, 0, .35);
}
.pc_fee_modal_box h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.pc_fee_modal_box p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
}
.pc_fee_modal_buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.pc_fee_modal_box .pc_fee_modal_hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: #666;
}
