/* Portrait-specific PF_parte styles are split into this file. */

.pf-parte-generator-portrait-controls {
	margin-top: 1.5rem;
	padding: 1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 18px;
}

.pf-parte-generator-portrait-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.pf-parte-generator-portrait-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--parte-text-primary);
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
}

.pf-parte-generator-portrait-toggle input {
	accent-color: var(--parte-gold);
}

.pf-parte-generator-portrait-reset-button {
	padding: 0.68rem 0.95rem;
	border-radius: 12px;
	border: 1px solid rgba(221, 181, 74, 0.28);
	background: rgba(255, 255, 255, 0.05);
	color: var(--parte-gold-light);
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	transition: var(--parte-transition);
}

.pf-parte-generator-portrait-reset-button:hover {
	border-color: rgba(221, 181, 74, 0.5);
	background: rgba(212, 175, 55, 0.1);
}

.pf-parte-generator-portrait-slider-group {
	margin-top: 0.95rem;
}

.pf-parte-generator-portrait-slider-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.45rem;
	color: var(--parte-text-primary);
	font-size: 0.82rem;
	font-weight: 600;
}

.pf-parte-generator-portrait-slider-title {
	color: var(--parte-text-secondary);
}

.pf-parte-generator-portrait-slider {
	width: 100%;
	height: 6px;
	background: var(--parte-bg-medium);
	border-radius: 999px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.pf-parte-generator-portrait-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--parte-gold);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pf-parte-generator-portrait-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: none;
	border-radius: 50%;
	background: var(--parte-gold);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pf-parte-generator-portrait-quick-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin-top: 0.9rem;
}

.pf-parte-generator-portrait-action-button {
	min-height: 48px;
	padding: 0.85rem 1rem;
	border-radius: 16px;
	border: 1px solid rgba(240, 216, 125, 0.2);
	background: linear-gradient(180deg, rgba(215, 185, 112, 0.18), rgba(117, 82, 34, 0.32));
	color: #fff3d4;
	font-weight: 700;
	cursor: pointer;
	transition: var(--parte-transition);
}

.pf-parte-generator-portrait-action-button:hover {
	transform: translateY(-1px);
	border-color: rgba(240, 216, 125, 0.36);
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.pf-parte-generator-portrait-action-button-secondary {
	background: rgba(255, 255, 255, 0.04);
	color: #e4d9c4;
}

.pf-parte-generator-portrait-status {
	margin-top: 0.9rem;
	padding: 0.95rem 1rem;
	border-radius: 18px;
	border: 1px solid rgba(240, 216, 125, 0.12);
	background: linear-gradient(180deg, rgba(255, 248, 228, 0.04), rgba(15, 15, 15, 0.22));
}

.pf-parte-generator-portrait-status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: rgba(212, 175, 55, 0.14);
	color: #f6dfa1;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pf-parte-generator-portrait-status-text {
	margin: 0.7rem 0 0;
	color: var(--parte-text-secondary);
	line-height: 1.6;
}

.pf-parte-generator-portrait-object {
	position: absolute;
	top: 24mm;
	left: calc(100% - 23mm - 42mm);
	width: 42mm;
	height: 54mm;
	transform: translate(var(--pf-parte-portrait-x, 0px), var(--pf-parte-portrait-y, 0px)) scale(var(--pf-parte-portrait-scale, 1));
	transform-origin: center center;
	cursor: grab;
	pointer-events: auto;
}

.pf-parte-generator-portrait-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border: 1px solid rgba(38, 38, 38, 0.12);
	background: #ece9e3;
}

.pf-parte-generator-portrait-media.has-frame::after,
.pf-parte-generator-portrait-modal-media.has-frame::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	box-sizing: border-box;
	border: var(--pf-parte-portrait-frame-width, 8px) solid rgba(92, 74, 44, 0.78);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
	z-index: 2;
}

.pf-parte-generator-portrait-media.has-frame[data-frame-style="classic"]::after,
.pf-parte-generator-portrait-modal-media.has-frame[data-frame-style="classic"]::after {
	border-color: rgba(98, 78, 49, 0.82);
	box-shadow: inset 0 0 0 1px rgba(238, 225, 197, 0.46), inset 0 0 0 calc(var(--pf-parte-portrait-frame-width, 8px) / 2.8) rgba(47, 32, 16, 0.16);
}

.pf-parte-generator-portrait-media.has-frame[data-frame-style="memorial"]::after,
.pf-parte-generator-portrait-modal-media.has-frame[data-frame-style="memorial"]::after {
	border-color: rgba(45, 45, 45, 0.88);
	box-shadow: inset 0 0 0 2px rgba(245, 237, 210, 0.82), inset 0 0 0 calc(var(--pf-parte-portrait-frame-width, 8px) / 2.1) rgba(22, 22, 22, 0.2);
}

