/*
Theme Name: Bitcoin Club
Theme URI: https://bitcoinclub.bg
Author: Bitcoin Club Bulgaria
Description: Theme for bitcoinclub.bg. Built from the club's hand-inked coin badge: coin orange, ink outlines and ribbon cream, set in Sofia Sans.
Version: 0.10.3
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: bitcoinclub
*/

:root {
	--bc-coin: var(--wp--preset--color--coin);
	--bc-coin-deep: var(--wp--preset--color--coin-deep);
	--bc-ink: var(--wp--preset--color--ink);
	--bc-ink-soft: var(--wp--preset--color--ink-soft);
	--bc-ribbon: var(--wp--preset--color--ribbon);
	--bc-paper: var(--wp--preset--color--paper);
	--bc-line: 3px;
	/* The coin rim from the badge: a row of orange beads. */
	--bc-beads: radial-gradient(circle, var(--bc-coin) 0 3.5px, transparent 4px) 0 50% / 14px 14px repeat-x;
}

@media (prefers-reduced-motion: no-preference) {
	html {
			scroll-behavior: smooth;
		}
}

/* Leave room for the admin bar and the sticky section bar when jumping to a section. */

:where(.bc-main) [id] {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 4.5rem);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(a, button, input, summary):focus-visible {
	outline: 3px solid var(--bc-ink);
	outline-offset: 3px;
	border-radius: 4px;
}

.bc-main {
	margin-block-start: 0;
}

.bc-main > * + *,
.bc-main > .wp-block-post-content.alignfull > .alignfull {
	margin-block: 0;
}

/* Menu, account and cart sit together on the right. WooCommerce inserts its
   account and cart icons right after the navigation block. */

/* With a Nostr picture the round picture replaces the person icon. */

/* The one moment of motion: the badge is pressed onto the page like a sticker. */

@keyframes bc-stamp {
	from {
		opacity: 0;
		transform: rotate(-18deg) scale(1.25);
	}
	to {
		opacity: 1;
		transform: rotate(-7deg) scale(1);
	}
}

/* ---------- Sections ---------- */

.bc-section {
	position: relative;
	padding-block: var(--wp--preset--spacing--60);
}

.bc-section + .bc-section::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	width: min(76rem, 100% - 2 * clamp(1rem, 4vw, 2.5rem));
	height: 14px;
	margin-inline: auto;
	background: var(--bc-beads);
}

/* Keep narrow text blocks on the section's left edge instead of centred by the constrained layout. */

.bc-section > .bc-support__lead,
.bc-section > .bc-support__note {
	margin-left: max(0px, calc((100% - 76rem) / 2)) !important;
	margin-right: auto !important;
}

/* ---------- Events: rows cut like ticket stubs ---------- */

.bc-events__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.bc-event {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	border: var(--bc-line) solid var(--bc-ink);
	border-radius: 14px;
	background: var(--bc-paper);
}

.bc-event__date {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1rem 1.25rem;
	background: var(--bc-ribbon);
	border-right: var(--bc-line) dashed var(--bc-ink);
	border-radius: 11px 0 0 11px;
}

.bc-event__day {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: 3.75rem;
	line-height: 0.85;
}

.bc-event__month {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--bc-ink-soft);
	margin-block-start: 0.25rem;
}

.bc-event__body {
	padding: 1.125rem 1.5rem;
	align-self: center;
}

.bc-event__title {
	font-size: var(--wp--preset--font-size--x-large);
	margin: 0;
}

.bc-event__title a {
	color: inherit;
	text-decoration: none;
}

.bc-event__title a:hover {
	text-decoration: underline;
}

.bc-event__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.75rem;
	margin: 0.5rem 0 0;
	color: var(--bc-ink-soft);
}

/* "Днес", "Тече в момента", "Отминало" */

.bc-event__status {
	padding: 0.125rem 0.625rem;
	border: 2px solid var(--bc-coin);
	border-radius: 999px;
	background: var(--bc-coin);
	color: var(--bc-ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.4;
}

.bc-event--now .bc-event__status {
	border-color: var(--bc-ink);
	background: var(--bc-ink);
	color: var(--bc-paper);
}

/* Where: the calendar is shared by all Bitcoin events in Bulgaria, not only the club's. */

.bc-event__place {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem 0.625rem;
	margin: 0.5rem 0 0;
	font-weight: 600;
}

.bc-event__city {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.125rem 0.625rem;
	border: 2px solid var(--bc-ink);
	border-radius: 999px;
	background: var(--bc-ink);
	color: var(--bc-paper);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.4;
}

.bc-event__city::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50% 50% 50% 0;
	background: currentColor;
	transform: rotate(-45deg);
}

/* Events at the club space get the quiet chip; everywhere else stands out. */

.bc-event--club .bc-event__city {
	background: var(--bc-ribbon);
	color: var(--bc-ink);
}

.bc-event__venue {
	color: var(--bc-ink);
}

