/*
	Theme Name: Hello Elementor Child (CDental)
	Theme URI: https://cdental-local.local
	Description: Child theme for Hello Elementor. Adds CDental design tokens, improved 404/search pages, and accessibility enhancements. Update-safe customizations.
	Author: CDental
	Author URI: https://cdental-local.local
	Template: hello-elementor
	Version: 1.0.0
	Requires at least: 6.0
	Tested up to: 6.8
	Requires PHP: 7.4
	License: GNU General Public License v3 or later.
	License URI: https://www.gnu.org/licenses/gpl-3.0.html
	Text Domain: hello-elementor
*/

/* 404 & search: same design grammar as cdental-global.css (tokens in :root there). */

/* ==========================================================================
   Error & search page – tokens from cdental-global.css
   ========================================================================== */
.cdental-page-inner {
	max-width: var(--cdental-content-narrow);
	margin-inline: auto;
	padding: var(--cdental-space-7) var(--cdental-space-4) var(--cdental-space-8);
}

.cdental-404 .page-header,
.cdental-search .page-header {
	margin-block-end: var(--cdental-space-4);
}

.cdental-404 .page-header .entry-title,
.cdental-search .page-header .entry-title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 600;
	line-height: var(--cdental-line-height-tight);
	letter-spacing: -0.02em;
	margin-block-end: 0;
	color: var(--cdental-text, var(--wp--preset--color--primary, #1a1a1a));
}

.cdental-search .page-header .entry-title span {
	font-weight: 400;
	opacity: 0.85;
}

.cdental-404 .page-content,
.cdental-search .page-content {
	margin-block-end: 0;
	font-size: var(--cdental-font-size-lead);
	line-height: var(--cdental-line-height-body);
	color: var(--cdental-text-muted, var(--wp--preset--color--secondary, #55595c));
}

.cdental-404 .page-content > p,
.cdental-search .page-content > p {
	margin-block-end: var(--cdental-space-4);
}

.cdental-search-empty-message {
	margin-block-end: var(--cdental-space-4);
}

.cdental-label {
	font-size: var(--cdental-font-size-label);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-block-start: var(--cdental-space-5);
	margin-block-end: var(--cdental-space-3);
	color: var(--cdental-text-muted);
}

.cdental-cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cdental-space-3) var(--cdental-space-3);
	margin-block-start: var(--cdental-space-5);
	align-items: center;
}

.cdental-cta-group .button,
.cdental-cta-group a[role="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 44px;
	padding: var(--cdental-space-3) var(--cdental-space-4);
	text-decoration: none;
	border-radius: var(--cdental-radius);
	font-weight: 500;
	font-size: var(--cdental-font-size-ui);
	letter-spacing: 0.01em;
	transition: background-color var(--cdental-transition), color var(--cdental-transition), border-color var(--cdental-transition);
}

.cdental-cta-group .button--primary,
.cdental-cta-group a.button--primary {
	background-color: var(--cdental-text, var(--wp--preset--color--primary, #2d2d2d));
	color: var(--cdental-bg);
}

.cdental-cta-group .button--secondary,
.cdental-cta-group a.button--secondary {
	background-color: transparent;
	color: var(--cdental-text);
	border: 2px solid currentColor;
}

.cdental-search-suggestions,
.cdental-404-links {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--cdental-space-5);
}

.cdental-search-suggestions li,
.cdental-404-links li {
	margin-block-end: var(--cdental-space-2);
}

.cdental-search-suggestions li:last-child,
.cdental-404-links li:last-child {
	margin-block-end: 0;
}

.cdental-search-suggestions a,
.cdental-404-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--cdental-space-2) 0;
	text-decoration: none;
	color: var(--cdental-text);
	transition: color var(--cdental-transition);
}

.cdental-search-suggestions a:hover,
.cdental-404-links a:hover {
	text-decoration: underline;
}

.cdental-search .page-content .post {
	margin-block-end: var(--cdental-space-6);
	padding-block-end: var(--cdental-space-6);
	border-block-end: 1px solid var(--cdental-border);
}

.cdental-search .page-content .post:last-child {
	margin-block-end: 0;
	padding-block-end: 0;
	border-block-end: none;
}

.cdental-search .page-content .post .entry-title {
	font-size: 1.125rem;
	line-height: 1.4;
	margin-block-end: var(--cdental-space-2);
}

.cdental-search .page-content .post .entry-title a {
	text-decoration: none;
	color: inherit;
}

.cdental-search .page-content .post .entry-title a:hover {
	text-decoration: underline;
}

.cdental-search .pagination {
	max-width: var(--cdental-content-narrow);
	margin-inline: auto;
	padding-inline: var(--cdental-space-4);
	margin-block: var(--cdental-space-5) var(--cdental-space-7);
}

/* ==========================================================================
   Responsive: 404, search (breakpoints 768px, 576px – match global)
   ========================================================================== */
@media (max-width: 768px) {
	.cdental-page-inner {
		padding: var(--cdental-space-6) var(--cdental-space-4) var(--cdental-space-7);
	}

	.cdental-404 .page-header,
	.cdental-search .page-header {
		margin-block-end: var(--cdental-space-4);
	}

	.cdental-404 .page-header .entry-title,
	.cdental-search .page-header .entry-title {
		font-size: 1.5rem;
		line-height: 1.3;
	}

	.cdental-404 .page-content,
	.cdental-search .page-content {
		font-size: var(--cdental-font-size-body);
	}

	.cdental-cta-group {
		flex-direction: column;
		align-items: stretch;
		gap: var(--cdental-space-3);
		margin-block-start: var(--cdental-space-5);
	}

	.cdental-cta-group .button,
	.cdental-cta-group a[role="button"] {
		width: 100%;
		min-width: unset;
		padding: var(--cdental-space-3) var(--cdental-space-4);
		text-align: center;
	}

	.cdental-label {
		margin-block-start: var(--cdental-space-5);
		margin-block-end: var(--cdental-space-2);
	}

	.cdental-search-suggestions,
	.cdental-404-links {
		margin-block-end: var(--cdental-space-4);
	}

	.cdental-search .page-content .post {
		margin-block-end: var(--cdental-space-5);
		padding-block-end: var(--cdental-space-5);
	}

	.cdental-search .pagination {
		padding-inline: var(--cdental-space-4);
		margin-block: var(--cdental-space-4) var(--cdental-space-6);
		flex-direction: column;
		gap: var(--cdental-space-3);
		text-align: center;
	}
}

@media (max-width: 576px) {
	.cdental-page-inner {
		padding: var(--cdental-space-5) var(--cdental-space-3) var(--cdental-space-6);
	}

	.cdental-404 .page-header .entry-title,
	.cdental-search .page-header .entry-title {
		font-size: 1.25rem;
	}

	.cdental-cta-group .button,
	.cdental-cta-group a[role="button"] {
		padding: var(--cdental-space-2) var(--cdental-space-3);
	}
}

/* Accessibility: focus-visible, reduced-motion, touch targets in assets/css/cdental-accessibility.css */
