/* ==========================================================================
   Design tokens — kept as CSS custom properties so a site can override the
   look (e.g. brand color) without touching the rest of this file.
   ========================================================================== */
.shaker-configurator {
	--shaker-accent: #1d4ed8;
	--shaker-accent-hover: #1739a8;
	--shaker-ink: #16181d;
	--shaker-muted: #6b7280;
	--shaker-border: #e2e2e6;
	--shaker-backdrop: #e9e9ec;
	--shaker-panel-bg: #ffffff;
	--shaker-radius: 16px;
	--shaker-radius-sm: 10px;
	--shaker-radius-pill: 999px;
	--shaker-elevation-1: 0 1px 2px rgba( 16, 24, 40, 0.06 ), 0 1px 3px rgba( 16, 24, 40, 0.1 );
	--shaker-elevation-2: 0 4px 8px rgba( 16, 24, 40, 0.06 ), 0 8px 24px rgba( 16, 24, 40, 0.08 );
	font-family: 'Work Sans', sans-serif;
	color: var( --shaker-ink );
}

.shaker-quote-form {
	font-family: 'Work Sans', sans-serif;
}

/* Browsers don't inherit font-family into form controls by default —
   without this, inputs/buttons/selects would fall back to the system UI
   font even with Work Sans set on the containers above. */
.shaker-configurator input,
.shaker-configurator button,
.shaker-configurator select,
.shaker-configurator textarea,
.shaker-quote-form input,
.shaker-quote-form button,
.shaker-quote-form select,
.shaker-quote-form textarea {
	font-family: inherit;
}

.shaker-configurator {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 40px;
	margin: 24px 0;
	align-items: start;
}

/*
 * Full-screen mode: handled via a dedicated template (single-product-
 * shaker.php) that only wraps the configurator in the theme's own
 * get_header()/get_footer() — nothing else is rendered, so there's no
 * title/breadcrumbs/gallery/tabs to fight with CSS. This just makes sure
 * the wrapper itself uses the full viewport width, breaking out of
 * whatever container get_header() opens.
 */
#shaker-fullscreen-main {
	width: 100%;
}
#shaker-fullscreen-main .shaker-configurator {
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100vw;
	max-width: 100vw;
	min-height: calc( 100vh - var( --shaker-header-footer-offset, 160px ) );
	padding: 0;
	box-sizing: border-box;
	margin-top: 0;
	margin-bottom: 0;
	gap: 0;
}

/* ==========================================================================
   Preview panel — a full-bleed neutral studio backdrop behind the canvas,
   like a product photography backdrop, with the canvas floating on top.
   ========================================================================== */
.shaker-configurator__preview {
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var( --shaker-backdrop );
	padding: 40px;
	box-sizing: border-box;
	min-height: 100%;
}
#shaker-fullscreen-main .shaker-configurator__preview {
	min-height: calc( 100vh - var( --shaker-header-footer-offset, 160px ) );
}

.shaker-configurator__stage {
	position: relative;
	display: inline-block;
	background: transparent;
	overflow: hidden;
	min-height: 200px;
	max-width: 100%;
	border-radius: var( --shaker-radius-sm );
}

/* Kept in normal flow (unlike everything else, which is absolutely
   positioned) purely so the browser sizes .shaker-configurator__stage to
   match the real artwork's own aspect ratio, instead of a forced/guessed
   ratio that doesn't match the actual assets. max-height caps it to the
   viewport so a tall product photo can't make the whole page require
   scrolling — --shaker-canvas-max-vh is admin-configurable under
   WooCommerce → Shaker státuszok. */
.shaker-stage-sizer {
	display: block;
	max-width: 100%;
	max-height: calc( var( --shaker-canvas-max-vh, 80 ) * 1vh );
	width: auto;
	height: auto;
	visibility: hidden;
}

/* Parts overlap directly on one canvas — each part's PNGs are pre-rendered
   at the full canvas size/position with transparent padding, so no sector
   layout or coordinate alignment logic is needed here; stacking order just
   follows DOM/admin order via z-index. */
.shaker-part-layer {
	position: absolute;
	inset: 0;
}
.shaker-color-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.shaker-logo-overlay {
	position: absolute;
	left: 35%;
	top: 35%;
	width: 30%;
	height: 30%;
	z-index: 100;
	cursor: move;
	display: none;
	border: 1px dashed transparent;
	border-radius: 4px;
	transition: border-color 0.15s ease;
}
.shaker-logo-overlay.has-logo {
	display: block;
}
.shaker-logo-overlay:hover,
.shaker-logo-overlay.is-active {
	border-color: var( --shaker-accent );
}
.shaker-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}
.shaker-logo-resize-handle {
	position: absolute;
	right: -7px;
	bottom: -7px;
	width: 16px;
	height: 16px;
	background: var( --shaker-accent );
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: nwse-resize;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.25 );
}

/* ==========================================================================
   Controls sidebar — a fixed white "surface" panel, deliberately opaque
   regardless of whatever background the page/theme has, so it reads as a
   distinct card next to the gray preview backdrop.
   ========================================================================== */
.shaker-configurator__controls {
	min-width: 0;
	padding: 28px 24px;
	background: var( --shaker-panel-bg );
	border-radius: var( --shaker-radius );
	box-shadow: var( --shaker-elevation-1 );
}
#shaker-fullscreen-main .shaker-configurator__controls {
	padding: 40px 40px 40px 32px;
	border-radius: 0;
	box-shadow: none;
	border-left: 1px solid var( --shaker-border );
}

