/*
 * PrimeHotDeals base styles.
 * Depends on tokens.css. Keep generic element rules minimal so Elementor
 * content is not overridden; theme typography is scoped to .phd-prose.
 */

/* Minimal reset. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--phd-color-bg);
	color: var(--phd-color-text);
	font-family: var(--phd-font-sans);
	font-size: var(--phd-text-base);
	line-height: var(--phd-leading-body);
}

/* Width/height attributes + height:auto keeps the aspect ratio and avoids layout shift. */
img,
video {
	max-width: 100%;
	height: auto;
}

/* Keyboard focus: visible and high contrast. */
:focus-visible {
	outline: 3px solid var(--phd-color-focus);
	outline-offset: 2px;
}

/* Visually hidden text that stays available to screen readers. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Reveal the skip link when it receives keyboard focus. */
.screen-reader-text:focus {
	background: var(--phd-color-bg);
	clip: auto;
	clip-path: none;
	color: var(--phd-color-text);
	display: block;
	height: auto;
	left: var(--phd-space-2);
	margin: 0;
	padding: var(--phd-space-3) var(--phd-space-4);
	top: var(--phd-space-2);
	width: auto;
	z-index: 100000;
}

/* Layout helper. */
.phd-container {
	width: min(100% - (2 * var(--phd-gutter)), var(--phd-container));
	margin-inline: auto;
}

/* Header (temporary minimal version; the full header comes in Phase 2). */
.phd-site-header {
	background: var(--phd-color-header-bg);
	color: var(--phd-color-header-text);
	padding-block: var(--phd-space-4);
}

.phd-site-header :focus-visible {
	outline-color: var(--phd-color-accent-on-dark);
}

.phd-site-title {
	margin: 0;
	font-size: var(--phd-text-xl);
	font-weight: 700;
	line-height: var(--phd-leading-heading);
}

.phd-site-title a {
	color: inherit;
	text-decoration: none;
}

.phd-site-title a:hover {
	text-decoration: underline;
}

/* Main content area. */
.phd-main {
	padding-block: var(--phd-space-8);
}

.phd-page-title,
.phd-entry-title {
	margin: 0 0 var(--phd-space-4);
	line-height: var(--phd-leading-heading);
}

.phd-page-title {
	font-size: var(--phd-text-3xl);
}

.phd-entry-title {
	font-size: var(--phd-text-2xl);
}

.phd-entry-title a {
	color: inherit;
}

.phd-entry + .phd-entry {
	margin-top: var(--phd-space-8);
	padding-top: var(--phd-space-8);
	border-top: 1px solid var(--phd-color-border);
}

/* Theme-owned text content. :where() keeps specificity low so it is easy to override. */
.phd-prose :where(p, ul, ol, blockquote) {
	margin-block: 0 var(--phd-space-4);
}

.phd-prose :where(h2, h3, h4, h5, h6) {
	margin-block: var(--phd-space-6) var(--phd-space-3);
	line-height: var(--phd-leading-heading);
}

.phd-prose :where(a) {
	color: var(--phd-color-link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.phd-prose :where(a):hover {
	color: var(--phd-color-link-hover);
	text-decoration-thickness: 2px;
}

/* Pagination (core markup from the_posts_pagination). Targets are at least 44px. */
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--phd-space-2);
	margin-top: var(--phd-space-8);
}

.pagination .page-numbers {
	display: inline-block;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: var(--phd-space-2) var(--phd-space-3);
	border: 1px solid var(--phd-color-border);
	border-radius: var(--phd-radius-sm);
	color: var(--phd-color-text);
	line-height: 1.75rem;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--phd-motion-duration) ease;
}

.pagination a.page-numbers:hover {
	background: var(--phd-color-surface);
}

.pagination .page-numbers.current {
	background: var(--phd-charcoal-800);
	border-color: var(--phd-charcoal-800);
	color: var(--phd-white);
}

/* Footer (temporary minimal version; the full footer comes in Phase 2). */
.phd-site-footer {
	background: var(--phd-color-footer-bg);
	color: var(--phd-color-footer-text);
	padding-block: var(--phd-space-6);
	font-size: var(--phd-text-sm);
}

.phd-site-footer p {
	margin: 0;
}
