/*
Theme Name: BRYO
Theme URI: https://bryo.org.au
Description: The Brisbane Regional Youth Orchestra website theme.
Author: BRYO
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: bryo
*/

/* Most styling lives in theme.json. This file holds what blocks can't express. */

:focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 3px;
}

/* Oversized symbol overlays extend past the banner edges. */
.bryo-swoosh-host {
	position: relative;
	overflow: hidden;
}
.bryo-swoosh-host > .bryo-swoosh,
.bryo-swoosh-host > .wp-block-cover__inner-container > .bryo-swoosh {
	position: absolute;
	inset-block-start: -80px;
	inset-inline-end: -90px;
	width: min(760px, 70vw);
	margin: 0 !important;
	pointer-events: none;
	z-index: 0;
	opacity: 0.7;
}
.bryo-swoosh-host > .bryo-swoosh img,
.bryo-swoosh-host .bryo-swoosh img {
	width: 100%;
	height: auto;
	border-radius: 0;
}
.bryo-swoosh-host:not(.wp-block-cover) > *:not(.bryo-swoosh) {
	position: relative;
	z-index: 1;
}
/* Keep the symbol above the photo shading and behind the banner text. */
.wp-block-cover.bryo-swoosh-host .bryo-swoosh {
	z-index: 1;
}
.wp-block-cover.bryo-swoosh-host .wp-block-cover__inner-container > *:not(.bryo-swoosh) {
	position: relative;
	z-index: 2;
}
.bryo-swoosh--faint {
	opacity: 0.18 !important;
}
.wp-block-cover.bryo-swoosh-host .bryo-swoosh--small {
	inset-block-start: -120px;
	width: min(560px, 60vw);
}

/* Hero and page banners: darken the left so text stays readable. */
.bryo-banner .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(6, 22, 64, 0.9) 0%, rgba(6, 22, 64, 0.55) 50%, rgba(6, 22, 64, 0.15) 100%) !important;
	opacity: 1 !important;
}
.wp-block-cover.bryo-swoosh-host .wp-block-cover__inner-container {
	position: static;
}

/* Ensemble tiles: a photo with the name over a dark fade at the bottom. */
.bryo-ensemble-tile {
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	min-height: 0 !important;
}
.bryo-ensemble-tile .wp-block-cover__background {
	background: linear-gradient(180deg, rgba(6, 22, 64, 0) 45%, rgba(6, 22, 64, 0.85) 100%) !important;
	opacity: 1 !important;
}
.bryo-ensemble-tile a {
	color: inherit;
	text-decoration: none;
}
.bryo-ensemble-tile a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Outline button, used beside a solid one. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	padding-top: calc(0.9rem - 2px);
	padding-bottom: calc(0.9rem - 2px);
}

.bryo-footer a {
	color: inherit;
	text-decoration: none;
}
.bryo-footer a:hover {
	color: #ffffff;
}

/* Upcoming concerts, from [bryo_upcoming_concerts]. */
.bryo-concerts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 40px 32px;
}
.bryo-concert {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.bryo-concert p {
	margin: 0;
}
.bryo-concert__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: inherit;
	text-decoration: none;
}
.bryo-concert__photo {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 12px;
	margin-bottom: 14px;
	background: var(--wp--preset--color--tint);
}
.bryo-concert__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bryo-concert__photo:not(.bryo-concert__photo--empty)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	box-shadow: inset 0 0 52px 18px rgb(0 0 0 / 68%), inset 0 0 10px 3px rgb(0 0 0 / 35%);
	pointer-events: none;
}
.bryo-concert__when {
	color: var(--wp--preset--color--blue);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}
