@font-face {
  font-family: "Bellota";
  src: url("../webfonts/Bellota/Bellota-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Bellota";
  src: url("../webfonts/Bellota/Bellota-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Bellota";
  src: url("../webfonts/Bellota/Bellota-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: "Bellota";
  src: url("../webfonts/Bellota/Bellota-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
}
@font-face {
  font-family: "Marck Script";
  src: url("../webfonts/Marck_Script/MarckScript-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Pacifico";
  src: url("../webfonts/Pacifico/Pacifico-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Playpen Sans";
  src: url("../webfonts/Playpen_Sans/PlaypenSans-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
}
#canvas-container {
  position: relative;
  /*top: 60px;
  left: 280px;
  right: 240px;
  bottom: 0;
  background: #f1f5f9;*/
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /*overflow: visible;*/
  overflow: hidden;
  padding: 42px;
  flex-grow: 1;
}

.trf-editor button {
    border: none;
}

.trf-editor--title-mobile-grid {
    display: flex;
    flex-direction: row;
  justify-content: space-between;
}
.trf-editor--title-mobile-grid .trf-editor--footer-bar--links {
    gap: 4px;
}

.trf-editor--canvas-wrapper {
  display: flex;
  justify-content: stretch;
  flex-grow: 1;
  padding: 0 64px;
  overflow: hidden;
}
.trf-editor--panel {
	flex: 0 0 240px;
  display: flex;
      flex-direction: column;
	  padding: 16px 16px 42px;
	  gap: 24px;
	  
}

#preview-canvas {
  background: white;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  cursor: move;
  max-width: 100%;
  max-height: 50vh;
  height: auto;
  border-radius: 16px;
  touch-action: none;
    border-image-slice: 40% 39% 40% 39% fill;
    border-image-width: 25px;
    border-image-outset: 8px;
    border-image-repeat: repeat repeat;
	position: relative;
}
#canvas-stage {
  position: relative;
  max-width: 1200px;
  max-height: 50vh;
  overflow: visible;
  touch-action: none;
  margin: auto;
}

#canvas-stage.round #preview-canvas {
	border-radius: 50%;
}

#selection-overlay {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
#selection-box {
  position: absolute;
  border: 2px dashed #FF02F0;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: move;
  transform-origin: center center;
  background: transparent;
  touch-action: none;
}
.selection-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  background: #FF02F0;
  border: 2px solid #fff;
  border-radius: 3px;
  box-sizing: border-box;
  pointer-events: auto;
  touch-action: none;
}
#rotate-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  background: #8930FD;
  border: 2px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}
#layers-panel {
  flex-direction: column;
  justify-content: space-between;
}
#layers-list {
  overflow-y: auto;
}
.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #D9D9D9;
  border-radius: var(--border-radius--default);
  cursor: grab;
  user-select: none;
    transition: var(--transition--static-x-fast);
	color: var(--color-text);
}
.layer-item:hover {
	border: 1px solid rgba(var(--color-secondary--rgb), .5);
    transition: var(--transition--hover-x-fast);
	color: var(--color-text--black);
}
.layer-item.selected {
	border: 1px solid rgba(var(--color-secondary--rgb), 1);
	color: rgba(var(--color-secondary--rgb), 1);
}
.layer-thumb {
  width: 64px;
  height: 48px;
  background: #e2e8f0;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #64748b;
  flex-shrink: 0;
  overflow: hidden;
}
.layer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#properties-panel {
  overflow-y: auto;
}
.btn {
  @apply px-3 py-1.5 rounded text-sm font-medium transition;
}
.btn-primary {
  background: linear-gradient(135deg, #FF02F0, #8930FD);
  color: white;
}
.btn-secondary {
  background: #f1f5f9;
  color: #334155;
}
.btn-secondary:hover {
  background: #e2e8f0;
}
canvas {
  display: block;
}

.trf-editor-layers-buttons {
	font-size: 0;
    list-style-type: none;
    margin: 0;
    padding: 0;
    position: relative;
    transition: var(--transition--static);	
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: space-between;
}
.trf-editor-layers-buttons img,
.trf-editor-layers-buttons svg {
	width: 16px;
	height: 16px;
}

.trf-editor--header-bar {
  padding: 0 32px;
}
.trf-editor--header-bar header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.trf-editor--header-bar header>*:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.trf-editor--header-bar header .trf-logo-link img {
    max-height: 48px;
    max-width: 96px;
}
.trf-editor--header-bar header h1 {
	margin: 0;
}
.trf-editor--grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100%;
}

