/* PhoneBanana case designer — product page */

.pb-designer [hidden] { display: none !important; }

.pb-designer {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	margin: 12px 0 24px;
	align-items: start;
}

.pb-designer__stage { max-width: 300px; margin: 0 auto; width: 100%; }
.pb-designer__canvas-wrap {
	position: relative;
	background: var(--wp--preset--color--light-grey, #FFF8C2);
	border-radius: 20px;
	padding: 18px;
}
.pb-designer__canvas {
	display: block;
	width: 100%;
	height: auto;
	touch-action: none;
	cursor: grab;
	border-radius: 8px;
}
.pb-designer__canvas.is-dragging { cursor: grabbing; }
.pb-designer__placeholder {
	position: absolute;
	inset: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: left;
	padding: 24px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--wp--preset--color--primary, #000C30);
	pointer-events: none;
}
.pb-designer__placeholder strong { color: var(--wp--preset--color--sky, #009CF0); }
.pb-designer.has-image .pb-designer__placeholder { display: none; }

.pb-designer__controls { margin-top: 12px; display: grid; gap: 8px; font-size: 13px; }
.pb-designer__controls label { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px; }
.pb-designer__controls input[type=range] { width: 100%; accent-color: var(--wp--preset--color--sky, #009CF0); }
.pb-designer__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-btn {
	border: 2px solid var(--wp--preset--color--primary, #000C30);
	background: #fff;
	color: var(--wp--preset--color--primary, #000C30);
	border-radius: 999px;
	padding: 4px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.pb-btn:hover { background: var(--wp--preset--color--banana, #FFE600); }

.pb-designer__status {
	min-height: 22px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #000C30);
	margin-bottom: 10px;
}
.pb-designer__status.is-error { color: #b3540b; }
.pb-designer__status.is-ok { color: #2e7d4f; }

.pb-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.pb-tab {
	flex: 1;
	border: 2px solid var(--wp--preset--color--border, #D6DCEE);
	background: #fff;
	border-radius: 999px;
	padding: 8px 10px;
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
	color: var(--wp--preset--color--primary, #000C30);
}
.pb-tab.is-active {
	background: var(--wp--preset--color--banana, #FFE600);
	border-color: var(--wp--preset--color--primary, #000C30);
}

.pb-design-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
	max-height: 420px;
	overflow-y: auto;
	padding: 2px;
}
.pb-design {
	border: 3px solid transparent;
	border-radius: 14px;
	padding: 0;
	background: none;
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 1;
}
.pb-design img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-design.is-selected, .pb-design:focus-visible { border-color: var(--wp--preset--color--sky, #009CF0); outline: none; }

.pb-dropzone {
	display: block;
	border: 2px dashed var(--wp--preset--color--sky, #009CF0);
	border-radius: 16px;
	padding: 26px 18px;
	text-align: center;
	cursor: pointer;
	background: #fff;
	font-size: 14px;
	line-height: 1.5;
}
.pb-dropzone.is-over { background: var(--wp--preset--color--light-grey, #FFF8C2); }
.pb-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pb-upload-note { font-size: 12px; color: var(--wp--preset--color--mid-grey, #3A4670); margin-top: 8px; }

/* Nudge WooCommerce's variation form to sit under the designer panel. */
.pb-designer + table.variations,
.pb-designer ~ .variations { margin-top: 0; }
.pb-designer ~ .single_variation_wrap .woocommerce-variation-add-to-cart.pb-locked .single_add_to_cart_button { opacity: .5; pointer-events: none; }

/* Phone-model select (moved above the designer by designer.js). */
.pb-model-row { margin: 0 0 14px; }
.pb-model-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.pb-model-row select { width: 100%; font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--wp--preset--color--primary, #000C30); background: #fff; }
.pb-model-row table.variations.pb-moved { margin: 0; }
.pb-model-row table.variations.pb-moved th.label { display: none; }
.pb-model-row table.variations.pb-moved td.value { padding: 0; }
.pb-model-row table.variations.pb-moved .reset_variations { display: inline-block; margin-top: 4px; font-size: 12px; }