.bryo-concert__title {
	margin: 0;
	font-size: 1.4375rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0;
}
.bryo-concert__link:hover .bryo-concert__title {
	color: var(--wp--preset--color--blue);
}
.bryo-concert__where {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.bryo-concert__cta {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

/* The Events Calendar and Event Tickets: use BRYO's font, colours and pill buttons. */
:root,
body .tribe-common,
body .tribe-events,
body .tribe-tickets,
body .tec-block__single-event {
	--tec-font-family-sans-serif: var(--wp--preset--font-family--poppins);
	--tec-font-family-base: var(--wp--preset--font-family--poppins);
	--tec-color-accent-primary: #054abe;
	--tec-color-accent-primary-hover: #033a96;
	--tec-color-accent-primary-active: #033a96;
	--tec-color-accent-primary-background: #eef3fc;
	--tec-color-accent-primary-background-datepicker: #054abe;
	--tec-color-accent-primary-multiday: rgba(5, 74, 190, 0.24);
	--tec-color-accent-primary-multiday-hover: rgba(5, 74, 190, 0.34);
	--tec-color-button-primary: #054abe;
	--tec-color-button-primary-hover: #033a96;
	--tec-color-button-primary-active: #033a96;
	--tec-color-button-primary-background: rgba(5, 74, 190, 0.07);
	--tec-color-link-accent: #054abe;
	--tec-color-link-accent-hover: #033a96;
	--tec-color-text-primary: #14213d;
	--tec-color-text-secondary: #5a6478;
	--tec-color-text-event-date: #054abe;
	--tec-color-border-default: #e3e8f0;
	--tec-color-border-secondary: #e3e8f0;
	--tec-color-icon-active: #054abe;
	--tec-color-day-marker-current-month: #14213d;
	--tec-color-background-events-bar-submit-button: #054abe;
	--tec-color-background-events-bar-submit-button-hover: #033a96;
	--tec-color-background-events-bar-submit-button-active: #033a96;
}
body .tribe-common .tribe-common-c-btn,
body .tribe-common a.tribe-common-c-btn,
body .tribe-common button.tribe-common-c-btn,
body .tribe-events .tribe-events-c-search__button {
	border-radius: 999px;
	font-weight: 600;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}
body .tribe-events .tribe-events-calendar-list__event-title,
body .tribe-events .tribe-events-calendar-list__event-title-link {
	font-weight: 600;
	letter-spacing: -0.01em;
}
body .tribe-events .tribe-events-calendar-list__event-featured-image {
	border-radius: 12px;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
body .tribe-events .tribe-events-c-top-bar__datepicker-button,
body .tribe-events .tribe-events-calendar-list__month-separator-text {
	font-weight: 600;
}
body .tribe-events-pg-template,
body .tribe-events-single {
	font-family: var(--wp--preset--font-family--poppins);
}
body .tribe-common .tribe-common-c-btn,
body .tribe-events button.tribe-events-c-search__button {
	background-color: #054abe;
}
body .tribe-common .tribe-common-c-btn:hover,
body .tribe-common .tribe-common-c-btn:focus,
body .tribe-events button.tribe-events-c-search__button:hover,
body .tribe-events button.tribe-events-c-search__button:focus {
	background-color: #033a96;
}
/* Single event pages: keep the event photo inside the column. */
body .tribe-events-event-image img,
body .tribe-events-single .wp-post-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: 12px;
}

/* ---------- Inner page building blocks ---------- */

/* People: a round photo beside their name, role and bio. */
.bryo-person {
	gap: 22px !important;
}
.bryo-person .wp-block-image,
.bryo-person .wp-block-image img {
	width: 112px;
	height: 112px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0;
	flex: none;
}
.bryo-person .wp-block-heading {
	margin: 0;
}
.bryo-person__role {
	color: var(--wp--preset--color--blue);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}
.bryo-person-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: top;
}

/* Lists with longer entries. */
.bryo-text-list {
	max-width: 72ch;
}
.bryo-text-list li + li {
	margin-top: 0.75em;
}

/* Small pill links, such as excerpt downloads. */
.bryo-downloads .wp-block-button__link {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--blue);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--small);
	padding: 0.55rem 1.1rem;
}
.bryo-downloads .wp-block-button__link:hover {
	background: var(--wp--preset--color--blue);
	color: #fff;
}

/* Expanding sections (details blocks). */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 18px 0;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 1.25rem;
	list-style-position: outside;
}
.wp-block-details[open] summary {
	margin-bottom: 12px;
}
.bryo-bio summary {
	list-style-position: inside;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blue);
}
.bryo-bio {
	border: 0;
	padding: 4px 0 0;
}

