/**
 * Product-page Share button and modal (partials/product-share-modal.php, cmuk-product-share.js).
 */

/* Round icon over the top-right of the main photo; matches .orbit-product-nav (product-gallery.css). */
.cm-pshare-photo-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 11;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #05386B;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.cm-pshare-photo-btn:hover {
	background: #fff;
	transform: scale(1.06);
}

.cm-pshare-photo-btn:focus-visible {
	outline: 2px solid #05386B;
	outline-offset: 2px;
}

.cm-pshare-photo-btn .cm-pshare-icon {
	width: 22px;
	height: 22px;
}

/* Secondary text link in the summary, for people who have scrolled past the photo. */
.cm-pshare-trigger-wrap {
	margin-top: 12px;
}

.cm-pshare-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: #05386B;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.cm-pshare-trigger:hover {
	text-decoration-thickness: 2px;
}

.cm-pshare-trigger .cm-pshare-icon {
	width: 18px;
	height: 18px;
}

.cm-pshare-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.cm-pshare-lead {
	margin: 0 0 16px;
	color: #4b5563;
}

.cm-pshare .orbit-button {
	gap: 8px;
}

.cm-pshare-native {
	margin-bottom: 16px;
}

.cm-pshare-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 8px;
}

.cm-pshare-btn {
	--cm-pshare-brand: #05386B;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 76px;
	padding: 10px 6px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	color: #1f2937;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cm-pshare-btn .cm-pshare-icon {
	width: 26px;
	height: 26px;
	color: var(--cm-pshare-brand);
}

.cm-pshare-btn:hover,
.cm-pshare-btn:focus-visible {
	border-color: var(--cm-pshare-brand);
	background: #f9fafb;
	color: #1f2937;
	text-decoration: none;
}

.cm-pshare-btn:focus-visible {
	outline: 2px solid var(--cm-pshare-brand);
	outline-offset: 2px;
}

.cm-pshare-card {
	margin-top: 20px;
	padding: 16px;
	border-radius: 14px;
	background: #f7f5f0;
}

.cm-pshare-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cm-pshare-card-head .orbit-button {
	width: auto;
}

.cm-pshare-card-title {
	margin: 0 0 2px;
	font-size: 1rem;
}

.cm-pshare-card-text {
	margin: 0;
	color: #4b5563;
	font-size: 0.875rem;
}

.cm-pshare-builder {
	margin-top: 16px;
}

.cm-pshare-builder[hidden],
.cm-pshare [hidden] {
	display: none !important;
}

.cm-pshare-formats {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	margin-bottom: 12px;
	border-radius: 999px;
	background: #fff;
}

.cm-pshare-format {
	padding: 6px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #374151;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.cm-pshare-format.is-active {
	background: #05386B;
	color: #fff;
}

.cm-pshare-preview {
	max-width: 320px;
	margin: 0 auto;
}

.cm-pshare-preview.is-story {
	max-width: 200px;
}

.cm-pshare-preview canvas {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	background: #fff;
}

.cm-pshare-status {
	margin: 12px 0 0;
	text-align: center;
	color: #4b5563;
	font-size: 0.875rem;
}

.cm-pshare-actions {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

.cm-pshare-actions .orbit-button[disabled] {
	opacity: 0.55;
	cursor: default;
}

.cm-pshare-hint {
	margin: 10px 0 0;
	color: #6b7280;
	font-size: 0.8125rem;
}
