.hab-app {
	width: 100%;
	margin: 0 0 20px 0;
}

.hab-stage-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border: 2px dashed #ccc;
	border-radius: 8px;
	overflow: hidden;
}

.hab-stage-wrap.has-image {
	border: none;
}

.hab-layer-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hab-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hab-layer-circle {
	z-index: 2;
}

.hab-layer-text {
	z-index: 5;
}

.hab-dog-img {
	position: absolute;
	z-index: 1;
	cursor: move;
	touch-action: none;
}

.hab-move-icon {
	position: absolute;
	z-index: 3;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background-color: rgba( 0, 0, 0, 0.6 ) !important;
	transform: translate( -50%, -50% );
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hab-move-icon svg {
	width: 32px;
	height: 32px;
}

.hab-move-icon.is-loading svg {
	display: none;
}

.hab-move-icon.is-loading::before {
	content: "";
	width: 32px;
	height: 32px;
	border: 4px solid rgba( 255, 255, 255, 0.3 );
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: hab-spin 0.8s linear infinite;
}

@keyframes hab-spin {
	to { transform: rotate( 360deg ); }
}

.hab-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 4;
}

.hab-stage-wrap.has-image .hab-file-input {
	pointer-events: none;
}

.hab-upload-box {
	position: absolute;
	transform: translate( -50%, -50% );
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #666;
	text-align: center;
	padding: 14px;
	pointer-events: none;
	z-index: 2;
	width: 60%;
}

.hab-upload-text {
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

.hab-upload-sub {
	font-size: 12px;
	color: #888;
}

/* ---- Cropper.js: grosse, gut greifbare Eckpunkte statt Standard-Mini-Anfasser ---- */
.cropper-point.point-ne,
.cropper-point.point-nw,
.cropper-point.point-se,
.cropper-point.point-sw {
	width: 28px;
	height: 28px;
	background-color: #ffffff;
	opacity: 1;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.6 );
}

.cropper-point.point-n,
.cropper-point.point-e,
.cropper-point.point-s,
.cropper-point.point-w {
	display: none;
}

.cropper-line {
	pointer-events: none;
}
.hab-crop-modal {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hab-crop-modal-inner {
	width: 100%;
	max-width: 480px;
	padding: 16px;
}

.hab-crop-hint {
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	margin: 0 0 12px 0;
}

.hab-crop-image-wrap {
	max-height: 70vh;
	overflow: hidden;
}

.hab-crop-image-wrap img {
	display: block;
	max-width: 100%;
}

.hab-crop-actions {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-top: 20px;
}

.hab-crop-btn {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.hab-crop-confirm {
	background: #ffffff;
	color: #111;
}

.hab-crop-cancel {
	background: #333333;
	color: #ffffff;
}

.hab-zoom-controls {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 6;
	display: flex;
	gap: 8px;
}

.hab-icon-btn {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background-color: rgba( 255, 255, 255, 0.92 ) !important;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.35 );
	cursor: pointer;
	padding: 0;
}

.hab-icon-btn::before,
.hab-icon-btn::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background-color: #111111 !important;
	border-radius: 2px;
}

#hab-zoom-in::before {
	width: 16px;
	height: 3px;
	transform: translate( -50%, -50% );
}

#hab-zoom-in::after {
	width: 3px;
	height: 16px;
	transform: translate( -50%, -50% );
}

#hab-zoom-out::before {
	width: 16px;
	height: 3px;
	transform: translate( -50%, -50% );
}

#hab-zoom-out::after {
	content: none;
}

.hab-icon-btn-dark {
	background-color: #000000 !important;
}

.hab-icon-btn-dark::before,
.hab-icon-btn-dark::after {
	background-color: #ffffff !important;
}

#hab-trash-btn::before {
	width: 18px;
	height: 3px;
	transform: translate( -50%, -50% ) rotate( 45deg );
}

#hab-trash-btn::after {
	width: 18px;
	height: 3px;
	transform: translate( -50%, -50% ) rotate( -45deg );
}

.hab-icon-btn:hover {
	filter: brightness( 0.92 );
}

/* ---- Fehlerbox: durchgaengig, gut lesbar, kein Kindergarten-Design ---- */
.hab-error-box {
	width: 100%;
	background: #b91c1c;
	color: #ffffff;
	font-weight: 600;
	padding: 12px 16px;
	border-radius: 6px;
	margin-top: 12px;
	box-sizing: border-box;
}

/* ---- Sidebar: Groessen & Preis ---- */
.hab-sidebar {
	margin-bottom: 16px;
}

.hab-sizes {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 8px;
	margin-bottom: 14px;
}

.hab-size-option {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	background: #ffffff;
	border: 2px solid #000000;
	border-radius: 5px;
	padding: 10px 12px;
	cursor: pointer;
}

.hab-size-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.hab-size-option:has( input:checked ) {
	background: #bd4600;
	border-color: #bd4600;
}

.hab-size-cm {
	font-weight: 700;
	font-size: 17px;
	color: #000000;
}

.hab-size-option:has( input:checked ) .hab-size-cm {
	color: #ffffff;
}

.hab-size-price,
.hab-size-price * {
	font-size: 17px;
	font-weight: 700;
	color: #000000 !important;
}

.hab-size-option:has( input:checked ) .hab-size-price,
.hab-size-option:has( input:checked ) .hab-size-price * {
	color: #ffffff !important;
}

.hab-price {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 12px;
}