/* Plain tables: committee, life members. */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table td,
.wp-block-table th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 14px 16px 14px 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead th {
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.wp-block-table figcaption {
	display: none;
}


/* ---------- Single event page (tribe-events/single-event.php) ---------- */
.bryo-event {
	max-width: 1280px;
	margin: 0 auto;
	padding: 40px 0 110px;
	font-family: var(--wp--preset--font-family--poppins);
	color: var(--wp--preset--color--ink);
}
.bryo-event__crumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.bryo-event__crumbs a {
	color: var(--wp--preset--color--muted);
}
h1.bryo-event__title {
	margin: 20px 0 0;
	max-width: 16em;
	font-size: clamp(2.5rem, 5vw, 4.25rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.03em;
}
.bryo-event__when {
	margin: 14px 0 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--wp--preset--color--blue);
}
.bryo-event__layout {
	display: flex;
	flex-wrap: wrap;
	gap: 48px 64px;
	align-items: flex-start;
	margin-top: 40px;
}
.bryo-event__main {
	flex: 1 1 560px;
	min-width: 0;
}
.bryo-event__photo {
	display: block;
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	border-radius: 12px;
}
.bryo-event__heading {
	margin: 44px 0 12px;
	font-size: 1.75rem;
}
.bryo-event__description {
	color: var(--wp--preset--color--ink-soft);
	max-width: 38em;
}
.bryo-event__details {
	flex: 0 1 400px;
	min-width: 0;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 32px;
}
@media (min-width: 1000px) {
	.bryo-event__details {
		position: sticky;
		top: 24px;
	}
}
.bryo-event__details dl {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.bryo-event__details dt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.bryo-event__details dd {
	margin: 2px 0 0;
	font-weight: 600;
}
.bryo-event__address {
	display: block;
	font-weight: 400;
	color: var(--wp--preset--color--ink-soft);
}
.bryo-event__directions {
	display: inline-block;
	margin-top: 4px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.bryo-event__nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 64px;
	padding-top: 24px;
	border-top: 1px solid var(--wp--preset--color--line);
	font-weight: 600;
}

/* Narrow text inside full-width bands stays left-aligned with the rest of the band. */
.bryo-swoosh-host.is-layout-constrained > p[style*="max-width"] {
	margin-left: max(0px, calc((100% - 1280px) / 2)) !important;
}
.wp-block-table td:first-child:not(:last-child) {
	white-space: nowrap;
	color: var(--wp--preset--color--muted);
	padding-right: 32px;
}

/* A dashed box marking where a form or embed will go. */
.bryo-placeholder {
	border: 2px dashed var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 32px;
	color: var(--wp--preset--color--muted);
	background: var(--wp--preset--color--tint);
}

/* Ticket form inside the event details panel: part of the panel, not a box in a box. */
body .bryo-event__details .tribe-tickets__tickets-form,
body .bryo-event__details .tribe-tickets__tickets-wrapper .tribe-tickets__tickets-form {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
	border-radius: 0;
	padding: 24px 0 0;
	margin: 24px 0 0;
	background: none;
}
body .bryo-event__details .tribe-tickets__tickets-title {
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 700;
	font-size: 1.25rem;
}
body .bryo-event__details .tribe-tickets__tickets-item-content-title {
	font-weight: 600;
}
body .bryo-event__details .tribe-tickets__tickets-buy {
	width: 100%;
	border-radius: 999px;
}

.bryo-footer__members a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Contacts table: role and what it's for, then the email. */
.bryo-contacts .bryo-muted {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.bryo-contacts td:first-child:not(:last-child) {
	white-space: normal;
	color: inherit;
}
.bryo-contacts td:last-child {
	white-space: nowrap;
}

/* "Already a member?" note: a quiet tinted strip, not a feature. */
.bryo-members-note {
	background: var(--wp--preset--color--tint);
	border-radius: 12px;
	padding: 28px 32px;
	gap: 20px 40px;
}
.bryo-members-note h3 {
	margin: 0;
}
.bryo-members-note p {
	margin: 0;
	max-width: 38em;
}
.bryo-members-note .bryo-downloads .wp-block-button__link {
	background: #fff;
}

/* ---------- Button hover states ---------- */
.wp-block-button__link,
.wp-element-button {
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(10, 26, 64, 0.16);
}

/* Solid blue (default): a deeper blue. */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--blue-dark);
	color: #fff;
}
/* Solid white (on photos and blue bands): a pale blue tint. */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link.has-white-background-color:hover {
	background-color: var(--wp--preset--color--tint) !important;
	color: var(--wp--preset--color--blue-dark) !important;
}

/* Outlined buttons fill with their outline colour. */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
	color: #fff !important;
}
.wp-block-button.is-style-outline > .wp-block-button__link.has-blue-color:hover,
.wp-block-button.is-style-outline > .wp-block-button__link.has-blue-color:focus-visible {
	background-color: var(--wp--preset--color--blue) !important;
	border-color: var(--wp--preset--color--blue) !important;
	color: #fff !important;
}
.wp-block-button.is-style-outline > .wp-block-button__link.has-white-color:hover,
.wp-block-button.is-style-outline > .wp-block-button__link.has-white-color:focus-visible {
	background-color: #fff !important;
	border-color: #fff !important;
	color: var(--wp--preset--color--navy) !important;
}

