/*
 * base.css — reset, elements, typography.
 *
 * Design tokens come from theme.json (--wp--preset--* custom properties).
 * This file wires them onto element defaults. Theme-authored tokens use the
 * --cccarchives-* namespace.
 *
 * Live rendered through Hello Elementor, whose reset.css set most of what an
 * unstyled element looks like there — tables especially: Document Library
 * Pro's table takes its zebra rows, cell borders and 0.9em size from it, not
 * from DLP. Those rules are carried over below, on the tokens, with the
 * Kit's own settings on top (Lato 18px in #707070 for text, Average for h1–h3,
 * links in the primary green that turn accent green and underline on hover,
 * buttons filled primary).
 */

:root {
	--cccarchives-measure: var(--wp--style--global--content-size, 44.44rem);
	--cccarchives-wide: var(--wp--style--global--wide-size, 1140px);
	--cccarchives-table-rule: hsla(0, 0%, 50%, 0.502);
	--cccarchives-table-zebra: hsla(0, 0%, 50%, 0.071);
	--cccarchives-table-hover: hsla(0, 0%, 50%, 0.102);
}

/* --- Reset --- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	border-style: none;
}

/* --- Typography --- */

/* Hello's heading reset, with the Kit's faces: Average for h1–h3 (theme.json
   `heading`), Lato for h4–h6. Hello asks for 500; neither face has a 500,
   so live draws them at 400, which is what is written here. */
h1, h2, h3, h4, h5, h6 {
	color: inherit;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 400;
	line-height: 1.2;
	margin-block: 0.5rem 1rem;
}

h1 { font-size: var(--wp--preset--font-size--4-xl); }
h2 { font-size: var(--wp--preset--font-size--3-xl); }
h3 { font-size: var(--wp--preset--font-size--2-xl); }

h4, h5, h6 {
	font-family: var(--wp--preset--font-family--sans);
}

h4 { font-size: var(--wp--preset--font-size--xl); }
h5 { font-size: var(--wp--preset--font-size--lg); }
h6 { font-size: var(--wp--preset--font-size--sm); }

p {
	margin-block: 0 0.9rem;
}

a {
	background-color: transparent;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

a:hover,
a:active {
	color: var(--wp--preset--color--accent-hover);
	text-decoration: underline;
}

b,
strong {
	font-weight: bolder;
}

small {
	font-size: 80%;
}

figcaption,
.wp-caption-text {
	font-size: var(--wp--preset--font-size--sm);
	font-style: italic;
	line-height: 1.4;
}

dd, dl, dt, li, ol, ul {
	margin-block: 0;
}

code,
pre,
kbd {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1em;
}

pre {
	white-space: pre-wrap;
}

/* --- Forms --- */

label {
	display: inline-block;
	line-height: 1;
	vertical-align: middle;
}

button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
}

input[type="date"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
select,
textarea {
	width: 100%;
	padding: 0.5rem 1rem;
	border: 1px solid #666;
	border-radius: 3px;
	transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
	border-color: #333;
}

select {
	display: block;
}

textarea {
	overflow: auto;
	resize: vertical;
}

[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

/* The Kit's buttons: filled primary, white text, accent on hover. */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	display: inline-block;
	width: auto;
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 3px;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	font-size: 1rem;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	transition: all 0.3s;
	user-select: none;
	cursor: pointer;
}

button:hover,
button:focus,
[type="button"]:hover,
[type="button"]:focus,
[type="submit"]:hover,
[type="submit"]:focus {
	border-color: var(--wp--preset--color--accent-hover);
	background-color: var(--wp--preset--color--accent-hover);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

button:focus:not(:focus-visible),
[type="button"]:focus:not(:focus-visible),
[type="submit"]:focus:not(:focus-visible) {
	outline: none;
}

/* --- Tables (Hello's, which Document Library Pro's table sits on) --- */

table {
	width: 100%;
	margin-block-end: 15px;
	border-collapse: collapse;
	border-spacing: 0;
	background-color: transparent;
	font-size: 0.9em;
}

table td,
table th {
	padding: 15px;
	border: 1px solid var(--cccarchives-table-rule);
	line-height: 1.5;
	vertical-align: top;
}

table th {
	font-weight: 700;
}

table thead th,
table tfoot th {
	font-size: 1em;
}

table tbody > tr:nth-child(odd) > td,
table tbody > tr:nth-child(odd) > th {
	background-color: var(--cccarchives-table-zebra);
}

table tbody tr:hover > td,
table tbody tr:hover > th {
	background-color: var(--cccarchives-table-hover);
}

/* --- Accessibility helpers --- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 100;
	padding: 0.6em 1em;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}
