/*
 * Sportiva Suite — Convenzioni Widgets CSS
 * Caricato solo quando viene renderizzato un widget/shortcode Convenzioni.
 */

/* ── Base ─────────────────────────────────────────────────────────── */

.spv-conv-widget {
	box-sizing: border-box;
}

.spv-conv-widget *,
.spv-conv-widget *::before,
.spv-conv-widget *::after {
	box-sizing: inherit;
}

.spv-conv-editor-placeholder {
	background: #f0f4ff;
	border: 2px dashed #a0aec0;
	border-radius: 6px;
	padding: 16px 20px;
	color: #718096;
	font-size: 13px;
	font-style: italic;
}

/* ── Info Widget ─────────────────────────────────────────────────── */

.spv-conv-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.spv-conv-info--card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px;
}

.spv-conv-info--list {
	padding: 0;
}

.spv-conv-info--compact {
	flex-direction: row;
	align-items: center;
	gap: 16px;
	padding: 12px;
	background: #f9fafb;
	border-radius: 6px;
}

.spv-conv-info__logo img {
	display: block;
	max-height: 60px;
	max-width: 120px;
	width: auto;
	object-fit: contain;
}

.spv-conv-info__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spv-conv-info__title {
	margin: 0;
	font-size: 1.25em;
	line-height: 1.3;
	font-weight: 700;
}

.spv-conv-info__status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.spv-conv-status--active {
	background: #edfaee;
	color: #008c39;
}

.spv-conv-status--soon {
	background: #fef9ea;
	color: #c07d00;
}

.spv-conv-status--expired {
	background: #fef0ef;
	color: #c0392b;
}

.spv-conv-info__partner {
	margin: 0;
	font-size: 0.9em;
	color: #555;
}

.spv-conv-info__region {
	margin: 0;
	font-size: 0.88em;
	color: #666;
}

.spv-conv-info__validity {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.spv-conv-info__date {
	font-size: 0.85em;
	color: #777;
}

.spv-conv-info__date--end {
	color: #888;
}

.spv-conv-info__cta {
	display: inline-block;
	padding: 9px 20px;
	background: #008c39;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
	align-self: flex-start;
	transition: opacity 0.2s;
}

.spv-conv-info__cta:hover {
	opacity: 0.85;
	color: #fff;
}

/* ── Attachments Widget ──────────────────────────────────────────── */

.spv-conv-attachments__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spv-conv-attachments--cards .spv-conv-attachments__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.spv-conv-attachments--compact .spv-conv-attachments__list {
	gap: 4px;
}

.spv-conv-attachments__item {
	padding: 10px 14px;
	border-radius: 6px;
	background: #f9fafb;
	border: 1px solid #e8ecf0;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.spv-conv-attachments__item:hover {
	border-color: #b0bec5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.spv-conv-attachments--compact .spv-conv-attachments__item {
	padding: 6px 10px;
	background: transparent;
	border: none;
	border-bottom: 1px solid #f0f0f0;
	border-radius: 0;
}

.spv-conv-attachments__link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.spv-conv-attachments__icon {
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
}

.spv-conv-attachments__label {
	font-weight: 600;
	font-size: 0.9em;
	color: #1a202c;
	text-decoration: none;
	flex: 1;
}

.spv-conv-attachments__link:hover .spv-conv-attachments__label {
	color: #2271b1;
}

.spv-conv-attachments__ext {
	font-size: 11px;
	color: #fff;
	background: #718096;
	padding: 1px 6px;
	border-radius: 4px;
	font-weight: 600;
	flex-shrink: 0;
}

.spv-conv-attachments__desc {
	margin: 4px 0 0;
	font-size: 0.82em;
	color: #718096;
}

/* ── Downloads Widget ────────────────────────────────────────────── */

.spv-conv-downloads__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.spv-conv-downloads--cards .spv-conv-downloads__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.spv-conv-downloads__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: #f9fafb;
	border: 1px solid #e8ecf0;
	border-radius: 8px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.spv-conv-downloads__item:hover {
	border-color: #b0bec5;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.spv-conv-downloads--cards .spv-conv-downloads__item {
	flex-direction: column;
	align-items: flex-start;
}

.spv-conv-downloads--compact .spv-conv-downloads__item {
	padding: 8px 0;
	background: transparent;
	border: none;
	border-bottom: 1px solid #f0f0f0;
	border-radius: 0;
}

.spv-conv-downloads__icon {
	font-size: 22px;
	flex-shrink: 0;
}

.spv-conv-downloads__info {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.spv-conv-downloads--cards .spv-conv-downloads__info {
	width: 100%;
}

.spv-conv-downloads__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.spv-conv-downloads__title {
	font-weight: 600;
	font-size: 0.9em;
	color: #1a202c;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.spv-conv-downloads__desc {
	font-size: 0.8em;
	color: #718096;
	margin: 0;
}

.spv-conv-downloads__date {
	font-size: 0.75em;
	color: #a0aec0;
}

.spv-conv-downloads__btn {
	display: inline-block;
	padding: 7px 16px;
	background: #008c39;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background-color 0.2s, opacity 0.2s;
}

.spv-conv-downloads--cards .spv-conv-downloads__btn {
	align-self: flex-start;
	margin-top: 8px;
}

.spv-conv-downloads__btn:hover {
	opacity: 0.85;
	color: #fff;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.spv-conv-info--compact {
		flex-direction: column;
		align-items: flex-start;
	}

	.spv-conv-attachments--cards .spv-conv-attachments__list {
		grid-template-columns: 1fr;
	}

	.spv-conv-downloads--cards .spv-conv-downloads__list {
		grid-template-columns: 1fr;
	}

	.spv-conv-downloads__item {
		flex-wrap: wrap;
	}

	.spv-conv-downloads__btn {
		width: 100%;
		text-align: center;
	}
}
