/* ============================================================
   PosterMyWall Template Block – styles (editor + front-end)
   ============================================================ */

/* ── Wrapper alignment ─────────────────────────────────────── */
.pmw-template-block {
	display: flex;
	flex-direction: column;
	margin: 1.5em 0;
}

.pmw-align-left   { align-items: flex-start; }
.pmw-align-center { align-items: center; }
.pmw-align-right  { align-items: flex-end; }

/* ── Clickable link (removes browser defaults) ─────────────── */
.pmw-template-link {
	display: inline-block;
	text-decoration: none;
	color: inherit;
	max-width: 100%;
}

/* ── Thumbnail container ───────────────────────────────────── */
.pmw-thumbnail-wrap {
	position: relative;
	display: inline-block;
	overflow: hidden;
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
	transition: box-shadow .25s ease, transform .25s ease;
	max-width: 100%;
	line-height: 0; /* remove gap below img */
}

.pmw-template-link:hover .pmw-thumbnail-wrap,
.pmw-template-link:focus-visible .pmw-thumbnail-wrap {
	box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
	transform: translateY(-2px);
}

/* ── Thumbnail image ───────────────────────────────────────── */
.pmw-thumbnail {
	display: block;
	width: 100%;
	max-width: 640px;
	height: auto;
	border-radius: 10px;
	transition: filter .25s ease;
}

.pmw-template-link:hover .pmw-thumbnail,
.pmw-template-link:focus-visible .pmw-thumbnail {
	filter: brightness(.7);
}

/* ── Hover overlay ─────────────────────────────────────────── */
.pmw-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}

.pmw-template-link:hover .pmw-overlay,
.pmw-template-link:focus-visible .pmw-overlay {
	opacity: 1;
}

/* ── CTA button (shown on hover) ───────────────────────────── */
.pmw-cta-button {
	background: #3FBCE7; /* PMW brand blue */
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .02em;
	padding: .6em 1.4em;
	border-radius: 50px;
	box-shadow: 0 4px 14px rgba(63, 188, 231, .45);
	pointer-events: none;
	white-space: nowrap;
	transition: transform .15s ease;
}

.pmw-template-link:hover .pmw-cta-button {
	transform: scale(1.04);
}

/* ── Optional caption ──────────────────────────────────────── */
.pmw-caption {
	margin: .5em 0 0;
	font-size: .875rem;
	color: #666;
	text-align: center;
	line-height: 1.4;
}

/* ── Focus ring (accessibility) ────────────────────────────── */
.pmw-template-link:focus-visible {
	outline: 3px solid #ff5a57;
	outline-offset: 4px;
	border-radius: 12px;
}

/* ============================================================
   Editor-only styles
   ============================================================ */

/* Prevent the editor preview from being clicked through */
.pmw-editor-preview {
	pointer-events: none;
}

/* Placeholder URL input row */
.pmw-url-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
	margin-top: 4px;
}

.pmw-url-input {
	flex: 1 1 300px;
	padding: 8px 12px;
	font-size: 13px;
	border: 1px solid #949494;
	border-radius: 4px;
	min-width: 0;
}

.pmw-url-input:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, .25);
}

.pmw-load-btn {
	flex-shrink: 0;
}

.pmw-notice {
	margin-top: 12px !important;
	width: 100%;
}

/* ── Responsive ────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.pmw-thumbnail {
		max-width: 100%;
	}
	.pmw-cta-button {
		font-size: .85rem;
		padding: .5em 1.1em;
	}
}
