/*
Theme Name: Mary Temple
Theme URI:
Author: Julien Gardair
Author URI:
Description: A clean gallery block theme, child theme of 2025
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: mary-temple
Tags:
*/

/* ==================================================================
   1. LINKS
   https://github.com/WordPress/gutenberg/issues/42319
   ================================================================== */

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.1em;
}

/* ==================================================================
   2. NAVIGATION
   Covers the main menu and the year sub-navigation together, since
   both render as core/navigation blocks.

   1px is the thinnest an underline can render — smaller values are
   rounded up. For a finer hairline see section 8.
   ================================================================== */

.wp-block-navigation .wp-block-navigation-item__content {
	text-underline-offset: 0.6rem;
	text-decoration-thickness: 1px;
}

/* Active page, active ancestor (Exhibitions while viewing a year),
   active parent, and hover.
   The current-* classes sit on the <li>, so target the link inside. */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-parent > .wp-block-navigation-item__content,
.wp-block-navigation .current_page_item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	text-underline-offset: 0.6rem;
	text-decoration-thickness: 1px;
}

/* The year navigation contains a "NOW" link pointing at /exhibitions/.
   That page is a genuine ancestor of every year page, so WordPress marks
   NOW as active while you browse 2013 — correct, but misleading.
   Suppress it here; the main menu keeps its ancestor highlight.
   Delete this block if you would rather NOW stayed highlighted. */
.mt-year-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	font-weight: inherit;
	color: inherit;
	text-decoration: none;
}

/* ...unless you are actually on that page. */
.mt-year-nav .current-menu-item > .wp-block-navigation-item__content {
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

/* ==================================================================
   3. FOCUS
   Hidden for mouse and touch, kept for keyboard and screen readers.
   Removing focus outright would make the site unusable by keyboard,
   so this distinguishes the two rather than disabling them.
   ================================================================== */

:where(.wp-site-blocks *:focus:not(:focus-visible)) {
	outline: none;
	box-shadow: none;
}

:where(.wp-site-blocks *:focus-visible) {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* The slideshow ships its own focus-visible styling, tuned to its
   controls and thumbnails. Defer to it instead of stamping the global
   outline over the top — that heavy double outline was the "bad look".
   No !important anywhere above, so the plugin wins on specificity. */
.wp-block-gl-container-glslideshow *:focus-visible {
	outline: var(--gl-chrome-focus-width, 2px) solid var(--gl-chrome-focus-color, currentColor);
	outline-offset: var(--gl-chrome-focus-offset, 2px);
}

/* Never show a ring from a mouse click inside the slideshow. */
.wp-block-gl-container-glslideshow *:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* Space submenu items so the focus outline stays visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Keep the outline clear of the text on parent items. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* No offset inside submenus, or the outline escapes the container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/* ==================================================================
   4. TYPOGRAPHY
   ================================================================== */

h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

.more-link {
	display: block;
}

/* ==================================================================
   5. CONTACT FORM 7 — matched to Twenty Twenty-Five
   Built from the theme's own tokens, so it follows any palette or
   typography change made in the Site Editor.
   ================================================================== */

.wpcf7 {
	--mt-border: color-mix(in srgb, var(--wp--preset--color--contrast) 22%, transparent);
	--mt-radius: 4px;
	font-family: inherit;
}

.wpcf7-form p {
	margin: 0 0 var(--wp--preset--spacing--30);
}

.wpcf7-form label {
	display: block;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	line-height: 1.4;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="date"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
	box-sizing: border-box;
	width: 100%;
	margin-top: var(--wp--preset--spacing--20);
	padding: 0.7em 0.9em;

	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	letter-spacing: inherit;
	color: var(--wp--preset--color--contrast);

	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--mt-border);
	border-radius: var(--mt-radius);

	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpcf7-form textarea {
	min-height: 10em;
	resize: vertical;
}

.wpcf7-form ::placeholder {
	color: var(--wp--preset--color--accent-4);
	opacity: 1;
}

.wpcf7-form input:focus-visible,
.wpcf7-form select:focus-visible,
.wpcf7-form textarea:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--accent-3);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent-3) 22%, transparent);
}

/* Clicking into a field should still show it is active, just quietly. */
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent-3);
}

.wpcf7-form input[type="submit"] {
	display: inline-block;
	width: auto;
	margin-top: var(--wp--preset--spacing--20);
	padding: 0.8em 1.8em;

	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	color: var(--wp--preset--color--base);

	background-color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--mt-radius);
	cursor: pointer;

	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form input[type="submit"]:focus-visible {
	background-color: var(--wp--preset--color--accent-3);
	border-color: var(--wp--preset--color--accent-3);
}

.wpcf7-form input[type="submit"]:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.wpcf7-form .wpcf7-not-valid {
	border-color: var(--wp--preset--color--vivid-red);
}

.wpcf7-not-valid-tip {
	margin-top: 0.4em;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--vivid-red);
}

.wpcf7-response-output {
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0.8em 1em;
	font-size: var(--wp--preset--font-size--medium);
	border-width: 1px;
	border-radius: var(--mt-radius);
}

.wpcf7-spinner {
	vertical-align: middle;
	margin-left: 0.6em;
}

.wpcf7-form .req {
	color: var(--wp--preset--color--accent-4);
}

/* ==================================================================
   6. GALLERY CAPTIONS — disabled.
   Uncomment the whole block to enable.
   ================================================================== */

/*
figure.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: relative;
	color: #000;
	background: none;
	margin-top: 0.2em;
	text-shadow: none;
	text-align: left;
	padding: 0;
	flex-basis: fit-content;
	line-height: 1.4;
	overflow: visible;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before {
	display: none;
}
*/

/* ==================================================================
   7. OPTIONAL — underline finer than 1px.
   text-decoration cannot go below 1px, so this draws the line with a
   gradient instead. To use: uncomment, and delete the
   text-decoration: underline declarations in section 2.
   ================================================================== */

/*
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 100% 0.5px;
	background-repeat: no-repeat;
	background-position: 0 calc(100% + 0.6rem);
	padding-bottom: 0.7rem;
}
*/