/*
Theme Name: Minnesota Gun Owners Caucus
Theme URI: https://gunowners.mn
Description: Child theme of Ollie for gunowners.mn. Owns the 2026 MNGOC brand tokens (palette, type, buttons) in theme.json; Ollie supplies the rest.
Author: Minnesota Gun Owners Caucus
Template: ollie
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mngoc
*/

/* Styling lives in theme.json. Keep this file to the few rules theme.json cannot express. */

/* Gold is never text on white. Links are black with a gold underline that thickens on hover. */
a:where(:not(.wp-element-button)) {
	text-decoration-color: var(--wp--preset--color--gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}
a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 4px;
}

/* On black sections, links and headings switch to the light palette. */
.has-black-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--base);
}

/* Slogan bar: black band with gold italic display type, as in the brand guide. */
.is-style-slogan-bar {
	background: var(--wp--preset--color--black);
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	padding: 0.35em 0.7em;
	width: fit-content;
	max-width: 100%;
}

/* Impact headline (Anton): rally, alert, and hero banners only. */
.is-style-impact {
	font-family: var(--wp--preset--font-family--impact);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 1;
}

/* Header buttons: Manage Account is the quiet third button. */
.mngoc-header .wp-block-button.is-style-account .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--border-dark);
}
.mngoc-header .wp-block-button.is-style-account .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--gold);
}
.mngoc-header .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--gold);
	border: 2px solid var(--wp--preset--color--gold);
}

/* ---------- Header layout ----------
   One row on wide screens: logo, menu, buttons. Core navigation only collapses below
   600px, which overflows the row between 600px and ~1180px, so collapse it at 1180px.
   Phones put the three buttons on their own row. */
.mngoc-header-row { gap: 20px; }
.mngoc-header .mngoc-logo { flex: 0 0 auto; margin: 0; }
.mngoc-header .mngoc-nav { flex: 1 1 auto; min-width: 0; }
.mngoc-header .mngoc-header-buttons { flex: 0 0 auto; flex-wrap: nowrap; }
.mngoc-header .mngoc-header-buttons .wp-block-button__link {
	font-size: 0.85rem;
	padding: 0.5em 0.9em;
	white-space: nowrap;
	line-height: 1.2;
}
.mngoc-header .mngoc-header-buttons .wp-block-button.is-style-outline .wp-block-button__link,
.mngoc-header .mngoc-header-buttons .wp-block-button.is-style-account .wp-block-button__link {
	padding: calc(0.5em - 2px) calc(0.9em - 2px);
}
.mngoc-header .wp-block-navigation__responsive-container-open,
.mngoc-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--base);
	background: transparent;
	border: 0;
	padding: 4px;
}
.mngoc-header .wp-block-navigation__responsive-container-open:hover { color: var(--wp--preset--color--gold); }
.mngoc-header .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }

@media (max-width: 1179px) {
	.mngoc-header .mngoc-nav { flex: 0 0 auto; order: 3; }
	.mngoc-header .mngoc-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.mngoc-header .mngoc-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.mngoc-header .mngoc-header-buttons { margin-left: auto; }
}
@media (max-width: 640px) {
	.mngoc-header-row { flex-wrap: wrap; row-gap: 10px; }
	.mngoc-header .mngoc-header-buttons { order: 4; flex-basis: 100%; margin-left: 0; }
	.mngoc-header .mngoc-nav { margin-left: auto; }
}

/* Full-width bands in page content sit flush against each other (no white strip between colors). */
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* Full-width bands use the same side gutter as the header. */
.wp-block-group.alignfull.has-background:not(.mngoc-header) {
	padding-left: var(--wp--preset--spacing--medium) !important;
	padding-right: var(--wp--preset--spacing--medium) !important;
}

