/*
Theme Name:   Buffalo AA
Template:     twentyfourteen
Version:      1.0.0
Description:  Calmer, more readable look for buffaloaany.org built on Twenty Fourteen. Only restyles the theme around the content; the meeting finder (TSML UI) keeps its own styling.
Text Domain:  buffaloaany-child
*/

:root {
	--bfa-ink: #1b2430;
	--bfa-muted: #4a5565;
	--bfa-navy: #1e3a5f;
	--bfa-navy-dark: #16304f;
	--bfa-soft: #f3f5f8;
	--bfa-line: #dde2e8;
	--bfa-link: #1d4ed8;
	--bfa-link-hover: #1e3a8a;
	--bfa-help: #c2410c;
}

/* ---------- Base ---------- */

body {
	background: #fff;
	color: var(--bfa-ink);
	font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
}

.site-header input,
.entry-content input,
.entry-content select,
.entry-content textarea {
	font-family: inherit;
}

a {
	color: var(--bfa-link);
}

a:hover,
a:focus,
a:active {
	color: var(--bfa-link-hover);
}

/* Full width (carried over from the old Additional CSS) */
.site,
.site-header {
	max-width: 100%;
}

.comment-content img[height],
.entry-content img,
.entry-summary img,
img[class*="align"],
img[class*="wp-image-"],
img[class*="attachment-"] {
	width: 100%;
}

/* Drop the black left column (it repeated the top menu and language picker) and the skyline photo */
.site:before,
#secondary,
#site-header {
	display: none;
}

/* ---------- Meeting finder: keep exactly as it looks today ---------- */

#tsml-ui {
	color: #2b2b2b;
	font-family: Lato, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- Help bar ---------- */

.bfa-helpbar {
	background: var(--bfa-navy);
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
}

.bfa-helpbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 11px 16px;
	text-align: center;
}

.bfa-helpbar a,
.bfa-helpbar a:hover,
.bfa-helpbar a:focus {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--bfa-line);
}

.header-main {
	max-width: 1200px;
	margin: 0 auto;
	min-height: 64px;
	padding: 0 16px;
}

.site-title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
	max-width: calc(100% - 120px);
	white-space: normal;
}

.site-title a {
	display: flex;
	align-items: center;
	min-height: 64px;
	overflow: visible;
	white-space: normal;
}

.site-title a,
.site-title a:hover {
	color: var(--bfa-ink);
}

.site-title a:before {
	content: "AA";
	flex: none;
	width: 40px;
	height: 40px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--bfa-navy);
	color: #fff;
	font-size: 14px;
	line-height: 40px;
	text-align: center;
}

.search-toggle {
	background: var(--bfa-navy);
	border-radius: 8px;
	height: 44px;
	width: 44px;
	margin: 10px 52px 0 0;
}

.search-toggle:hover,
.search-toggle.active {
	background: var(--bfa-navy-dark);
}

.search-toggle:before {
	margin-top: 12px;
}

.search-box {
	background: var(--bfa-soft);
	border-bottom: 1px solid var(--bfa-line);
}

.search-box .search-field {
	background: #fff;
	border: 1px solid #a9b3c1;
	border-radius: 8px;
	color: var(--bfa-ink);
	font-size: 17px;
	padding: 10px 14px;
}

/* Phone menu */
.menu-toggle {
	background: #fff;
	border: 1px solid var(--bfa-line);
	border-radius: 8px;
	height: 44px;
	width: 44px;
	top: 10px;
	right: 16px;
}

.menu-toggle:before {
	color: var(--bfa-ink);
	padding: 0;
	line-height: 42px;
}

.menu-toggle:hover,
.menu-toggle:focus {
	background: var(--bfa-soft);
}

.primary-navigation {
	clear: both;
}

.primary-navigation.toggled-on {
	padding: 8px 0 16px;
}

.primary-navigation .nav-menu,
.site-navigation a {
	border-color: var(--bfa-line);
}

.site-navigation a {
	color: var(--bfa-ink);
	font-size: 17px;
	padding: 12px 4px;
	text-transform: none;
}

.site-navigation a:hover {
	color: var(--bfa-navy);
}

.site-navigation .current_page_item > a,
.site-navigation .current_page_ancestor > a,
.site-navigation .current-menu-item > a,
.site-navigation .current-menu-ancestor > a {
	color: var(--bfa-navy);
	font-weight: 700;
}

