/*
Theme Name: MetaCamp
Description: Site theme for metacamp.org. A child of Twenty Twenty-Five (maintained by WordPress). Replaces Genesis and Metro. Source: server-ops repo, themes/metacamp/.
Author: Terry Sergeant
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: metacamp
*/

/* ---------- header ---------- */
.mc-logo { display: inline-block; line-height: 0; }
.mc-logo img { height: 112px; width: auto; max-width: 100%; }
.mc-header .wp-block-search { max-width: 100%; }
.mc-header .wp-block-search__inside-wrapper { border: 1px solid var(--wp--preset--color--accent-6); border-radius: 4px; background: var(--wp--preset--color--accent-5); padding: 3px; }
.mc-header .wp-block-search__input { border: 0; background: transparent; min-width: 0; padding: .45em .7em; font-size: .9rem; }
.mc-header .wp-block-search__button { padding: .45em .8em; margin-left: 0; border-radius: 3px; }
.mc-header .wp-block-search__button svg { width: 1.2em; height: 1.2em; }

/* ---------- main menu ---------- */
.mc-nav {
	display: flex; flex-wrap: wrap; align-items: stretch; position: relative;
	background: var(--wp--preset--color--contrast); border-radius: 4px;
	font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
}
.mc-nav-check, .mc-nav-toggle { display: none; }
.mc-menu, .mc-menu ul { list-style: none; margin: 0; padding: 0; }
.mc-menu { display: flex; flex-wrap: wrap; flex: 1 1 auto; }
.mc-menu li { position: relative; margin: 0; }
.mc-menu a { display: block; padding: 1rem 1.05rem; color: #fff; text-decoration: none; white-space: nowrap; }
.mc-menu > li:first-child > a { border-radius: 4px 0 0 4px; }
.mc-menu a:hover, .mc-menu a:focus-visible,
.mc-menu li:hover > a, .mc-menu li:focus-within > a,
.mc-menu .current-menu-item > a, .mc-menu .current-menu-ancestor > a, .mc-menu .current_page_parent > a {
	background: var(--wp--preset--color--accent-1); color: #fff;
}
.mc-menu .menu-item-has-children > a::after { content: "\25BE"; margin-left: .4em; font-size: .8em; }
.mc-menu .sub-menu {
	display: none; position: absolute; left: 0; top: 100%; z-index: 50; min-width: 15rem;
	background: var(--wp--preset--color--contrast); box-shadow: 0 6px 16px rgba(0,0,0,.2);
	text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .9rem;
}
.mc-menu li:hover > .sub-menu, .mc-menu li:focus-within > .sub-menu { display: block; }
.mc-menu .sub-menu a { padding: .7rem 1.05rem; white-space: normal; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0; }
.mc-date { margin-left: auto; align-self: center; padding: 1rem 1.05rem; color: #c9c9c9; font-weight: 500; white-space: nowrap; }

@media (max-width: 860px) {
	.mc-nav { display: block; }
	.mc-nav-toggle { display: block; padding: .9rem 1.05rem; color: #fff; cursor: pointer; }
	.mc-nav-toggle::before { content: "\2630"; margin-right: .6em; }
	.mc-menu { display: none; }
	.mc-nav-check:checked ~ .mc-menu { display: block; }
	.mc-menu a { white-space: normal; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0 !important; }
	.mc-menu .sub-menu { display: block; position: static; box-shadow: none; min-width: 0; }
	.mc-menu .sub-menu a { padding-left: 2.2rem; }
	.mc-menu .menu-item-has-children > a::after { content: none; }
	.mc-date { display: none; }
}

/* ---------- widgets (sidebar, home, footer) ---------- */
.widget { margin: 0 0 2rem; }
.widget > :last-child { margin-bottom: 0; }
.widget-title, .mc-section-title {
	font-size: .85rem !important; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
	margin: 0 0 1rem; padding-bottom: .5rem;
	border-bottom: 3px solid var(--wp--preset--color--accent-1);
}
.mc-widgets-sidebar, .mc-footer-cols { font-size: .92rem; line-height: 1.55; }
.mc-widgets img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.mc-widgets p { margin: 0 0 .8rem; }
.mc-widgets iframe { max-width: 100%; }
.widget ul.square { list-style: disc; margin: 0; padding-left: 1.2rem; }
.widget ul.square li { margin: .25rem 0; }
.mc-widgets-home-top { margin-bottom: 2rem; }
.mc-widgets-home-top img { max-width: 100%; height: auto; }

.donation-button, .event-button {
	display: block; width: fit-content; min-width: 60%; margin: 0 auto; padding: 1rem 1.4rem; box-sizing: border-box;
	background: var(--wp--preset--color--contrast); color: #fff !important; border-radius: 4px;
	text-align: center; text-decoration: none; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; font-size: .85rem;
}
.donation-button { background: var(--wp--preset--color--accent-1); }
.donation-button:hover, .event-button:hover { background: var(--wp--preset--color--accent-3); }
a.more-link { white-space: nowrap; }

.mc-teaser img { width: 100%; height: auto; display: block; border-radius: 4px; }
.mc-teaser-title { font-size: 1.2rem; margin: .8rem 0 .3rem; }
.mc-teaser-title a { color: inherit; text-decoration: none; }

/* ---------- posts and pages ---------- */
strong, b { font-weight: 700; }
.mc-postlist .wp-block-post-content, .wp-block-post-title + .wp-block-group + .wp-block-post-content { margin-top: 1.2rem; }
.mc-copyright { margin: 0; }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.wp-block-post-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.wp-block-post-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-post-content .wp-caption { max-width: 100%; }
.wp-block-post-content .wp-caption-text { font-size: .8rem; color: var(--wp--preset--color--accent-4); margin: .3em 0 0; }
.wp-block-post-content iframe, .wp-block-post-content embed, .wp-block-post-content video { max-width: 100%; }
.wp-block-post-content blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--wp--preset--color--accent-1); }
.wp-block-post-content table { border-collapse: collapse; max-width: 100%; }
.wp-block-post-content td, .wp-block-post-content th { padding: .4rem .6rem; vertical-align: top; }
.mc-postlist > li + li, .mc-postlist .wp-block-post + .wp-block-post { border-top: 1px solid var(--wp--preset--color--accent-6); padding-top: 2rem; }
.wp-block-comment-template { list-style: none; padding-left: 0; }
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]),
.wp-block-post-comments-form textarea { border: 1px solid #b9c0b9; border-radius: 3px; }

/* ---------- footer ---------- */
.mc-footer-bar a { color: #fff; }
.mc-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; }
.mc-social a { text-decoration: none; font-weight: 600; }
.mc-social a:hover, .mc-footer-bar a:hover { color: #8fe0a8; }

/* the plain search box in the After Post widget area */
.mc-widgets-after-post { margin: 1.6rem 0 0; }
.mc-widgets .search-form { display: flex; gap: .4rem; max-width: 24rem; }
.mc-widgets .search-form label { flex: 1 1 auto; }
.mc-widgets .search-field { width: 100%; box-sizing: border-box; padding: .5em .7em; border: 1px solid var(--wp--preset--color--accent-6); border-radius: 4px; background: var(--wp--preset--color--accent-5); font: inherit; font-size: .9rem; }
.mc-widgets .search-submit { padding: .5em 1em; border: 0; border-radius: 4px; background: var(--wp--preset--color--contrast); color: #fff; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.mc-widgets .search-submit:hover { background: var(--wp--preset--color--accent-1); }
