/* Club FB Albums: inherits the theme's fonts and colors; only layout here. */

.cfa {
	--cfa-cols: 3;
	--cfa-gap: 1.25rem;
	--cfa-tint: rgba(127, 127, 127, 0.14);
}

/* Filters */
.cfa-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	margin: 0 0 2rem;
}
.cfa-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.9em;
}
.cfa-filters__field--grow {
	flex: 1 1 14rem;
}
.cfa-filters select,
.cfa-filters input[type="search"] {
	font: inherit;
	padding: 0.45em 0.6em;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}
.cfa-filters__reset {
	align-self: center;
	font-size: 0.9em;
}

/* Album list */
.cfa-season {
	margin: 2.5rem 0 1rem;
}
.cfa-filters + .cfa-season {
	margin-top: 0;
}
.cfa-grid {
	display: grid;
	grid-template-columns: repeat(var(--cfa-cols), minmax(0, 1fr));
	gap: var(--cfa-gap);
}
.cfa-card {
	margin: 0;
}
.cfa-card a {
	display: block;
	color: inherit;
	text-decoration: none;
}
.cfa-card a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}
.cfa-card__img {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
	background: var(--cfa-tint);
}
.cfa-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cfa-card__title {
	margin: 0.6em 0 0.15em;
	font-size: 1.05em;
	line-height: 1.3;
}
.cfa-card a:hover .cfa-card__title {
	text-decoration: underline;
}
.cfa-card__meta,
.cfa-album__meta {
	margin: 0;
	font-size: 0.875em;
	opacity: 0.75;
}
.cfa-empty {
	padding: 2rem 0;
	opacity: 0.75;
}

/* Gallery */
.cfa-album__meta {
	margin-bottom: 1rem;
}
.cfa-album__desc {
	max-width: 65ch;
}
.cfa-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
	gap: 0.4rem;
	margin: 1rem 0;
}
.cfa-gallery__item {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--cfa-tint);
}
.cfa-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cfa-gallery__item:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}
.cfa-back {
	margin-top: 1.5rem;
}

@media (max-width: 900px) {
	.cfa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.cfa-grid { grid-template-columns: minmax(0, 1fr); }
	.cfa-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
}

/* Lightbox */
html.cfa-lb-open {
	overflow: hidden;
}
.cfa-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 10, 14, 0.95);
	color: #fff;
}
.cfa-lb[hidden] {
	display: none;
}
.cfa-lb__fig {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 94vw;
}
.cfa-lb__img {
	display: block;
	max-width: 94vw;
	max-height: 82vh;
	object-fit: contain;
}
.cfa-lb__cap {
	margin-top: 0.75rem;
	max-width: 60ch;
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.4;
}
.cfa-lb__cap:empty {
	display: none;
}
/* Reset theme button styles, which often leak in. */
.cfa-lb .cfa-lb__btn {
	position: absolute;
	margin: 0;
	padding: 0;
	width: 3rem;
	height: 3rem;
	min-height: 0;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font: 400 2rem/1 system-ui, sans-serif;
	text-transform: none;
	cursor: pointer;
}
.cfa-lb .cfa-lb__btn:hover {
	background: rgba(255, 255, 255, 0.25);
}
.cfa-lb .cfa-lb__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.cfa-lb__close {
	top: max(1rem, env(safe-area-inset-top));
	right: 1rem;
}
.cfa-lb__prev,
.cfa-lb__next {
	top: 50%;
	transform: translateY(-50%);
}
.cfa-lb__prev { left: 1rem; }
.cfa-lb__next { right: 1rem; }
.cfa-lb--single .cfa-lb__prev,
.cfa-lb--single .cfa-lb__next {
	display: none;
}
.cfa-lb__count {
	position: absolute;
	top: max(1.6rem, env(safe-area-inset-top));
	left: 1.25rem;
	font-size: 0.875rem;
	opacity: 0.8;
}
@media (max-width: 600px) {
	.cfa-lb__prev,
	.cfa-lb__next {
		top: auto;
		bottom: max(1rem, env(safe-area-inset-bottom));
		transform: none;
	}
}

/* Removal requests ------------------------------------------------------ */

.cfa-notice {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-left: 4px solid currentColor;
	background: var(--cfa-tint, rgba(127, 127, 127, 0.14));
}
.cfa-notice p {
	margin: 0 0 0.5rem;
}
.cfa-notice p:last-child {
	margin-bottom: 0;
}
.cfa-notice__thumb {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: cover;
	margin: 0.5rem 0;
}
.cfa-lb .cfa-lb__report {
	margin: 0.75rem 0 0;
	padding: 0.25rem 0.5rem;
	border: 0;
	background: none;
	box-shadow: none;
	color: #fff;
	opacity: 0.8;
	font: 400 0.85rem/1.4 system-ui, sans-serif;
	text-decoration: underline;
	text-transform: none;
	cursor: pointer;
}
.cfa-lb .cfa-lb__report:hover {
	opacity: 1;
}
.cfa-lb .cfa-lb__report:focus-visible {
	outline: 2px solid #fff;
	opacity: 1;
}
.cfa-lb .cfa-lb__report[hidden] {
	display: none;
}
.cfa-lb--form .cfa-lb__btn:not(.cfa-lb__close),
.cfa-lb--form .cfa-lb__count {
	visibility: hidden;
}
.cfa-lb__panel {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
	background: rgba(8, 10, 14, 0.7);
}
.cfa-lb__panel[hidden] {
	display: none;
}
.cfa-rm {
	box-sizing: border-box;
	width: 100%;
	max-width: 28rem;
	max-height: calc(100% - 1rem);
	overflow-y: auto;
	margin: auto;
	padding: 1.25rem;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font: 400 0.95rem/1.45 system-ui, sans-serif;
	text-align: left;
}
.cfa-rm__title {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
	line-height: 1.3;
	color: inherit;
}
.cfa-rm__thumb {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	float: left;
	margin: 0 0.75rem 0.5rem 0;
}
.cfa-rm__intro {
	margin: 0 0 1rem;
	font-size: 0.9rem;
}
.cfa-rm__field {
	clear: both;
	display: block;
	margin: 0 0 0.75rem;
	font-weight: 600;
	font-size: 0.875rem;
}
.cfa-rm__field input,
.cfa-rm__field textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.25rem;
	padding: 0.5em 0.6em;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	font: 400 1rem/1.4 system-ui, sans-serif; /* 1rem avoids zoom-on-focus on iPhone. */
}
.cfa-rm__field input:focus,
.cfa-rm__field textarea:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}
.cfa-rm__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.cfa-rm__legal {
	margin: 0 0 1rem;
	font-size: 0.8rem;
	color: #50575e;
}
.cfa-rm__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.cfa-rm__actions button {
	margin: 0;
	padding: 0.6em 1em;
	border-radius: 4px;
	font: 600 0.95rem/1.2 system-ui, sans-serif;
	text-transform: none;
	cursor: pointer;
}
.cfa-rm__submit {
	border: 1px solid #1d2327;
	background: #1d2327;
	color: #fff;
}
.cfa-rm__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}
.cfa-rm__cancel {
	border: 1px solid #8c8f94;
	background: #fff;
	color: #1d2327;
}
.cfa-rm__actions button:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