/* ---------- Homepage ---------- */
.mngoc-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0;
}
/* Hero: text on black, photo fills the right column edge to edge. */
.mngoc-home-hero .wp-block-columns { margin: 0; }
.mngoc-hero-photo { align-self: stretch; }
.mngoc-hero-img, .mngoc-hero-img img { height: 100%; margin: 0; }
.mngoc-hero-img img { width: 100%; object-fit: cover; min-height: 420px; display: block; }
.mngoc-mission { max-width: 34ch; }
@media (max-width: 781px) {
	.mngoc-hero-img img { min-height: 260px; max-height: 340px; }
}
.mngoc-photo img { border-radius: 4px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* Pillars: gold rule on top. */
.mngoc-pillar { border-top: 6px solid var(--wp--preset--color--gold); padding-top: var(--wp--preset--spacing--small); }
/* Results list: gold check marks on black. */
.mngoc-results { list-style: none; padding-left: 0; display: grid; gap: 0.75em; font-size: 1.1rem; }
.mngoc-results li { padding-left: 1.6em; position: relative; }
.mngoc-results li::before { content: "✓"; position: absolute; left: 0; color: var(--wp--preset--color--gold); font-weight: 800; }
/* Question links on the gun laws band. */
.mngoc-link-list { list-style: none; padding-left: 0; display: grid; gap: 0.5em; font-weight: 600; font-size: 1.08rem; }
.mngoc-link-list li::before { content: "→ "; color: var(--wp--preset--color--black); }
/* Membership tiers on gold. */
.mngoc-tiers { padding-left: 1.1em; display: grid; gap: 0.4em; }
.has-gold-background-color a:where(:not(.wp-element-button)) { text-decoration-color: var(--wp--preset--color--black); }
/* Quotes and news cards. */
.mngoc-quote .wp-block-quote { border-left: 6px solid var(--wp--preset--color--gold); margin: 0; padding-left: 1em; font-size: 1.05rem; }
.mngoc-quote cite { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-style: normal; }
.mngoc-news-card { border-top: 4px solid var(--wp--preset--color--black); height: 100%; }

/* ---------- Inner pages ---------- */
.mngoc-breadcrumbs { font-size: 0.85rem; color: var(--wp--preset--color--secondary); margin: 0; }
.mngoc-breadcrumbs a { color: inherit; }
.has-black-background-color .mngoc-breadcrumbs { color: var(--wp--preset--color--main-accent); }
.mngoc-page-title .wp-block-post-title { margin-top: 4px; }
.mngoc-aside-list { list-style: none; padding-left: 0; margin: 0; display: grid; gap: 2px; font-size: 0.95rem; }
.mngoc-aside-list a { display: block; padding: 5px 0; text-decoration: none; border-bottom: 1px solid var(--wp--preset--color--border-light); }
.mngoc-aside-list a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.mngoc-aside-list .current-menu-item > a, .mngoc-aside-list a[aria-current="page"] { font-weight: 700; }
@media (min-width: 782px) {
	.mngoc-law-aside > .mngoc-aside-box:first-child { position: sticky; top: 20px; }
}
.mngoc-law-main .wp-block-post-content > * + * { margin-top: 1.1em; }
.mngoc-updated { margin-bottom: 0; margin-top: var(--wp--preset--spacing--medium); }
.mngoc-news-card .wp-block-post-title a { text-decoration: none; }
.mngoc-news-card .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.wp-block-search__input { border: 2px solid var(--wp--preset--color--border-dark); border-radius: 4px; padding: 0.6em 0.8em; }
.mngoc-results-light li::before { color: var(--wp--preset--color--black); }
.mngoc-results-light { font-size: 1.12rem; }
.mngoc-pricing { margin-top: var(--wp--preset--spacing--small); }
.mngoc-donate-card .wp-block-buttons { margin-top: var(--wp--preset--spacing--small); }

/* Converted content: tighter lists, readable data tables. */
.wp-block-post-content .wp-block-list { margin-top: 0.6em; margin-bottom: 0.9em; }
.wp-block-post-content .wp-block-list li { margin-block: 0.25em; }
.wp-block-post-content .wp-block-list li > .wp-block-list { margin-top: 0.2em; margin-bottom: 0.3em; }
.wp-block-post-content .wp-block-table { overflow-x: auto; }
.wp-block-post-content .wp-block-table table { font-size: 0.92rem; }
.wp-block-post-content .wp-block-table thead th, .wp-block-post-content .wp-block-table tr:first-child td { font-family: var(--wp--preset--font-family--display); font-weight: 700; background: var(--wp--preset--color--tertiary); }
.wp-block-post-content .wp-block-table td, .wp-block-post-content .wp-block-table th { border: 1px solid var(--wp--preset--color--border-light); padding: 0.45em 0.6em; vertical-align: top; }
.mngoc-callout { border-left: 6px solid var(--wp--preset--color--gold); padding: var(--wp--preset--spacing--small); }

/* ---------- The Events Calendar and Event Tickets: brand tokens instead of TEC blue ---------- */
html:root,
body .tribe-common,
body .tribe-events,
body .tribe-tickets {
	--tec-color-accent-primary: #231F20;
	--tec-color-accent-primary-hover: #231F20cc;
	--tec-color-accent-primary-active: #231F20e6;
	--tec-color-accent-primary-background: #FFD40026;
	--tec-color-accent-primary-week-event: #FFD40033;
	--tec-color-accent-primary-week-event-hover: #FFD40055;
	--tec-color-accent-primary-week-event-featured: #FFD4001a;
	--tec-color-accent-primary-week-event-featured-hover: #FFD40040;
	--tec-color-accent-secondary: #231F20;
	--tec-color-text-primary: #231F20;
	--tec-color-link-accent: #231F20;
	--tec-color-link-accent-hover: #231F20cc;
	--tec-font-family-sans-serif: var(--wp--preset--font-family--primary);
}
body .tribe-events-single-event-title,
body .tribe-events .tribe-events-calendar-list__event-title,
body .tribe-events .tribe-events-calendar-month__header-column-title,
body .tribe-common .tribe-common-h1, body .tribe-common .tribe-common-h2, body .tribe-common .tribe-common-h3,
body .tribe-common .tribe-common-h4, body .tribe-common .tribe-common-h5, body .tribe-common .tribe-common-h6,
body .tribe-tickets__tickets-title, body .tribe-tickets__rsvp-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}
body .tribe-events-single-event-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
body .tribe-events a:not(.tribe-common-c-btn):not(.tribe-events-c-subscribe-dropdown__button),
body .tribe-events-single a:not(.tribe-common-c-btn) { text-decoration-color: var(--wp--preset--color--gold); }
body .tribe-common .tribe-common-c-btn, body .tribe-tickets__tickets-buy, body .tribe-tickets__rsvp-actions-button-going {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	border-radius: 2px;
}

