/* MergeDating Location Event Filter — minimal, theme-agnostic styling.
   Overwrite/extend these in your child theme or the Elementor
   "Custom CSS" panel if you want it to match your brand exactly. */

.mdlf-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.mdlf-tab-btn {
	padding: 0.5rem 1.25rem;
	border: 1px solid #ccc;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.2;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mdlf-tab-btn:hover {
	border-color: #999;
}

.mdlf-tab-btn.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

.mdlf-tab-btn--all {
	border-style: dashed;
}

.mdlf-dropdown-wrap {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.5rem;
}

.mdlf-dropdown-label {
	font-size: 0.9rem;
	font-weight: 600;
}

.mdlf-select {
	padding: 0.5rem 0.9rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	font-size: 0.95rem;
	min-width: 200px;
	cursor: pointer;
}

/*
 * Scoped to .mdlf-dropdown-wrap only, so this NEVER touches the
 * site-wide .select2-selection--single class used by your main
 * filter elsewhere. Select2 sets an inline "width: 100%" style on
 * its generated container, which is why plain CSS (without
 * !important) can't shrink it - the !important here overrides only
 * that inline style, only inside our own wrapper.
 */
.mdlf-dropdown-wrap .select2-container {
	width: 320px !important;
	max-width: 100%;
}

@media (max-width: 480px) {
	.mdlf-dropdown-wrap .select2-container {
		width: 100% !important;
	}
}

.mdlf-results {
	transition: opacity 0.15s ease;
}

.mdlf-results.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.mdlf-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.5rem;
}

.mdlf-page-btn {
	padding: 0.4rem 1rem;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
}

.mdlf-page-btn[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}

.mdlf-page-status {
	font-size: 0.9rem;
	opacity: 0.8;
}

.mdlf-no-results {
	text-align: center;
	padding: 2rem 0;
}

/*
 * Card grid — built independently of WooCommerce core's float-based
 * ul.products.columns-N CSS, since that stylesheet isn't reliably
 * enqueued on this custom shortcode context. This guarantees the
 * N-per-row layout regardless of what the theme/WooCommerce loads.
 */
.mdlf-products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px 24px;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}

.mdlf-products.columns-1 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.mdlf-products.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mdlf-products.columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mdlf-products.columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mdlf-products.columns-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mdlf-products.columns-6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mdlf-products > li.product {
	margin: 0 !important;
	width: auto !important;
	float: none !important;
}

.mdlf-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.mdlf-card-img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: top center; /* keep the top of the poster (logo/title) visible, crop the bottom */
	display: block;
	border-radius: 8px;
}

.mdlf-card-title {
	margin: 14px 0 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.4;
}

@media (max-width: 900px) {
	.mdlf-products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 560px) {
	.mdlf-products {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}