.pf-parte-generator-portrait-media.has-frame[data-frame-style="gold"]::after,
.pf-parte-generator-portrait-modal-media.has-frame[data-frame-style="gold"]::after {
	border-color: rgba(181, 135, 42, 0.92);
	box-shadow: inset 0 0 0 1px rgba(255, 246, 214, 0.9), inset 0 0 0 calc(var(--pf-parte-portrait-frame-width, 8px) / 2.3) rgba(132, 92, 21, 0.22), 0 0 0 1px rgba(88, 57, 12, 0.12);
}

.pf-parte-generator-portrait-media.has-frame[data-frame-style="soft"]::after,
.pf-parte-generator-portrait-modal-media.has-frame[data-frame-style="soft"]::after {
	border-color: rgba(222, 212, 193, 0.95);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 0 0 calc(var(--pf-parte-portrait-frame-width, 8px) / 2.4) rgba(175, 157, 132, 0.22);
}

.pf-parte-generator-portrait-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(var(--pf-parte-portrait-crop-x, 0px), var(--pf-parte-portrait-crop-y, 0px)) scale(var(--pf-parte-portrait-crop-scale, 1));
	filter: grayscale(var(--pf-parte-portrait-grayscale, 0%)) brightness(var(--pf-parte-portrait-brightness, 100%)) contrast(var(--pf-parte-portrait-contrast, 100%)) saturate(var(--pf-parte-portrait-saturation, 100%));
	display: block;
}

.pf-parte-generator-portrait-object.is-dragging,
.pf-parte-generator-portrait-object:active {
	cursor: grabbing;
}

.pf-parte-generator-portrait-object img {
	pointer-events: none;
}

.pf-parte-generator-portrait-resize {
	position: absolute;
	right: -9px;
	bottom: -9px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.95);
	background: var(--parte-gold);
	box-shadow: 0 8px 14px rgba(0, 0, 0, 0.22);
	cursor: nwse-resize;
}

.pf-parte-generator-a4-photo-placeholder {
	position: absolute;
	top: 24mm;
	left: calc(100% - 23mm - 42mm);
	width: 42mm;
	height: 54mm;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed rgba(88, 88, 88, 0.35);
	background: rgba(250, 250, 250, 0.88);
	color: #999;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	pointer-events: none;
}

.pf-parte-generator-portrait-modal {
	position: fixed;
	inset: 0;
	z-index: 25100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.pf-parte-generator-portrait-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 9, 10, 0.84);
	backdrop-filter: blur(8px);
}

.pf-parte-generator-portrait-modal-dialog {
	position: relative;
	width: min(1180px, 100%);
	max-height: calc(100vh - 50px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 28px;
	border: 1px solid rgba(240, 216, 125, 0.16);
	background: linear-gradient(180deg, rgba(29, 22, 18, 0.98), rgba(11, 10, 10, 0.98));
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(240, 216, 125, 0.06);
}

.pf-parte-generator-portrait-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.4rem;
	background: linear-gradient(135deg, rgba(84, 58, 31, 0.98), rgba(167, 127, 61, 0.92) 58%, rgba(52, 35, 18, 0.98));
}

.pf-parte-generator-portrait-modal-title {
	margin: 0.32rem 0 0;
	font-size: 1.3rem;
	color: #fff6de;
}

.pf-parte-generator-portrait-modal-close {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(0, 0, 0, 0.18);
	color: #fff8eb;
	font-size: 1rem;
	cursor: pointer;
	transition: var(--parte-transition);
}

.pf-parte-generator-portrait-modal-close:hover {
	transform: rotate(90deg) scale(1.05);
	background: rgba(0, 0, 0, 0.3);
}

.pf-parte-generator-portrait-modal-body {
	overflow-y: auto;
	padding: 1.4rem;
}

.pf-parte-generator-portrait-modal-layout {
	display: grid;
	grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
	gap: 1.2rem;
	align-items: start;
}

.pf-parte-generator-portrait-modal-settings,
.pf-parte-generator-portrait-modal-preview {
	border-radius: 24px;
	border: 1px solid rgba(240, 216, 125, 0.12);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(8, 8, 8, 0.28));
	padding: 1.1rem;
}

.pf-parte-generator-portrait-modal-note {
	padding: 1rem;
	border-radius: 18px;
	border: 1px solid rgba(240, 216, 125, 0.12);
	background: rgba(255, 245, 220, 0.04);
}

.pf-parte-generator-portrait-modal-note-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: rgba(212, 175, 55, 0.16);
	color: #f4d79a;
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pf-parte-generator-portrait-modal-note-text {
	margin: 0.72rem 0 0;
	color: #ddd0bc;
	line-height: 1.6;
}

.pf-parte-generator-portrait-modal-toolbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin-top: 1rem;
}

.pf-parte-generator-portrait-editor-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin-top: 0.8rem;
}

.pf-parte-generator-portrait-editor-group {
	padding: 0.85rem 0.9rem;
	border-radius: 18px;
	border: 1px solid rgba(240, 216, 125, 0.1);
	background: rgba(255, 255, 255, 0.02);
}