.mngoc-events-title { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 var(--wp--preset--spacing--small); }

/* "Follow the Caucus" row (parts/follow-us.html): room above it at the end of a post. */
.wp-block-post-content + .mngoc-follow { margin-top: var(--wp--preset--spacing--medium); }

/* ---------- Video grid ([mngoc_videos], wp-content/mu-plugins/mngoc-video.php) ---------- */
.mngoc-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--wp--preset--spacing--medium); }
.mngoc-videos--shorts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: var(--wp--preset--spacing--small); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.mngoc-videos--shorts .mngoc-video { scroll-snap-align: start; }
.mngoc-videos--shorts .mngoc-video__title { font-size: 0.95rem; }
.mngoc-video { margin: 0; }
.mngoc-video__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--wp--preset--color--black); border-top: 4px solid var(--wp--preset--color--black); }
.mngoc-videos--shorts .mngoc-video__media { aspect-ratio: 9 / 16; }
.mngoc-video__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.mngoc-video__media iframe { width: 100%; height: 100%; border: 0; display: block; }
.mngoc-video__play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px 0 0 -28px; border-radius: 10px; background: var(--wp--preset--color--gold); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); opacity: 0.85; transition: opacity 0.2s ease; }
.mngoc-video__media:hover .mngoc-video__play, .mngoc-video__media:focus-visible .mngoc-video__play { opacity: 1; }
.mngoc-video__play::after { content: ""; position: absolute; left: 22px; top: 12px; border-style: solid; border-width: 8px 0 8px 15px; border-color: transparent transparent transparent var(--wp--preset--color--black); }
.mngoc-video__media:hover img, .mngoc-video__media:focus-visible img { transform: scale(1.03); }
.mngoc-video__media:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 2px; }
.mngoc-video__date { margin: 10px 0 4px; font-size: 0.85rem; color: var(--wp--preset--color--secondary); }
.mngoc-video__title { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.mngoc-video__title a { text-decoration: none; color: inherit; }
.mngoc-video__title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.mngoc-videos--shorts .mngoc-video__play { left: auto; top: auto; right: 10px; bottom: 10px; margin: 0; width: 44px; height: 32px; border-radius: 8px; }
.mngoc-videos--shorts .mngoc-video__play::after { left: 17px; top: 9px; border-width: 7px 0 7px 12px; }