.shaker-configurator__controls h3 {
	font-size: 19px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
	color: var( --shaker-ink );
	margin: 28px 0 14px;
}
.shaker-configurator__controls h3:first-child {
	margin-top: 0;
}

.shaker-control-group {
	margin-bottom: 22px;
}
.shaker-control-label {
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 10px;
}
.shaker-hint {
	font-weight: 400;
	color: var( --shaker-muted );
	font-size: 0.85em;
}

.shaker-swatches {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.shaker-swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid var( --shaker-border );
	cursor: pointer;
	padding: 0;
	box-shadow: inset 0 0 0 2px #fff;
	transition: transform 0.1s ease, border-color 0.1s ease;
}
.shaker-swatch:hover {
	transform: scale( 1.08 );
}
.shaker-swatch.is-active {
	border-color: var( --shaker-ink );
	box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var( --shaker-ink );
}

.shaker-global-swatches {
	padding: 14px;
	background: var( --shaker-backdrop, #f4f4f5 );
	border-radius: var( --shaker-radius-sm );
	margin-bottom: 8px;
}
.shaker-global-swatch {
	width: 38px;
	height: 38px;
}

.shaker-logo-status {
	font-size: 0.85em;
	margin-top: 6px;
	color: #1a7d3a;
}
.shaker-logo-status.is-error {
	color: #c0362c;
}

.shaker-dropzone {
	display: block;
	position: relative;
	border: 2px dashed var( --shaker-border );
	border-radius: var( --shaker-radius-sm );
	padding: 18px 14px;
	text-align: center;
	cursor: pointer;
	background: #fafafa;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.shaker-dropzone:hover,
.shaker-dropzone.is-dragover {
	border-color: var( --shaker-accent );
	background: #f2f5ff;
}
.shaker-dropzone__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var( --shaker-muted );
	pointer-events: none;
}
.shaker-dropzone__icon {
	color: var( --shaker-muted );
}
.shaker-dropzone__text {
	font-size: 12.5px;
	line-height: 1.4;
	max-width: 180px;
}
.shaker-dropzone__filled {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	pointer-events: none;
}
.shaker-dropzone__thumb {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
	border: 1px solid var( --shaker-border );
}
.shaker-dropzone__change {
	font-size: 13px;
	font-weight: 600;
	color: var( --shaker-accent );
}

.shaker-actions {
	margin-top: 28px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.shaker-configurator .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var( --shaker-radius-pill );
	padding: 11px 22px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: 1px solid var( --shaker-border );
	background: #fff;
	color: var( --shaker-ink );
	transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}
.shaker-configurator .button:hover {
	border-color: var( --shaker-muted );
}
.shaker-configurator .button.button-primary {
	background: var( --shaker-accent );
	border-color: var( --shaker-accent );
	color: #fff;
	box-shadow: var( --shaker-elevation-1 );
}
.shaker-configurator .button.button-primary:hover {
	background: var( --shaker-accent-hover );
	border-color: var( --shaker-accent-hover );
}
.shaker-configurator .button:disabled {
	opacity: 0.6;
	cursor: default;
}

.shaker-save-result {
	margin-top: 12px;
	font-size: 0.9em;
	color: var( --shaker-muted );
}

@media ( max-width: 900px ) {
	.shaker-configurator {
		grid-template-columns: 1fr;
	}
	.shaker-configurator__preview {
		padding: 24px;
	}
	#shaker-fullscreen-main .shaker-configurator__controls {
		padding: 24px;
	}
}

/* ==========================================================================
   Quote form (Step 2)
   ========================================================================== */
.shaker-quote-form {
	max-width: 640px;
}
.shaker-quote-form h3 {
	font-size: 19px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
	color: var( --shaker-ink, #16181d );
	margin: 28px 0 14px;
}
.shaker-quote-form h3:first-child {
	margin-top: 0;
}
.shaker-quote-form .form-row {
	margin-bottom: 16px;
}
.shaker-quote-form .form-row-first,
.shaker-quote-form .form-row-last {
	display: inline-block;
	width: 48%;
	vertical-align: top;
}
.shaker-quote-form .form-row-first {
	margin-right: 4%;
}
.shaker-quote-form label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}
.shaker-quote-form input[type="text"],
.shaker-quote-form input[type="email"],
.shaker-quote-form input[type="number"],
.shaker-quote-form textarea {
	width: 100%;
	padding: 12px 18px;
	border: 1px solid #d5d5d9;
	border-radius: var( --shaker-radius-pill, 999px );
	box-sizing: border-box;
	font-size: 14px;
}
.shaker-quote-form textarea {
	border-radius: 18px;
}
.shaker-quote-form input:focus,
.shaker-quote-form textarea:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba( 29, 78, 216, 0.15 );
}
.shaker-checkbox-row {
	display: block;
	font-weight: 400;
	font-size: 14px;
	margin-bottom: 10px;
}
.shaker-form-messages {
	margin: 12px 0;
	padding: 12px 14px;
	background: #fdecec;
	border: 1px solid #e5a5a5;
	border-radius: 6px;
}
.shaker-form-messages.is-error {
	color: #a00;
}
.shaker-quote-form .shaker-actions {
	margin-top: 28px;
}
.shaker-quote-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	padding: 13px 28px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	border: 1px solid #1d4ed8;
	background: #1d4ed8;
	color: #fff;
}
.shaker-quote-form button[type="submit"]:hover {
	background: #1739a8;
	border-color: #1739a8;
}
.shaker-quote-form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: default;
}

@media ( max-width: 600px ) {
	.shaker-quote-form .form-row-first,
	.shaker-quote-form .form-row-last {
		width: 100%;
		margin-right: 0;
	}
}