@media screen and (min-width: 783px) {
	.header-main {
		position: relative;
	}

	/* Leave room on the right for the language picker */
	.search-toggle {
		margin-right: 128px;
	}

	/* GTranslate adds the language picker to the menu; show it as a button
	   beside search instead. On phones it stays in the menu. */
	.primary-navigation .menu-item-gtranslate {
		position: absolute;
		top: 10px;
		right: 16px;
		height: 44px;
		line-height: 42px;
		width: 120px;
	}

	.primary-navigation .menu-item-gtranslate > a {
		border: 1px solid var(--bfa-line);
		border-radius: 8px;
		box-sizing: border-box;
		height: 44px;
		text-align: center;
		width: 100%;
	}

	.primary-navigation .menu-item-gtranslate > ul {
		top: 44px;
	}

	/* Open the list leftwards so it stays on screen */
	.primary-navigation .menu-item-gtranslate:hover > ul,
	.primary-navigation .menu-item-gtranslate.focus > ul {
		left: auto;
		right: 0;
	}

	/* Menu gets its own row under the title so all items fit */
	.primary-navigation {
		clear: both;
		float: none;
		font-size: 15px;
		font-weight: 600;
		margin: 0 -10px;
		text-transform: none;
	}

	.primary-navigation li {
		height: 48px;
		line-height: 48px;
	}

	.primary-navigation a {
		color: var(--bfa-ink);
		padding: 0 10px;
	}

	.primary-navigation li:hover > a,
	.primary-navigation li.focus > a {
		background: var(--bfa-soft);
		color: var(--bfa-navy);
	}

	.primary-navigation .current_page_item > a,
	.primary-navigation .current_page_ancestor > a,
	.primary-navigation .current-menu-item > a,
	.primary-navigation .current-menu-parent > a,
	.primary-navigation .current-menu-ancestor > a {
		color: var(--bfa-navy);
		box-shadow: inset 0 -3px 0 var(--bfa-navy);
	}

	.primary-navigation ul ul {
		background: #fff;
		border: 1px solid var(--bfa-line);
		border-radius: 0 0 8px 8px;
		box-shadow: 0 8px 20px rgba(27, 36, 48, 0.12);
		top: 48px;
	}

	.primary-navigation ul ul ul {
		top: 0;
	}

	.primary-navigation ul ul li {
		height: auto;
		line-height: 1.4;
	}

	.primary-navigation ul ul a {
		color: var(--bfa-ink);
		font-weight: 500;
		padding: 12px 16px;
		width: 220px;
	}

	.primary-navigation ul ul a:hover,
	.primary-navigation ul ul li.focus > a {
		background: var(--bfa-soft);
		color: var(--bfa-navy);
	}

	/* The page you're on, inside a dropdown (the parent theme makes it white) */
	.primary-navigation ul ul .current_page_item > a,
	.primary-navigation ul ul .current-menu-item > a {
		background: var(--bfa-soft);
		box-shadow: inset 3px 0 0 var(--bfa-navy);
		color: var(--bfa-navy);
		font-weight: 700;
	}
}

/* ---------- Page content ---------- */

#main {
	max-width: 1200px;
	margin: 0 auto;
}

.site-content .entry-header,
.site-content .entry-content,
.site-content .entry-summary,
.site-content .entry-meta,
.page-content {
	max-width: 760px;
}

.entry-title {
	color: var(--bfa-ink);
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -0.3px;
	line-height: 1.2;
	text-transform: none;
}

.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
	color: var(--bfa-ink);
	font-weight: 700;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

hr,
.entry-content hr {
	background-color: var(--bfa-line);
}

@media screen and (min-width: 1008px) {
	.site-content {
		margin-left: 0;
	}
}

/* ---------- Right sidebar ---------- */

.content-sidebar {
	color: var(--bfa-ink);
}

.content-sidebar .widget .widget-title,
.content-sidebar .widget h3 {
	border-top: 3px solid var(--bfa-navy);
	color: var(--bfa-ink);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.5px;
}

.content-sidebar .widget a {
	color: var(--bfa-link);
}

/* "Upcoming Meetings" widget: the plugin's four-column table is too narrow for
   the sidebar, so show each meeting as two lines instead:
   time · name, then place · attendance · region. */
.widget_tsml_widget_upcoming .tsml_next_meetings,
.widget_tsml_widget_upcoming .tsml_next_meetings tbody,
.widget_tsml_widget_upcoming .tsml_next_meetings tr {
	border: 0;
	display: block;
	margin: 0;
	width: 100%;
}

