/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Shop filter layout */
#shop-filter {
	padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
	background: #fff;
	box-sizing: border-box;
}

.shop-filter-modal {
	position: fixed;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	top: 0;
	right: -200vw;
	width: 200vw;
	background: rgba(0,0,0,0.5);
	/* fade background on the left side */
	background: linear-gradient(to right, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.45) 100%);
	backdrop-filter: blur(4px);
	z-index: 1000;
	height: 100%;
	overflow-y: auto;
	opacity: 0;
}

.shop-filter-modal.open {
	right: 0;
	opacity: 1;
}

#shop-filter-modal-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	position: relative;
}

#close-shop-filter-modal {
	font-size: 1.5rem;
	color: var(--accent-color1, #333);
	text-decoration: none;
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
}

#shop-filter-form {
	display: flex;
    flex-direction: column;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
    justify-content: space-between;
	min-width: 40vw;
    width: fit-content;
    padding: 2rem;
	background: #f9f9f9;
	box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
	height: 100vh;
	padding-top: 4rem;
}

.shop-filter-group {
	display: flex;
	flex-direction: column;
	min-width: 160px;
}

.shop-filter-group label {
	margin-bottom: 0.25rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--accent-color1, #000);
}

.shop-filter-checkbox {
	display: flex;
	flex-direction: row;
	gap: 0.35em;
}

.shop-filter-checkbox label {
	font-weight: normal;
	color: #000;
	font-size: 0.9rem;
}

.shop-filter-group select,
.shop-filter-group input[type="text"],
.shop-filter-group input[type="number"],
.shop-filter-group input[type="date"] {
	padding: 0.4rem 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

/* Improve multi-select appearance */
.shop-filter-group select[multiple] {
	min-height: 6rem;
}

#shop-filter-form button[type="submit"] {
	padding: 0.5rem 0.75rem;
	border: 0;
	background: var(--accent-color1, #333);
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
	height: fit-content;
}

.mobile-only {
	display: none !important;
}

#shop-filter-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	padding: 0 2rem;
	box-sizing: border-box;
	gap: 0.5rem;
	padding-right: 10rem;
	position: relative;
}

.shop-filter-header-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	width: fit-content;
	gap: 0.5rem;
} 

.shop-filter-header-item:has(.permanent)::after {
	content: "";
	background: var(--accent-color1, #333);
	width: 1px;
	height: 100%;
	min-height: 1.5rem;
}

.pill-button {
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--accent-color1, #eaeaea);
	background: #fff;
	border-radius: 9999px;
	cursor: pointer;
	font-size: 0.85rem;
	color: var(--accent-color1, #333);
	text-decoration: none;
	white-space: nowrap;
	display: none;
}

#open-shop-filter-modal {
	cursor: pointer;
	display: inline-block;
	position: absolute;
	right: 2rem;
	padding: 0.25rem 0 0.25rem 0.75rem;
	font-size: 0.85rem;
	color: var(--accent-color1, #333);
	font-weight: 600;
}

.pill-button.permanent {
	display: inline-block;
}

.pill-button.active {
	display: inline-block;
	border-color: var(--accent-color1, #eaeaea);
	background: var(--accent-color1, #eaeaea);
	color: #fff;
}


.pill-button .remove-filter {
	display: none;
}

.pill-button.active .remove-filter {
	display: inline-block;
	margin-left: 0.5rem;
	font-weight: bold;
	color: #fff;
}

@media (max-width: 600px) {
	#shop-filter-form {
		flex-direction: column;
		width: 100vw;
		height: 100vh;
		padding: 2rem;
		box-sizing: border-box;
	}

	.mobile-only {
		display: block;
	}

	.shop-filter-group {
		width: 100%;
		min-width: 0;
	}
}