/* Small pill links (downloads, app links): fill blue. */
.bryo-downloads .wp-block-button__link:hover,
.bryo-downloads .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--blue) !important;
	color: #fff !important;
}

/* Calendar and ticket buttons from the events plugin. */
body .tribe-common .tribe-common-c-btn:hover,
body .tribe-events button.tribe-events-c-search__button:hover,
body .bryo-event__details .tribe-tickets__tickets-buy:not([disabled]):hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(10, 26, 64, 0.16);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.wp-element-button {
		transition: none;
	}
	.wp-block-button__link:hover,
	.wp-block-button__link:focus-visible {
		transform: none;
	}
}

/* ---------- Button transitions and hovers, round two ---------- */

/* Every button eases between states. */
.wp-block-button .wp-block-button__link,
.wp-element-button,
body .tribe-common .tribe-common-c-btn,
body .tribe-common .tribe-common-c-btn-border,
body .tribe-events button.tribe-events-c-search__button,
body .tribe-events .tribe-events-c-subscribe-dropdown__button,
body .tribe-tickets__tickets-buy {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Small pill buttons on light backgrounds: pale blue, filling blue on hover. */
.bryo-downloads .wp-block-button__link {
	border: 1px solid transparent;
}
.bryo-downloads .wp-block-button__link:hover,
.bryo-downloads .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--blue) !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(10, 26, 64, 0.16);
}

/* Small pill buttons on blue bands: see-through with a white edge, filling white on hover. */
.has-blue-background-color .bryo-downloads .wp-block-button__link {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(255, 255, 255, 0.45);
	color: #fff !important;
}
.has-blue-background-color .bryo-downloads .wp-block-button__link:hover,
.has-blue-background-color .bryo-downloads .wp-block-button__link:focus-visible {
	background: #fff !important;
	border-color: #fff;
	color: var(--wp--preset--color--blue) !important;
	box-shadow: 0 6px 16px rgba(3, 20, 70, 0.25);
}

/* Calendar and ticket buttons: fully rounded in every state, with a gentle lift. */
body .tribe-common .tribe-common-c-btn,
body .tribe-common .tribe-common-c-btn:hover,
body .tribe-common .tribe-common-c-btn:focus,
body .tribe-common .tribe-common-c-btn:active,
body .tribe-common .tribe-common-c-btn-border,
body .tribe-common .tribe-common-c-btn-border:hover,
body .tribe-common .tribe-common-c-btn-border:focus,
body .tribe-events button.tribe-events-c-search__button,
body .tribe-events button.tribe-events-c-search__button:hover,
body .tribe-events button.tribe-events-c-search__button:focus,
body .tribe-events .tribe-events-c-subscribe-dropdown__button,
body .tribe-events .tribe-events-c-subscribe-dropdown__button:hover,
body .tribe-events .tribe-events-c-subscribe-dropdown__button:focus-within,
body .tribe-tickets__tickets-buy,
body .tribe-tickets__tickets-buy:hover,
body .tribe-tickets__tickets-buy:focus,
body .tribe-tickets__tickets-buy:active {
	border-radius: 999px !important;
}
body .tribe-tickets__tickets-buy:not([disabled]):hover,
body .tribe-tickets__tickets-buy:not([disabled]):focus-visible {
	background-color: var(--wp--preset--color--blue-dark) !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(10, 26, 64, 0.16);
}
body .tribe-tickets__tickets-buy[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

/* "Add to calendar": a pill that fills blue on hover. */
body .tribe-events .tribe-events-c-subscribe-dropdown__button {
	border: 2px solid var(--wp--preset--color--blue) !important;
	padding: 6px 18px;
}
body .tribe-events .tribe-events-c-subscribe-dropdown__button:hover,
body .tribe-events .tribe-events-c-subscribe-dropdown__button:focus-within {
	background-color: var(--wp--preset--color--blue) !important;
	color: #fff !important;
}
body .tribe-events .tribe-events-c-subscribe-dropdown__button:hover *,
body .tribe-events .tribe-events-c-subscribe-dropdown__button:focus-within * {
	color: #fff !important;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button .wp-block-button__link,
	.wp-element-button,
	body .tribe-common .tribe-common-c-btn,
	body .tribe-tickets__tickets-buy {
		transition: none !important;
		transform: none !important;
	}
}
