/*
 * T67 — touch and keyboard affordances for Service DZ controls.
 * Scoped to interactive components so the identity colours and RTL layout of
 * the existing design system are preserved.
 */

@media (pointer: coarse) {
	html {
		scroll-padding-bottom: 96px;
	}

	.sdz-action-button,
	.sdz-sticky-summary__button,
	.sdz-mobile-action,
	.sdz-social-share a,
	.sdz-checklist-wrap button,
	.sdz-checklist-wrap a,
	.sdz-offline-bundle-button {
		min-height: 44px;
		min-width: 44px;
	}

	.sdz-check-item label {
		display: flex;
		align-items: center;
		min-height: 44px;
	}
}

/* -------------------------------------------------------------------------
 * Share buttons — moved here from SDZ_Social_Share::render_buttons().
 * Single templates pass that markup through wp_kses_post(), which removes
 * style elements but leaves their CSS text visible beside the links.
 * ------------------------------------------------------------------------- */
.sdz-social-share {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin: 12px 0;
	align-items: center;
}

.sdz-social-share__label {
	display: flex;
	align-items: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--sdz-text-muted, #64748b);
	margin-left: 8px;
	flex-shrink: 0;
}

.sdz-social-share__links {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* Two classes beat the theme rules ".sdz-wrap a" / ".sdz-document-page a". */
.sdz-social-share .sdz-social-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	min-width: 44px;
	padding: 0 12px;
	border-radius: 10px;
	color: #fff;
	text-decoration: none;
	transition: transform 0.2s, opacity 0.2s;
	font-size: 14px;
	font-weight: 700;
	flex: 0 1 auto;
}

.sdz-social-share .sdz-social-share__link:hover {
	transform: scale(1.05);
	opacity: 0.9;
}

.sdz-social-share .sdz-social-share__link i {
	font-size: 16px;
}

.sdz-share-label {
	font-size: 12px;
	display: inline;
}

/* Darkened brand colours so white 12px labels stay above 4.5:1 (WCAG AA). */
.sdz-share-facebook { background: #0B5ED7; }
.sdz-share-twitter { background: #000000; }
.sdz-share-whatsapp { background: #0B7A4B; }
.sdz-share-linkedin { background: #0A66C2; }
.sdz-share-email { background: #475569; }

.sdz-sticky-summary button:focus-visible,
.sdz-mobile-action-bar button:focus-visible,
.sdz-social-share a:focus-visible,
.sdz-offline-bundle-button:focus-visible {
	outline: 3px solid #006B3F;
	outline-offset: 2px;
}

.sdz-sticky-summary,
.sdz-mobile-action-bar {
	scroll-margin-bottom: 96px;
}

@media (max-width: 600px) {
	.sdz-social-share {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.sdz-social-share__label {
		margin-left: 0;
		text-align: center;
		font-size: 14px;
	}

	.sdz-social-share > div {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
		width: 100%;
	}

	.sdz-social-share__link {
		width: 100%;
		min-height: 44px;
		padding: 8px 6px;
		font-size: 12px;
		justify-content: center;
	}

	.sdz-share-label {
		font-size: 11px;
		white-space: nowrap;
	}

	.sdz-social-share__link i {
		font-size: 15px;
	}
}

@media (max-width: 400px) {
	.sdz-social-share > div {
		grid-template-columns: repeat(2, 1fr);
	}

	.sdz-social-share__link {
		min-height: 44px;
		font-size: 11px;
	}

	.sdz-share-label {
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sdz-sticky-summary,
	.sdz-mobile-action-bar,
	.sdz-sticky-summary button,
	.sdz-mobile-action-bar button {
		transition: none !important;
		animation: none !important;
	}

	.sdz-social-share__link,
	.sdz-social-share__link:hover {
		transition: none !important;
		transform: none !important;
	}
}

@media print {
	.sdz-sticky-summary,
	.sdz-mobile-action-bar {
		display: none !important;
	}
}
