/* =====================================================================
 * Masculine Volt Article Discovery
 * ===================================================================== */

.mvad-widget {
	width: 100%;
}

.mvad-widget-placeholder {
	padding: 24px;
	text-align: center;
	color: #64748b;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
}

.mvad-heading {
	margin: 0 0 18px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
}

/* ---------------------------------------------------------------------
 * Buttons row
 * ------------------------------------------------------------------- */

.mvad-buttons {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 24px;
}

.mvad-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	background-color: #f1f5f9;
	color: #334155;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.mvad-button:hover {
	transform: translateY(-1px);
}

.mvad-button:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.mvad-button-active {
	background-color: #2563eb;
	color: #ffffff;
}

.mvad-button[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

/* ---------------------------------------------------------------------
 * Results — Grid layout (default)
 * ------------------------------------------------------------------- */

.mvad-results {
	position: relative;
	transition: opacity 0.2s ease;
}

.mvad-results.mvad-layout-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.mvad-results[aria-busy="true"] {
	opacity: 0.5;
}

.mvad-empty {
	grid-column: 1 / -1;
	padding: 32px 16px;
	text-align: center;
	color: #64748b;
	font-size: 14px;
}

.mvad-error {
	padding: 16px;
	text-align: center;
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	font-size: 13px;
	margin-top: 12px;
}

/* ---------------------------------------------------------------------
 * Results — List layout (image left, details right; column count set by
 * the same Columns control Grid uses — see the widget's PHP)
 * ------------------------------------------------------------------- */

.mvad-results.mvad-layout-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.mvad-layout-list .mvad-card-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

.mvad-layout-list .mvad-card-image {
	flex: 0 0 120px;
	width: 120px;
}

.mvad-layout-list .mvad-card-body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
}

/* ---------------------------------------------------------------------
 * Results — Horizontal Scroll layout (opt-in via Results Layout control)
 * ------------------------------------------------------------------- */

.mvad-results.mvad-layout-horizontal {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 24px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	padding-bottom: 6px;
}

.mvad-results.mvad-layout-horizontal .mvad-card {
	flex: 0 0 260px;
	scroll-snap-align: start;
}

/* ---------------------------------------------------------------------
 * Article card
 * ------------------------------------------------------------------- */

.mvad-card {
	background: #ffffff;
}

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

.mvad-card-image {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #e2e8f0;
}

.mvad-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.mvad-card-link:hover .mvad-card-image img {
	transform: scale(1.05);
}

.mvad-ratio-16-9 { aspect-ratio: 16 / 9; }
.mvad-ratio-4-3  { aspect-ratio: 4 / 3; }
.mvad-ratio-1-1  { aspect-ratio: 1 / 1; }
.mvad-ratio-3-4  { aspect-ratio: 3 / 4; }

.mvad-card-body {
	padding: 16px 4px 4px;
}

.mvad-card-category {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #2563eb;
	margin: 0 0 6px;
}

.mvad-card-title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
	transition: color 0.2s ease;
}

.mvad-card-link:hover .mvad-card-title {
	color: #2563eb;
}

.mvad-card-metric {
	font-size: 13px;
	color: #64748b;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.mvad-results.mvad-layout-grid,
	.mvad-results.mvad-layout-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.mvad-results.mvad-layout-grid,
	.mvad-results.mvad-layout-list {
		grid-template-columns: 1fr;
	}

	/* Buttons row always stays a single horizontally-scrollable line on
	   mobile, regardless of Results Layout — wrapping onto multiple rows
	   would push the results down unpredictably depending on how many
	   buttons are configured. */
	.mvad-buttons {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		padding-bottom: 4px;
	}

	.mvad-button {
		scroll-snap-align: start;
	}
}