.pf-parte-generator-portrait-frame-group {
	margin-top: 0.8rem;
}

.pf-parte-generator-portrait-frame-controls {
	margin-top: 0.95rem;
}

.pf-parte-generator-portrait-editor-grid-frame {
	margin-top: 0;
}

.pf-parte-generator-portrait-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
}

.pf-parte-generator-portrait-switch-copy {
	display: flex;
	flex-direction: column;
	gap: 0.28rem;
}

.pf-parte-generator-portrait-switch-subtitle {
	color: #cdbb98;
	font-size: 0.76rem;
	line-height: 1.5;
}

.pf-parte-generator-portrait-switch-control {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
}

.pf-parte-generator-portrait-switch-control input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.pf-parte-generator-portrait-switch-track {
	position: relative;
	display: inline-flex;
	width: 52px;
	height: 30px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(240, 216, 125, 0.14);
	transition: var(--parte-transition);
}

.pf-parte-generator-portrait-switch-track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff2c9;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
	transition: transform 0.22s ease;
}

.pf-parte-generator-portrait-switch-control input:checked + .pf-parte-generator-portrait-switch-track {
	background: linear-gradient(135deg, rgba(212, 175, 55, 0.84), rgba(135, 98, 31, 0.92));
	border-color: rgba(255, 233, 170, 0.4);
}

.pf-parte-generator-portrait-switch-control input:checked + .pf-parte-generator-portrait-switch-track::after {
	transform: translateX(22px);
}

.pf-parte-generator-portrait-modal-hint {
	margin-top: 0.9rem;
	padding: 0.85rem 0.95rem;
	border-radius: 16px;
	background: rgba(240, 216, 125, 0.08);
	color: #ecd9b2;
	line-height: 1.6;
}

.pf-parte-generator-portrait-modal-preview {
	min-height: 100%;
}

.pf-parte-generator-portrait-modal-preview-label {
	color: #f3e7c5;
	font-weight: 700;
	margin-bottom: 0.9rem;
}

.pf-parte-generator-portrait-modal-frame {
	position: relative;
	width: min(100%, 420px);
	aspect-ratio: 58 / 74;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 18px;
	border: 1px solid rgba(240, 216, 125, 0.18);
	background: linear-gradient(180deg, #efe7da, #d7cfc4);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 22px 46px rgba(0, 0, 0, 0.28);
	cursor: grab;
}

.pf-parte-generator-portrait-modal-frame.is-dragging {
	cursor: grabbing;
}

.pf-parte-generator-portrait-modal-frame::after {
	content: 'Bild im Rahmen ziehen';
	position: absolute;
	left: 50%;
	bottom: 12px;
	transform: translateX(-50%);
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(17, 15, 14, 0.7);
	color: #f0dfbf;
	font-size: 0.72rem;
	letter-spacing: 0.02em;
}

.pf-parte-generator-portrait-modal-media {
	position: absolute;
	inset: 0;
}

.pf-parte-generator-portrait-modal-media img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(var(--pf-parte-portrait-modal-crop-x, 0px), var(--pf-parte-portrait-modal-crop-y, 0px)) scale(var(--pf-parte-portrait-modal-crop-scale, 1));
	filter: grayscale(var(--pf-parte-portrait-modal-grayscale, 0%)) brightness(var(--pf-parte-portrait-modal-brightness, 100%)) contrast(var(--pf-parte-portrait-modal-contrast, 100%)) saturate(var(--pf-parte-portrait-modal-saturation, 100%));
	display: block;
	pointer-events: none;
}

.pf-parte-generator-portrait-modal-actions {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
	padding: 1rem 1.4rem 1.3rem;
	border-top: 1px solid rgba(240, 216, 125, 0.08);
	background: rgba(0, 0, 0, 0.18);
}

.pf-parte-generator-portrait-modal-actions-right {
	display: flex;
	gap: 0.8rem;
}

@media (max-width: 980px) {
	.pf-parte-generator-portrait-quick-actions,
	.pf-parte-generator-portrait-modal-toolbar,
	.pf-parte-generator-portrait-editor-grid {
		grid-template-columns: 1fr;
	}

	.pf-parte-generator-portrait-switch {
		align-items: flex-start;
	}

	.pf-parte-generator-portrait-modal-layout {
		grid-template-columns: 1fr;
	}

	.pf-parte-generator-portrait-modal-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.pf-parte-generator-portrait-modal-actions-right {
		width: 100%;
		flex-direction: column;
	}
}

@media print {
	body.pf-parte-generator-printing .pf-parte-generator-a4-photo-placeholder {
		display: none !important;
	}

	body.pf-parte-generator-printing .pf-parte-generator-portrait-modal,
	body.pf-parte-generator-printing .pf-parte-generator-portrait-resize {
		display: none !important;
	}
}