.bc-event--none .bc-event__venue {
	color: var(--bc-ink-soft);
	font-weight: 400;
	font-style: italic;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.bc-events__empty {
	max-width: 40rem;
	font-size: var(--wp--preset--font-size--large);
	margin: 0;
}

.bc-events__subhead {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	margin: var(--wp--preset--spacing--50) 0 1rem;
}

/* Past events: torn-off stubs. Grey ink, no fill, and an "Отминало" tag. */

.bc-event--past {
	border-color: var(--bc-ink-soft);
	border-width: 2px;
	border-style: dashed;
	background: transparent;
}

.bc-event--past .bc-event__date {
	background: transparent;
	border-right: 2px dashed var(--bc-ink-soft);
}

.bc-event--past .bc-event__day,
.bc-event--past .bc-event__title,
.bc-event--past .bc-event__venue {
	color: var(--bc-ink-soft);
}

.bc-event--past .bc-event__title {
	font-size: var(--wp--preset--font-size--large);
}

.bc-event--past .bc-event__day {
	text-decoration: line-through;
	text-decoration-thickness: 3px;
}

.bc-event--past .bc-event__status,
.bc-event--past .bc-event__city {
	border-color: var(--bc-ink-soft);
	background: transparent;
	color: var(--bc-ink-soft);
}

/* A small coin as the bullet. */

/* ---------- Support: levels drawn as member cards ---------- */

.bc-support__lead {
	max-width: 40rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
}

.bc-card {
	position: relative;
	min-height: 17rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 1.5rem 1.75rem;
	background: var(--bc-ribbon);
	border: var(--bc-line) solid var(--bc-ink);
	border-radius: 18px;
}

.bc-card:nth-child(2) {
	background: var(--bc-coin);
}

.bc-card:nth-child(3) {
	background: var(--bc-ink);
	color: var(--bc-ribbon);
}

.bc-card::after {
	content: "";
	position: absolute;
	inset: auto 1.75rem 1.25rem;
	height: 14px;
	background: var(--bc-beads);
}

.bc-card:nth-child(2)::after {
	--bc-beads: radial-gradient(circle, var(--bc-ink) 0 3.5px, transparent 4px) 0 50% / 14px 14px repeat-x;
}

.bc-card > p {
	margin: 0;
}

.bc-card__club {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
}

/* Button sits above the row of beads at the bottom of the card. */

.bc-card:nth-child(3) .wp-block-button__link {
	background: var(--bc-coin);
	color: var(--bc-ink);
}

.bc-card:nth-child(3) .wp-block-button__link:hover {
	background: var(--bc-ribbon);
	color: var(--bc-ink);
}

.bc-card:nth-child(2) .wp-block-button__link:hover {
	background: var(--bc-paper);
	color: var(--bc-ink);
}

.bc-card:nth-child(3) :where(a):focus-visible {
	outline-color: var(--bc-coin);
}

.bc-support__note {
	margin-block-start: var(--wp--preset--spacing--40);
	color: var(--bc-ink-soft);
}

/* ---------- Plain pages ---------- */

.bc-policy__updated {
	color: var(--bc-ink-soft);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* WooCommerce caps account page elements at 1000px; keep the title on the text column. */

/* ---------- Category pages ---------- */

.bc-posts__grid {
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)) !important;
}

.bc-post-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	border: var(--bc-line) solid var(--bc-ink);
	border-radius: 18px;
	overflow: hidden;
	background: var(--bc-paper);
}

.bc-post-card__image {
	margin: 0;
	border-bottom: var(--bc-line) solid var(--bc-ink);
}

.bc-post-card__image img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.bc-post-card__body {
	padding: 1.25rem 1.5rem 1.5rem;
}

.bc-post-card__body > * {
	margin: 0;
}

.bc-post-card__body > * + * {
	margin-block-start: 0.625rem;
}

.bc-post-card__date {
	color: var(--bc-ink-soft);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.bc-post-card__title {
	font-size: 2rem;
	line-height: 1;
}

.bc-post-card__title a {
	color: var(--bc-ink);
	text-decoration: none;
}

.bc-post-card__title a:hover {
	text-decoration: underline;
}

.bc-post-card__excerpt p {
	margin: 0;
	color: var(--bc-ink-soft);
}

.bc-post-card__excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

/* News: a dated list, newest first. */

.bc-pagination {
	margin-block-start: var(--wp--preset--spacing--50);
	font-weight: 700;
}

.bc-empty {
	font-size: var(--wp--preset--font-size--large);
}

/* A post that opens with its video shows the video instead of a featured image
   (the featured image is the same video's thumbnail). */

/* ---------- Pagination ---------- */

.bc-pagination {
	align-items: center;
	gap: 1rem;
}

.bc-pagination .wp-block-query-pagination-numbers {
	display: flex;
	gap: 0.375rem;
}

.bc-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.5rem;
	border: 2px solid var(--bc-ink);
	border-radius: 999px;
	color: var(--bc-ink);
	text-decoration: none;
}

.bc-pagination a.page-numbers:hover {
	background: var(--bc-ribbon);
}

.bc-pagination .page-numbers.current {
	background: var(--bc-ink);
	color: var(--bc-paper);
}

