/**
 * Sportiva Matches CSS
 *
 * Stili per widget e shortcode incontri Sportiva.
 *
 * @package SportivaCore
 * @since   2.5.0
 */

/* ===== EVENT MATCHES ===== */

/* Layout Lista */
.spv-matches-list {
	width: 100%;
}

.spv-matches-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Layout Griglia */
.spv-matches-grid {
	width: 100%;
}

.spv-matches-grid-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Layout Card */
.spv-matches-cards {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Layout Accordion */
.spv-matches-accordion {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.spv-matches-accordion-group {
	border: 1px solid #dde0e4;
	border-radius: 8px;
	background: #ffffff;
}

.spv-matches-accordion-toggle {
	width: 100%;
	padding: 15px 20px;
	background: none;
	border: none;
	text-align: left;
	font-weight: 600;
	color: #2c2c2c;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.spv-matches-accordion-toggle::after {
	content: '+';
	font-size: 20px;
	font-weight: bold;
}

.spv-matches-accordion-toggle[aria-expanded="true"]::after {
	content: '-';
}

.spv-matches-accordion-content {
	padding: 0 20px 20px;
	display: none;
}

.spv-matches-accordion-content[aria-expanded="true"] {
	display: block;
}

/* Match Item Base */
.spv-match-item {
	padding: 20px;
	border: 1px solid #dde0e4;
	border-radius: 8px;
	background: #ffffff;
	transition: box-shadow 0.3s ease;
}

.spv-match-item:hover {
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.spv-match-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.spv-match-badge--scheduled {
	background: #e3f2fd;
	color: #0055A4;
}

.spv-match-badge--soon {
	background: #fff3e0;
	color: #e65100;
}

.spv-match-badge--live {
	background: #ffebee;
	color: #c0392b;
}

.spv-match-badge--finished {
	background: #e8f5e9;
	color: #2e7d32;
}

.spv-match-day {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 8px;
}

.spv-match-datetime {
	font-size: 14px;
	color: #666;
	margin-bottom: 8px;
}

.spv-match-place {
	font-size: 14px;
	color: #666;
	margin-bottom: 15px;
}

.spv-match-participants {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 10px;
}

.spv-match-participant {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.spv-match-logo {
	width: 50px;
	height: 50px;
	object-fit: contain;
}

.spv-match-name {
	font-size: 14px;
	font-weight: 500;
	text-align: center;
}

.spv-match-result {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 80px;
}

.spv-match-score {
	font-size: 24px;
	font-weight: 700;
}

.spv-match-vs {
	font-size: 16px;
	font-weight: 600;
	color: #999;
}

.spv-match-meta {
	display: flex;
	gap: 10px;
	font-size: 12px;
	color: #999;
}

.spv-match-round,
.spv-match-phase {
	padding: 2px 8px;
	background: #f6f7f9;
	border-radius: 4px;
}

/* ===== UPCOMING MATCHES ===== */

/* Layout Lista */
.spv-upcoming-matches-list {
	width: 100%;
}

.spv-upcoming-matches-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Layout Griglia */
.spv-upcoming-matches-grid {
	width: 100%;
}

.spv-upcoming-matches-grid-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Layout Card */
.spv-upcoming-matches-cards {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Layout Gallery */
.spv-upcoming-matches-gallery {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.spv-upcoming-match {
	padding: 20px;
	border: 1px solid #dde0e4;
	border-radius: 8px;
	background: #ffffff;
	transition: box-shadow 0.3s ease;
	position: relative;
}

.spv-upcoming-match:hover {
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.spv-upcoming-match-badge {
	position: absolute;
	top: 15px;
	right: 15px;
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.spv-upcoming-match-badge--scheduled {
	background: #e3f2fd;
	color: #0055A4;
}

.spv-upcoming-match-badge--soon {
	background: #fff3e0;
	color: #e65100;
}

.spv-upcoming-match-badge--live {
	background: #ffebee;
	color: #c0392b;
}

.spv-upcoming-match-badge--finished {
	background: #e8f5e9;
	color: #2e7d32;
}

.spv-upcoming-match-place {
	font-size: 14px;
	font-weight: 500;
	color: #666;
	margin-bottom: 10px;
}

.spv-upcoming-match-divider {
	height: 1px;
	background: #dde0e4;
	margin: 15px 0;
}

.spv-upcoming-match-participants {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 15px;
}

.spv-upcoming-match-participant {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.spv-upcoming-match-logo {
	width: 50px;
	height: 50px;
	object-fit: contain;
}

.spv-upcoming-match-name {
	font-size: 14px;
	font-weight: 500;
	text-align: center;
}

.spv-upcoming-match-result {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 80px;
}

.spv-upcoming-match-result-center {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 100px;
}

.spv-upcoming-match-score {
	font-size: 24px;
	font-weight: 700;
}

.spv-upcoming-match-score-large {
	font-size: 32px;
	font-weight: 700;
}

.spv-upcoming-match-vs {
	font-size: 16px;
	font-weight: 600;
	color: #999;
}

.spv-upcoming-match-vs-large {
	font-size: 24px;
	font-weight: 600;
	color: #999;
}

.spv-upcoming-match-datetime {
	font-size: 14px;
	color: #666;
	margin-bottom: 8px;
}

.spv-upcoming-match-date {
	font-weight: 500;
}

.spv-upcoming-match-time {
	font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
	.spv-matches-grid-items,
	.spv-upcoming-matches-grid-items {
		grid-template-columns: 1fr;
	}

	.spv-match-participants,
	.spv-upcoming-match-participants {
		flex-direction: column;
		gap: 20px;
	}

	.spv-match-result,
	.spv-upcoming-match-result {
		order: -1;
		margin-bottom: 10px;
	}

	.spv-upcoming-match-result-center {
		order: -1;
		margin-bottom: 10px;
	}
}
