/**
 * Before After Gallery — plugin public styles (shortcode + theme templates using .bag-* classes)
 */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.bag-skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999999;
	padding: 0.5rem 1rem;
	background: #000;
	color: #fff;
	text-decoration: none;
}

.bag-skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

.bag-site-header,
.bag-site-footer {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bag-site-footer {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: none;
	margin-top: 2rem;
}

.bag-site-title {
	margin: 0;
	font-size: 1.125rem;
}

.bag-site-title a {
	text-decoration: none;
}

.bag-main {
	max-width: 72rem;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
}

/* Page: Gallery directory */
.bag-page-directory-title {
	margin: 0 0 1rem;
	font-size: 2rem;
}

.bag-page-directory-intro {
	margin-bottom: 1.5rem;
}

.bag-page-directory-error {
	color: #b32d2e;
}

/* Shortcode: grid */
.bag-category-directory__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}

.bag-category-directory__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 1rem;
}

.bag-category-directory__link {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0.375rem;
	text-decoration: none;
	color: inherit;
	min-height: 100%;
}

.bag-category-directory__link:hover,
.bag-category-directory__link:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bag-category-directory__name {
	font-weight: 600;
}

.bag-category-directory__count {
	font-size: 0.875rem;
	opacity: 0.85;
}

/* Shortcode: services layout */
.bag-gallery-services {
	max-width: 75rem;
	margin-left: auto;
	margin-right: auto;
}

.bag-gallery-services__section-title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.125rem, 2.5vw, 1.5rem);
	font-weight: 600;
}

.bag-gallery-services__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

@media (min-width: 768px) {
	.bag-gallery-services__list {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 2.5rem;
	}
}

@media (min-width: 1100px) {
	.bag-gallery-services__list {
		grid-template-columns: repeat(3, 1fr);
		column-gap: 2rem;
	}
}

.bag-gallery-services__item {
	margin: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.bag-gallery-services__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 0;
	text-decoration: none;
	color: inherit;
	width: 100%;
	box-sizing: border-box;
}

.bag-gallery-services__row:hover .bag-gallery-services__name,
.bag-gallery-services__row:focus .bag-gallery-services__name,
.bag-gallery-services__row:hover .bag-gallery-services__action,
.bag-gallery-services__row:focus .bag-gallery-services__action {
	text-decoration: underline;
}

.bag-gallery-services__row:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bag-gallery-services__title {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	min-width: 0;
}

.bag-gallery-services__name {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.bag-gallery-services__count {
	font-size: 0.9375rem;
	font-weight: 500;
	opacity: 0.85;
	white-space: nowrap;
}

.bag-gallery-services__action {
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
	flex-shrink: 0;
}

/* Taxonomy archive */
.bag-archive-title {
	margin: 0 0 0.5rem;
	font-size: 2rem;
}

.bag-archive-description {
	margin-bottom: 1.5rem;
}

.bag-gender-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem 1.25rem;
	margin-bottom: 2rem;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 0.375rem;
}

.bag-gender-filter__fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
	flex: 1 1 auto;
}

.bag-gender-filter__legend {
	font-weight: 600;
	padding: 0;
	margin: 0 0 0.65rem;
	font-size: 1rem;
}

.bag-gender-filter__options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

.bag-gender-filter__option {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	font-size: 0.9375rem;
}

.bag-gender-filter__radio {
	width: 1.1rem;
	height: 1.1rem;
	margin: 0;
	accent-color: currentColor;
	flex-shrink: 0;
}

.bag-gender-filter__submit {
	cursor: pointer;
	flex-shrink: 0;
}

.bag-post-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1.5rem;
}

.bag-post-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.375rem;
	overflow: hidden;
}

.bag-post-card__thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.bag-post-card__title {
	margin: 0;
	padding: 0.75rem 1rem 0;
	font-size: 1.125rem;
}

.bag-post-card__excerpt {
	margin: 0.5rem 1rem 1rem;
	font-size: 0.9375rem;
	opacity: 0.9;
}

.bag-no-results {
	margin: 2rem 0;
}

.navigation.pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

/* Single */
.bag-single-title {
	margin: 0 0 1rem;
	font-size: 2rem;
}

.bag-single-meta {
	margin: 0.25rem 0;
	font-size: 0.9375rem;
}

.bag-single-meta__label {
	font-weight: 600;
	margin-right: 0.35rem;
}

.bag-single-content {
	margin: 1.5rem 0 2rem;
}

.bag-image-gallery__heading {
	font-size: 1.25rem;
	margin: 0 0 1rem;
}

.bag-image-gallery__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: 1rem;
}

.bag-image-gallery__figure {
	margin: 0;
}

.bag-image-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0.25rem;
}

.bag-single-nav {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.bag-single-nav p {
	margin: 0.5rem 0;
}

@media (max-width: 600px) {
	.bag-gender-filter {
		flex-direction: column;
		align-items: stretch;
	}

	.bag-gender-filter__fieldset {
		flex: none;
	}

	.bag-gender-filter__options {
		flex-direction: column;
		align-items: flex-start;
	}

	.bag-gender-filter__submit {
		width: 100%;
	}
}