.trf-editor--footer-bar {
  /*display: flex;
  flex-direction: row;*/
  padding: 0 64px 32px;
  display: grid;
  /* 1fr - равная доля, auto - по контенту, 1fr - равная доля */
  grid-template-columns: 1fr auto 1fr; 
  align-items: center; /* Центрирование по вертикали */
  width: 100%;
}
.trf-editor--footer-bar--links {
	display: flex;
	gap: 24px;
}
.trf-editor--footer-bar--links > * {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 4px 8px;
	gap: 4px;
	border-radius: var(--border-radius--default);
	text-decoration: none;
  transition: var(--transition--static);
  cursor: pointer;
}
.trf-editor--footer-bar--links img, 
.trf-editor--footer-bar--links svg {
  width: 16px;
  height: 16px;
}
.trf-editor--footer-bar--links .trf-link-danger {
	color: rgba(233, 58, 59, 1);
	background-color: rgba(233, 58, 59, 0);
}
.trf-editor--footer-bar--links .trf-link-danger:hover {
	background-color: rgba(233, 58, 59, 0.2);
}
.trf-editor--footer-bar--links .trf-link-info {
	color: rgba(var(--color-secondary--rgb), 1);
	background-color: rgba(var(--color-secondary--rgb),0);
}
.trf-editor--footer-bar--links .trf-link-info:hover {
	background-color: rgba(var(--color-secondary--rgb),0.2);
}
.trf-editor--footer-bar>* {
  display: flex;
  align-items: center;
}
.trf-editor--footer-bar>*:first-child,
.trf-editor--footer-bar>*:last-child {
  flex-grow: 1;
}
.trf-editor--footer-buttons-block {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: center;
}
*[class*="trf-editor--button-"] {
  border: none;
  cursor: pointer;
  transition: var(--transition--static);
  padding: 0;
}
*[class*="trf-editor--button-"]:hover {
  transition: var(--transition--hover);
}
*[class*="trf-editor--button--history-"],
*[class*="trf-editor--button--history-"] > * {
  width: 32px;
  height: 32px;
  background: transparent;
}

*[class*="trf-editor--button--history-"] > * path {
  fill: #666666;
}
*[class*="trf-editor--button--history-"]:disabled {
  opacity: .3;
}
*[class*="trf-editor--button--history-"]:disabled > * path {
  fill: #999999;
}


.trf-editor-layers-add-buttons {
	display: flex;
	align-items: center;
	flex-direction: row;
	gap: 16px;
	margin-top: 16px;
}
.trf-editor-layers-add-buttons > * {
	border-radius: var(--border-radius--default);
	gap: 10px;
	padding: 8px 16px;
	display: flex;
    flex-direction: row;
    font-size: var(--font-size-default);
    line-height: var(--font-size-default);
    font-weight: 700;
    justify-content: center;
	align-items: center;
	text-decoration: none;
    transition: var(--transition--static-x-fast);
	white-space: nowrap;
	height: 32px;
}
.trf-btn-constructor--generate {
	color: var(--color-contrast);
	background: linear-gradient(90deg, rgb(var(--color-primary--rgb)), rgb(var(--color-secondary--rgb)));
}

.trf-btn-constructor--text {
	color: rgb(var(--color-secondary--rgb));
    background-color: rgba(var(--color-secondary--rgb), 0.2);
}
.trf-editor-layers-add-buttons > *  svg,
.trf-editor-layers-add-buttons > *  img {
  width: 16px;
  height: 16px;
}


.trf-editor--button--history-redo > * {
  transform: scaleX(-1);
}
.trf-editor--button--add-image {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;      
  background: linear-gradient(90deg, #FF02F0 0%, #8930FD 100%);
  /*background: linear-gradient(90deg, rgb(var(--color-primary--rgb)), rgb(var(--color-secondary--rgb)));*/
}
.trf-editor--button--add-image:hover {
  transform: scale(1.05);
}
.trf-editor--button--add-image img,
.trf-editor--button--add-image svg {
  width: 32px;
  height: 32px;
}

.trf-editor--grid .trf-product-details-options {
  flex-direction: row;
  z-index: 10;
}

.trf-editor--footer--price-block {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
}

.trf-editor--footer--price-block .trf-btn {
  border: none;
  height: 48px;
  padding: 12px 32px;
}
.trf-editor--footer--price-block .trf-card-product--price {

}
.trf-editor-layers-add-buttons {
	position: relative;
}
.trf-form-ai {
	display: flex;
	flex-direction: column;
}
#status {
	width: 100%;
    white-space: break-spaces;
}
.trf-modal.trf-modal-generate {
	position: absolute;
    top: 0;
    left: 0;
    transform: translate(0, calc(-100% - 16px));
    right: 0;
    height: initial;
    padding: 0;
}
.trf-modal.trf-modal-generate .trf-modal-close {
    right: 4px;
    top: 4px;	
}
.trf-modal.trf-modal-generate .trf-modal-heading {
    padding: 16px 16px 0;
	margin: 0;
}
.trf-modal.trf-modal-generate .trf-modal-body {
	padding: 16px;
}
.trf-modal.trf-modal-generate .trf-modal-content {
	width: 100%;
}
.trf-modal-generate textarea {
	resize: none;
	margin: 0;
}
.trf-modal-generate fieldset {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.trf-modal.trf-modal-generate::after {
	display: none;
}

.trf-btn-constructor--generate {
	position: relative;
	overflow: hidden;
}
.trf-btn-constructor--generate span {
	position: relative;
	z-index: 0;
	display: flex;
    flex-direction: row;
	gap: 10px;
	align-items: center;
}
.progress-container {
	position: absolute;
	pointer-events: none;
	z-index: 1;
	width: 100%;
    height: 100%;
	display: flex;
    flex-direction: row;
	gap: 10px;
	align-items: center;
	background-color: var(--color-text--muted);
}
.trf-btn-constructor--generate:not(.progress) .progress-container {
	opacity: 0;
}
.trf-btn-constructor--generate.progress .progress-container .progress-bar {
	opacity: 1;
}
.progress-bar {
    background-image: 	linear-gradient(-45deg,
						rgba(var(--color-secondary--rgb),.45) 25%,
						rgba(var(--color-secondary--rgb),.25) 25%,
						rgba(var(--color-secondary--rgb),.25) 50%,
						rgba(var(--color-secondary--rgb),.45) 50%,
						rgba(var(--color-secondary--rgb),.45) 75%,
						rgba(var(--color-secondary--rgb),.25) 75%,
						rgba(var(--color-secondary--rgb),.25));
    background-size: 48px 48px;
	height: 100%;
    align-items: center;
    display: flex;
	padding: 8px 24px;
}
.trf-btn-constructor--generate.progress .progress-container .progress-bar {
    animation: generate-progress 2s linear infinite;
}

@keyframes generate-progress {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 48px 0
    }
}