.bc-pagination .page-numbers.dots {
	border-color: transparent;
}

.bc-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
	color: var(--bc-ink);
}

/* Woo's step and panel titles inherit the condensed display face at body size,
   where it reads as cramped. Use the body face, bold, like other small headings. */

:where(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) :is(
	.wc-block-components-title,
	.wc-block-components-checkout-step__title,
	.wc-block-cart__totals-title,
	.wc-block-components-product-name
) {
	font-family: var(--wp--preset--font-family--body) !important;
	letter-spacing: 0;
	line-height: 1.3;
}

:where(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) :is(
	.wc-block-components-title,
	.wc-block-components-checkout-step__title,
	.wc-block-cart__totals-title
) {
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 700 !important;
	text-transform: none !important;
}

.wp-block-woocommerce-cart .wc-block-cart-items__header,
.wp-block-woocommerce-cart .wc-block-cart-items__header * {
	text-transform: none;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	color: var(--bc-ink-soft);
}

.wc-block-components-product-name {
	color: var(--bc-ink);
	font-weight: 700;
}

.wc-block-components-notice-banner,
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.wc-memberships-restriction-message {
	border: 2px solid var(--bc-ink) !important;
	border-radius: 14px !important;
	background: var(--bc-ribbon) !important;
	color: var(--bc-ink) !important;
}

/* A notice inside a notice (the cart script can nest them) is not framed a second time. */

:is(.woocommerce-error, .woocommerce-message, .woocommerce-info) :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.woocommerce-info::before {
	display: none;
}

.woocommerce-info {
	padding-inline-start: 1.25rem !important;
}

.wc-block-components-notice-banner > svg,
.woocommerce-message::before {
	background: var(--bc-coin) !important;
	color: var(--bc-ink) !important;
	fill: var(--bc-ink) !important;
	border-radius: 50%;
}

/* Woo focuses a new notice so screen readers announce it; the border is enough to see it. */

.wc-block-components-notice-banner:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* Woo's page templates (cart, checkout, account) put the title flush on top. */

.woocommerce-cart main,
.woocommerce-checkout main,
.woocommerce-account main {
	padding-block-end: var(--wp--preset--spacing--60);
}

/* ---------- Store: level page and level list ---------- */

.bc-card > .bc-card__club {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0;
}

.bc-card__club a {
	color: inherit;
	text-decoration: none;
}

.bc-card__club a:hover {
	text-decoration: underline;
}

/* Woo's price block sets its own size; on the card the price is the poster number. */

/* ---------- Store: account ---------- */

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
	border: var(--bc-line) solid var(--bc-ink) !important;
	border-radius: 18px !important;
	padding: 1.5rem 1.75rem !important;
	background: var(--bc-ribbon);
}

.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-inline-start: 1rem;
}

.woocommerce-account .woocommerce-Input,
.woocommerce-account .input-text {
	background: var(--bc-paper);
	border: 2px solid var(--bc-ink) !important;
	border-radius: 10px !important;
}

/* ---------- Small screens ---------- */

@media (max-width: 781px) {
	.bc-event {
			grid-template-columns: 5.25rem 1fr;
		}

.bc-event__date {
			padding: 0.875rem;
		}

.bc-event__day {
			font-size: 2.75rem;
		}

.bc-event__body {
			padding: 0.875rem 1rem;
		}
}

/* ---------- Store: empty cart ---------- */

.wp-block-woocommerce-empty-cart-block {
	max-width: 40rem;
	padding-block: var(--wp--preset--spacing--40);
}

/* ---------- Store: account profile (My Account) ----------
   The account page uses the home page's wide width (templates/page-my-account.html).
   Markup: bitcoinclub-membership/templates/myaccount/. */

.woocommerce-account main .woocommerce {
	max-width: none;
}

/* Logged in, the profile header carries the name; the page title would repeat "Профил". */

/* The login form keeps a readable width on the wide page. */

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register,
.woocommerce-account .woocommerce-ResetPassword {
	max-width: 34rem;
}

/* Loyalty badges: coins that get darker and bolder with time. */

/* On the dark loyalty chip the small coin needs its own contrast. */

/* Overview: three panels. */

/* Sections under the panels: calendar of paid months, badge ladder. */

/* Profile tab: the account form. */

.woocommerce-EditAccountForm {
	max-width: 52rem;
}

.woocommerce-EditAccountForm fieldset {
	margin: 0 0 2rem;
	padding: 1.5rem 1.75rem;
	border: var(--bc-line) solid var(--bc-ink);
	border-radius: 18px;
}

.woocommerce-EditAccountForm legend {
	padding: 0 0.5rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--large);
}

/* Search form (WordPress search and product search) */

/* Search heading is a sentence, so it needs a smaller size than a category name. */

/* Cart page: same top spacing as checkout, title in the display face. */

/* Order confirmation (thank-you page) */

/* The summary (order number, date, total, payment) is a row of facts on a cream panel. */

/* Section headings above totals and addresses */

/* Coming soon: one ink screen with the badge. */
