body {
	background-color: var(--bs-body-bg);
	color: var(--bs-body-color);
}

.is-disabled {
  /* Make it visually greyed out */
  opacity: 0.5;
  filter: grayscale(100%);

  /* Disable all mouse interactions */
  pointer-events: none;

  /* Optional: Prevent text selection */
  user-select: none;
}

.subscription:first-child {
	border-width: 1px;
	border-style: solid;
	--bs-border-opacity: 1;
  border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity)) !important;
}

.subscription {
	border-width: 1px;
	border-style: solid;
	--bs-border-opacity: 1;
  border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity)) !important;
	border-top: 0px;
}

.subscription:hover {
	--bs-bg-opacity: 1;
  background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
}

.subscription .badge {
	line-height: normal;
}

.settings-panel {
	background-color: var(--bs-dark-bg-subtle);
	border-right: 1px solid var(--bs-border-color);
	padding: 20px;
}

.design-area {
	padding: 20px;
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background-color: var(--bs-dark-bg-subtle);
	position: relative;
}

.card-canvas, .card-canvas-back {
	width: 100%;
	max-width: 1013px;
	height: auto;
	aspect-ratio: 1013 / 638;
	background-color: white;
	box-shadow: 0 0 15px rgba(0,0,0,0.3);
	position: relative;
	border-radius: 6.36mm;
	overflow: hidden; /* Visszaállítva hidden-re a tiszta vágáshoz */
	margin-left: auto;
	margin-right: auto;
}

.background-container {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	overflow: hidden;
	border-radius: inherit;
	/* Örökli a card-canvas border-radius értékét */
}

.background-image {
	position: absolute;
	cursor: move;
	max-width: none;
	max-height: none;
	transform-origin: center;
	user-select: none;
}

.background-image.finalized {
	cursor: default;
	width: 100% !important;
	height: 100% !important;
	left: 0 !important;
	top: 0 !important;
	object-fit: cover;
	display: block;
	border-radius: inherit;
	/* Ez is örökli a border-radius-t */
}

#resizeHandlesContainer, #resizeHandlesContainerBack {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;        /* A konténer átengedje az eseményeket */
	z-index: 999;               /* A fogantyú z-indexe alatt */
}

.background-resize-handle {
	position: fixed;
	width: 10px;
	height: 10px;
	background: var(--bs-primary);
	border: 1px solid white;
	border-radius: 50%;
	cursor: se-resize !important;  /* !important hozzáadva */
	z-index: 1000;                /* Megnövelt z-index */
	box-shadow: 0 0 5px rgba(0,0,0,0.3);
	pointer-events: auto;         /* Explicit pointer-events beállítás */
}

.background-resize-handle:hover {
	transform: scale(1.1);
}

.background-resize-handle.top-left {
	cursor: nw-resize;
}

.background-resize-handle.top-right {
	cursor: ne-resize;
}

.background-resize-handle.bottom-left {
	cursor: sw-resize;
}

.background-resize-handle.bottom-right {
	cursor: se-resize;
}

.settings-group {
	background-color: var(--bs-tertiary-bg);
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 15px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.settings-group h6 {
	color: var(--bs-heading-color);
	border-bottom: 1px solid var(--bs-border-color);
	padding-bottom: 10px;
	margin-bottom: 15px;
}

/*.form-control,
.form-select {
	background-color: var(--bs-form-control-bg);
	border-color: var(--bs-border-color);
	color: var(--bs-body-color);
}

.form-control:focus,
.form-select:focus {
	background-color: var(--bs-form-control-bg);
	border-color: var(--bs-primary);
}*/

.navbar {
	background-color: var(--bs-tertiary-bg) !important;
	border-bottom: 1px solid var(--bs-border-color);
}

.navbar-brand {
	color: var(--bs-body-color);
}

/* File input stílus */
.form-control[type="file"]::file-selector-button {
	background-color: var(--bs-secondary-bg);
	color: var(--bs-body-color);
	border-color: var(--bs-border-color);
}

.form-control[type="file"]::file-selector-button:hover {
	background-color: var(--bs-primary);
	color: white;
}

/* Átfedés megakadályozása */
.background-image,
.resize-handle {
	will-change: transform;
	transform: translate3d(0, 0, 0);
}

/* QR kód stílusok front */
.qr-code-container, .qr-code-container-back {
	position: absolute;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: move;
}

.qr-code-wrapper, .qr-code-wrapper-back {
	position: relative;
	width: 100%;
	height: 100%;
}

#qrCode, #qrCodeBack {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

#qrCode canvas, #qrCodeBack canvas {
	width: 100% !important;
	height: 100% !important;
}

.qr-resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--bs-primary);
  border: 1px solid white;
  border-radius: 50%;
  bottom: -5px;
  right: -5px;
  cursor: se-resize;
  z-index: 11;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.card-number-container {
	position: absolute;
	cursor: move;
	z-index: 10;
	user-select: none;
	padding: 4px 8px;
	border-radius: 3px;
}

.card-number-preview {
	font-family: var(--selected-font);
	color: var(--text-color);
	margin: 0;
	white-space: nowrap;
}

/* Kártya hátulja stílusok */
.background-container-back {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	overflow: hidden;
	border-radius: inherit;
	/* Örökli a card-canvas border-radius értékét */
}

.background-image-back {
	position: absolute;
	cursor: move;
	max-width: none;
	max-height: none;
	transform-origin: center;
	user-select: none;
}

.background-image-back.finalized {
	cursor: default;
	width: 100% !important;
	height: 100% !important;
	left: 0 !important;
	top: 0 !important;
	object-fit: cover;
	display: block;
	border-radius: inherit;
	/* Ez is örökli a border-radius-t */
}

.background-resize-handle-back {
	position: fixed;
	width: 10px;
	height: 10px;
	background: var(--bs-primary);
	border: 1px solid white;
	border-radius: 50%;
	cursor: se-resize !important;  /* !important hozzáadva */
	z-index: 1000;                /* Megnövelt z-index */
	box-shadow: 0 0 5px rgba(0,0,0,0.3);
	pointer-events: auto;         /* Explicit pointer-events beállítás */
}

.background-resize-handle-back:hover {
	transform: scale(1.1);
}

.background-resize-handle-back.top-left {
	cursor: nw-resize;
}

.background-resize-handle-back.top-right {
	cursor: ne-resize;
}

.background-resize-handle-back.bottom-left {
	cursor: sw-resize;
}

.background-resize-handle-back.bottom-right {
	cursor: se-resize;
}

.background-image-back,
.resize-handle-back {
	will-change: transform;
	transform: translate3d(0, 0, 0);
}

.card-number-container-back {
	position: absolute;
	cursor: move;
	z-index: 10;
	user-select: none;
	padding: 4px 8px;
	border-radius: 3px;
}

.card-number-preview-back {
	font-family: var(--selected-font);
	color: var(--text-color);
	margin: 0;
	white-space: nowrap;
}

@media (max-width: 991.98px) {
  .design-area {
    padding-top: 40px; /* Hely a beállítások panel felett */
  }
}