.sp-container.sp-flat {
	box-shadow: none;
	width: 100%;
	overflow: visible;
}
.sp-picker-container {
    width: 100% !important;
    padding: 0 !important;
}
.trf-props-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.trf-props-grid > div {
	flex-direction: column;
	display: flex;
	gap: 8px;
}
.trf-props-grid > div.trf-props-row {
	display: flex;
	flex-direction: row;
	align-items: center;
}
.trf-props-row select,
.trf-props-row input[type="text"],
.trf-props-row input[type="number"] {
	width: 100%;
}
/*.trf-props-row > *:first-child {
	min-width: 60px;
}*/
.trf-props-style {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;	
	gap: 8px;
}
.trf-props-style label {
	border-radius: var(--border-radius--default);
    padding: 4px 8px;
	border: 1px solid #D9D9D9;
	cursor: pointer;
	text-align: center;
	flex-grow: 1;
}
.trf-props-style label.selected {
	background-color: rgba(var(--color-secondary--rgb), 1);
    border-color: rgba(var(--color-secondary--rgb), 1);
    color: var(--color-contrast);
}
.trf-form .trf-props-style input[type=checkbox] {
    margin: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.trf-editor-size-wrapper {
	max-height: 40vh;
    overflow-y: auto;
}


.trf-editor-size-wrapper [class*=trf-nav-].trf-nav-cat-footer>li>* {
	font-size: 12px;
    color: var(--color-paragraph);
}


@media (max-width: 1440px) {
    .trf-editor--canvas-wrapper {
        padding: 0 32px;
    }
	.trf-editor--footer-bar {
		padding: 0 32px 32px;
	}
}

@media (max-width: 687.99px) {	
	.trf-editor--panel {
		position: fixed;
		z-index: 1000;
		bottom: 225px;
		height: calc(100dvh - 241px);
		width: calc(100vw - 32px);
		box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
		background-color: #fff;
		border-radius: var(--border-radius--default);	
		padding: 16px;
	}
	.trf-editor--panel:not(.active) {
		display: none;
	}
	.trf-editor--canvas-wrapper {
		padding: 0 16px 200px !important;
	}
	.trf-editor--header-bar {
        padding: 0 16px !important;
    }
	#canvas-container {
		padding: 16px !important;
	}
	.trf-editor--footer-bar {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 16px;
		padding: 0;
	}
	.trf-editor--footer--price-block {
		width: 100%;
		padding-left: 16px;
		justify-content: space-between;
	}
	header .trf-logo-link img {
		height: 32px;
	}
	h3.msoptionsprice-name {
		margin: 0;
		color: color: var(--color-text--muted);
	}
	.trf-editor--footer-bar .trf-toggler {
		flex-grow: 1;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
	}
	.trf-editor--footer-bar .trf-toggler.active path {
		fill: rgb(var(--color-primary--rgb));
	}
	jdiv[class*=jivoMobileButton] {
        bottom: 200px !important;
    }	
	.trf-editor--header-bar header h1 {
		
	}
	.trf-editor--header-bar header {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}	
	#canvas-stage,
	#preview-canvas {
		max-height: 40vh;
	}
	.trf-editor--grid .trf-product-details-options {
		width: 100%;
	}
	.trf-editor--grid .trf-product-details-options > * {
		padding-left: 0 !important;
	}
}

@media (min-width: 688px) {
	.trf-editor {
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		position: fixed;
	}
}