.widget_tsml_widget_upcoming .tsml_next_meetings thead,
.widget_tsml_widget_upcoming .tsml_next_meetings .name small,
.widget_tsml_widget_upcoming .tsml_next_meetings .location .attendance-in_person,
.widget_tsml_widget_upcoming .tsml_next_meetings tr.attendance-online .region {
	display: none;
}

.widget_tsml_widget_upcoming .tsml_next_meetings tr {
	border-bottom: 1px solid var(--bfa-line);
	padding: 10px 0;
}

.widget_tsml_widget_upcoming .tsml_next_meetings td {
	background: none;
	border: 0;
	display: inline;
	font-size: 15px;
	line-height: 1.5;
	padding: 0;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .time {
	font-weight: 700;
	white-space: nowrap;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .time::after {
	content: " · ";
	font-weight: 400;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .name a {
	font-weight: 600;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .location,
.widget_tsml_widget_upcoming .tsml_next_meetings .region {
	color: var(--bfa-muted);
	font-size: 14px;
}

/* Start the second line before the place name. */
.widget_tsml_widget_upcoming .tsml_next_meetings .location::before {
	content: "\A";
	white-space: pre;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .location div {
	display: inline;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .attendance-option small {
	font-size: inherit;
}

.widget_tsml_widget_upcoming .tsml_next_meetings .attendance-option::before,
.widget_tsml_widget_upcoming .tsml_next_meetings .region::before {
	color: var(--bfa-muted);
	content: " · ";
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--bfa-ink);
	color: #e6eaf0;
	font-size: 15px;
	max-width: 100%;
}

.site-info {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px;
}

.site-info .imprint {
	display: none;
}

.site-info a,
.site-info a:hover {
	color: #fff;
}

.bfa-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	line-height: 1.6;
}

.bfa-footer-org {
	flex: 1 1 280px;
}

.bfa-footer-org strong {
	color: #fff;
	font-size: 16px;
}

.bfa-footer-legal {
	flex: 2 1 360px;
	color: #c3cbd6;
	font-size: 13px;
	margin: 0;
}

/* ---------- Meetings page: "How to use this list" toggle ---------- */

.bfa-howto {
	border: 1px solid var(--bfa-line);
	border-radius: 10px;
	margin: 16px 16px 0;
	padding: 0 16px;
}

.bfa-howto summary {
	color: var(--bfa-link);
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 0;
}

.bfa-howto summary:hover,
.bfa-howto summary:focus {
	color: var(--bfa-link-hover);
}

.bfa-howto[open] summary {
	border-bottom: 1px solid var(--bfa-line);
	margin-bottom: 12px;
}

.bfa-howto .widget {
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 12px;
}

/* ---------- Home page ---------- */

.home .entry-header {
	display: none;
}

.home #main {
	max-width: none;
}

.home .content-area,
.home .site-content,
.home .site-content .hentry,
.home .site-content .entry-content {
	margin: 0;
	max-width: none;
	padding: 0;
}

.home .entry-content {
	hyphens: manual;
}

/* Upcoming events list from the calendar snippet: the band has its own title */
.home .entry-content .buf-side-header {
	display: none;
}

.home .entry-content .buf-side-item {
	border-color: var(--bfa-line);
	padding: 12px 0;
}

.home .entry-content .buf-side-item > span:first-child {
	font-size: 13px !important;
}

.home .entry-content .buf-side-title {
	color: var(--bfa-link);
	font-size: 17px;
}

/* Meetings starting soon (TSML next meetings table) */
.home .tsml_next_meetings {
	border-color: var(--bfa-line);
	font-size: 15px;
}

.home .tsml_next_meetings th,
.home .tsml_next_meetings td {
	border-color: var(--bfa-line);
	overflow-wrap: normal;
	padding: 10px 12px;
	word-break: normal;
}

.home .tsml_next_meetings th {
	background: var(--bfa-soft);
	color: var(--bfa-muted);
	font-size: 13px;
	letter-spacing: 0.5px;
}

.home .tsml_next_meetings .time {
	font-weight: 700;
	white-space: nowrap;
}

.entry-content .bfa-band {
	margin: 0;
	padding: 48px 16px;
}

.entry-content .bfa-band-soft {
	background: var(--bfa-soft);
}

.entry-content .bfa-wrap {
	gap: 32px 40px;
	margin: 0 auto;
	max-width: 1168px;
}

.entry-content .bfa-wrap > * {
	margin-bottom: 0;
}

/* Count a card's padding inside its column width, so columns line up from band to band */
.entry-content .bfa-wrap > .wp-block-column {
	box-sizing: border-box;
}

.entry-content .bfa-hero-title {
	font-size: 44px;
	font-weight: 800;
	letter-spacing: -0.5px;
	line-height: 1.15;
	margin: 0 0 16px;
}

.entry-content .bfa-lead {
	color: var(--bfa-muted);
	font-size: 19px;
	line-height: 1.5;
	margin-bottom: 20px;
	max-width: 560px;
}

.bfa-search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 16px;
	max-width: 620px;
}

.bfa-search input[type="search"] {
	background: #fff;
	border: 1px solid #a9b3c1;
	border-radius: 8px;
	color: var(--bfa-ink);
	flex: 1 1 260px;
	font-size: 17px;
	height: 52px;
	min-width: 0;
	padding: 0 16px;
}

.bfa-search button {
	background: var(--bfa-navy);
	border-radius: 8px;
	font-size: 17px;
	font-weight: 700;
	height: 52px;
	padding: 0 24px;
	text-transform: none;
}

.bfa-search button:hover,
.bfa-search button:focus {
	background: var(--bfa-navy-dark);
}

.entry-content .bfa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.entry-content .bfa-chips a {
	background: #fff;
	border: 1px solid #b9c4d3;
	border-radius: 999px;
	color: var(--bfa-navy);
	font-size: 15px;
	font-weight: 600;
	padding: 9px 16px;
	text-decoration: none;
}

.entry-content .bfa-chips a:hover,
.entry-content .bfa-chips a:focus {
	border-color: var(--bfa-navy);
}

.entry-content .bfa-card {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--bfa-line);
	border-radius: 14px;
	font-size: 15px;
	line-height: 1.55;
	padding: 28px;
}

.entry-content .bfa-card p {
	margin-bottom: 14px;
}

.entry-content .bfa-card p:last-child {
	margin-bottom: 0;
}

.entry-content .bfa-card-title {
	font-size: 22px;
	margin: 0 0 14px;
}

.entry-content .bfa-call {
	background: var(--bfa-help);
	border-radius: 10px;
	color: #fff;
	display: block;
	font-size: 22px;
	font-weight: 800;
	margin-bottom: 18px;
	padding: 14px;
	text-align: center;
	text-decoration: none;
}

.entry-content .bfa-call:hover,
.entry-content .bfa-call:focus {
	background: #9a3412;
	color: #fff;
}

/* Says the phone is answered around the clock, so the office hours below it
   aren't read as calling hours */
.entry-content .bfa-card .bfa-call-note {
	border-bottom: 1px solid var(--bfa-line);
	font-size: 16px;
	font-weight: 600;
	margin: -6px 0 16px;
	padding-bottom: 16px;
}

.entry-content .bfa-muted {
	color: var(--bfa-muted);
}

.entry-content .bfa-section-title {
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 16px;
}

.entry-content .bfa-more {
	font-weight: 600;
	margin: 12px 0 0;
}

.entry-content .bfa-more a {
	text-decoration: none;
}

.entry-content .bfa-more-note {
	font-size: 15px;
	margin: 2px 0 0;
}

/* The "Schedule on your phone" card is in the page twice: beside the events on
   wider screens, and right after "Meetings starting soon" on phones. */
.entry-content .bfa-phone-only {
	display: none;
}

.entry-content .bfa-app-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.entry-content .bfa-app-links a {
	background: var(--bfa-ink);
	border-radius: 8px;
	color: #fff;
	font-weight: 600;
	padding: 10px 16px;
	text-decoration: none;
}

.entry-content .bfa-about p {
	font-size: 18px;
	line-height: 1.65;
	max-width: 820px;
}

@media screen and (max-width: 781px) {
	.entry-content .bfa-band {
		padding: 32px 16px;
	}

	.entry-content .bfa-hero-title {
		font-size: 32px;
	}

	.entry-content .bfa-lead {
		font-size: 17px;
	}

	.entry-content .bfa-card {
		padding: 20px;
	}

	.home .tsml_next_meetings .region {
		display: none;
	}

	.entry-content .bfa-phone-only {
		display: block;
		margin-top: 24px;
	}

	.entry-content .bfa-desktop-only {
		display: none;
	}
}
