/* ==========================================================================
   Product Visualiser – Frontend Styles
   ========================================================================== */

/* Wrapper */
.pv-visualiser-wrap {
	margin: 24px 0;
	font-family: inherit;
}

.pv-section-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 12px;
}

/* ------------------------------------------------------------------
   Canvas container
------------------------------------------------------------------ */
.pv-canvas-container {
	position: relative;
	width: 100%;
	background: #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 20px;
	min-height: 120px;
}

.pv-canvas {
	display: none; /* shown via JS once first render fires */
	width: 100%;
	height: auto;
	border-radius: 6px;
	vertical-align: top;
}

/* Placeholder shown before JS fires (pure loading state) */
.pv-canvas-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	color: #888;
	font-size: 0.9em;
	padding: 20px;
	text-align: center;
	margin: 0;
}

/* ------------------------------------------------------------------
   Squish warning
------------------------------------------------------------------ */
.pv-squish-warning {
	display: none;
	align-items: flex-start;
	gap: 8px;
	background: #fff8e1;
	border: 1px solid #f5c518;
	border-left: 4px solid #f5c518;
	border-radius: 4px;
	padding: 10px 14px;
	margin-bottom: 14px;
	font-size: 0.875em;
	color: #5a4000;
	line-height: 1.5;
}

.pv-squish-warning.pv-squish-visible {
	display: flex;
}

.pv-squish-icon {
	font-size: 1.2em;
	flex-shrink: 0;
	margin-top: 1px;
}

/* ------------------------------------------------------------------
   Controls
------------------------------------------------------------------ */
.pv-controls {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pv-control-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.pv-label {
	font-size: 0.85em;
	font-weight: 600;
	color: #444;
	min-width: 80px;
	flex-shrink: 0;
}

/* Text input */
.pv-text-row {
	align-items: flex-start;
}

.pv-text-row .pv-label {
	padding-top: 6px;
}

.pv-text-input {
	flex: 1;
	min-width: 200px;
	padding: 8px 10px;
	font-size: 0.95em;
	border: 1px solid #ccc;
	border-radius: 4px;
	resize: vertical;
	font-family: inherit;
	line-height: 1.5;
	transition: border-color 0.2s;
}

.pv-text-input:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.2 );
}

.pv-line-count {
	font-size: 0.75em;
	color: #888;
	font-weight: 400;
	margin-left: 4px;
}

/* Material / colour selector row */
.pv-material-select {
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9em;
	min-width: 200px;
	cursor: pointer;
	flex: 1;
}

.pv-material-select:focus {
	border-color: #2271b1;
	outline: none;
}

/* Font row */
.pv-font-row {
	flex-wrap: wrap;
}

.pv-control-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pv-font-select {
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9em;
	min-width: 180px;
	cursor: pointer;
}

.pv-font-select:focus {
	border-color: #2271b1;
	outline: none;
}

.pv-size-group .pv-label {
	min-width: auto;
}

.pv-font-size {
	width: 60px;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9em;
	text-align: center;
}

.pv-unit {
	font-size: 0.85em;
	color: #666;
}

/* Style buttons (Bold / Italic) */
.pv-style-buttons {
	display: flex;
	gap: 4px;
}

.pv-style-btn {
	width: 36px;
	height: 36px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 1em;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	color: #333;
	padding: 0;
}

.pv-style-btn:hover {
	background: #f0f0f0;
	border-color: #999;
}

.pv-style-btn.pv-active,
.pv-style-btn[aria-pressed="true"] {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

/* Colour picker */
.pv-text-color {
	width: 44px;
	height: 36px;
	padding: 2px;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	background: #fff;
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media ( max-width: 480px ) {
	.pv-control-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.pv-font-select {
		min-width: 100%;
	}

	.pv-text-input {
		min-width: 100%;
	}
}
