/* ==========================================================================
   Match Sheet Pro - Estilos Visor de Sanciones Públicas
   ========================================================================== */

:root {
	--msp-primary: #dc2626;
	--msp-primary-hover: #b91c1c;
	--msp-primary-light: #fef2f2;
	--msp-text-main: #1e293b;
	--msp-text-muted: #64748b;
	--msp-border: #e2e8f0;
	--msp-bg-card: #ffffff;
	--msp-bg-header: #f8fafc;
	--msp-radius: 10px;
	--msp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.msp-public-sanctions-container {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 20px 0;
	color: var(--msp-text-main);
}

.msp-public-sanctions-container *,
.msp-public-sanctions-container *::before,
.msp-public-sanctions-container *::after {
	box-sizing: border-box;
}

/* Barra superior y botón de descarga */
.msp-sanctions-top-bar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-bottom: 18px;
	gap: 12px;
}

.msp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid transparent;
	text-decoration: none;
	user-select: none;
}

.msp-btn-primary {
	background-color: var(--msp-primary);
	color: #ffffff !important;
	box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.msp-btn-primary:hover:not(:disabled) {
	background-color: var(--msp-primary-hover);
	box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
	transform: translateY(-1px);
}

.msp-btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.msp-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none !important;
}

.msp-btn-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

@keyframes msp-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Tarjeta principal de sanciones */
.msp-public-sanctions-wrapper {
	display: flex;
	flex-direction: column;
	gap: 28px;
	width: 100%;
	max-width: 100%;
}

.msp-sanctions-card {
	background: var(--msp-bg-card);
	border: 1px solid var(--msp-border);
	border-radius: var(--msp-radius);
	box-shadow: var(--msp-shadow);
	overflow: hidden;
	width: 100%;
	max-width: 100%;
}

/* Encabezado de la tarjeta */
.msp-sanctions-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 24px;
	background: #ffffff;
	border-bottom: 2px solid #0f172a;
	gap: 16px;
	flex-wrap: wrap;
}

.msp-header-logo {
	flex: 0 0 auto;
	max-width: 140px;
	display: flex;
	align-items: center;
}

.msp-header-logo .msp-pdf-logo {
	width: 65px;
	max-width: 65px;
	height: 65px;
	max-height: 65px;
	object-fit: contain;
	display: block;
}

.msp-header-info {
	flex: 1 1 200px;
	text-align: center;
}

.msp-header-title {
	margin: 0 0 4px 0 !important;
	font-size: 19px !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px;
	color: #0f172a;
	text-transform: uppercase;
}

.msp-header-subtitle {
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #475569;
}

.msp-header-meta {
	flex: 0 0 auto;
	text-align: right;
	font-size: 12px;
	color: #64748b;
	line-height: 1.4;
}

.msp-meta-label {
	display: block;
	font-weight: 700;
	color: #334155;
	text-transform: uppercase;
	font-size: 10px;
	letter-spacing: 0.5px;
}

.msp-meta-date {
	font-weight: 600;
	color: #0f172a;
	font-size: 13px;
}

/* Contenedor responsivo para tabla */
.msp-table-responsive {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
}

/* Tabla de sanciones */
.msp-sanctions-table {
	width: 100%;
	min-width: 580px;
	border-collapse: collapse;
	margin: 0;
	font-size: 13px;
	text-align: left;
	border: none;
}

.msp-sanctions-table thead {
	background-color: #f8fafc;
	border-bottom: 2px solid var(--msp-border);
}

.msp-sanctions-table th {
	padding: 12px 16px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #475569;
	border-right: 1px solid #edf2f7;
}

.msp-sanctions-table th:last-child {
	border-right: none;
}

.msp-sanctions-table td {
	padding: 12px 16px;
	vertical-align: middle;
	border-bottom: 1px solid var(--msp-border);
	border-right: 1px solid #f1f5f9;
	color: var(--msp-text-main);
	line-height: 1.35;
}

.msp-sanctions-table td:last-child {
	border-right: none;
}

.msp-sanctions-table tbody tr:last-child td {
	border-bottom: none;
}

.msp-sanctions-table tbody tr:nth-child(even) {
	background-color: #fcfdfd;
}

.msp-sanctions-table tbody tr:hover {
	background-color: #f8fafc;
}

/* Tipografía en celdas */
.msp-player-name {
	font-weight: 700;
	color: #0f172a;
}

.msp-player-surname {
	font-weight: 600;
	color: #1e293b;
}

.msp-club-name {
	font-weight: 500;
	color: #334155;
}

.msp-date-val {
	font-size: 12px;
	color: #475569;
	font-weight: 500;
}

/* Badges / Etiquetas */
.msp-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 9px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: capitalize;
	border: 1px solid transparent;
	white-space: nowrap;
}

.msp-causal-danger {
	background-color: #fef2f2;
	color: #b91c1c;
	border-color: #fecaca;
}

.msp-causal-warning {
	background-color: #fffbeb;
	color: #b45309;
	border-color: #fde68a;
}

.msp-causal-orange {
	background-color: #fff7ed;
	color: #c2410c;
	border-color: #ffedd5;
}

.msp-causal-purple {
	background-color: #f5f3ff;
	color: #6d28d9;
	border-color: #ede9fe;
}

.msp-causal-default {
	background-color: #f1f5f9;
	color: #475569;
	border-color: #e2e8f0;
}

.msp-badge-matches {
	background-color: #eff6ff;
	color: #1d4ed8;
	border-color: #dbeafe;
	font-weight: 800;
	font-size: 11px;
}

/* Estado Vacío */
.msp-table-empty {
	padding: 35px 20px !important;
	text-align: center !important;
}

.msp-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #64748b;
	font-size: 14px;
	font-weight: 500;
}

.msp-empty-state svg {
	color: #94a3b8;
}

.msp-sanctions-empty-notice {
	background: #f8fafc;
	border: 1px solid var(--msp-border);
	border-radius: var(--msp-radius);
	padding: 24px;
	text-align: center;
	color: #64748b;
	font-size: 15px;
}

/* Indicador de scroll móvil */
.msp-mobile-scroll-hint {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 12px;
	background: #f8fafc;
	border-top: 1px solid var(--msp-border);
	font-size: 11px;
	color: #64748b;
	font-weight: 500;
}

.msp-mobile-scroll-hint svg {
	color: #94a3b8;
	animation: msp-hint-slide 1.5s infinite ease-in-out;
}

@keyframes msp-hint-slide {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(4px); }
}

/* ==========================================================================
   Media Queries para Móviles y Tablets
   ========================================================================== */

@media screen and (max-width: 768px) {
	.msp-sanctions-top-bar {
		justify-content: stretch;
	}

	.msp-btn {
		width: 100%;
		padding: 12px 18px;
		font-size: 15px;
	}

	.msp-sanctions-header {
		flex-direction: column;
		text-align: center;
		padding: 16px;
		gap: 12px;
	}

	.msp-header-logo {
		margin: 0 auto;
	}

	.msp-header-info {
		width: 100%;
		text-align: center;
	}

	.msp-header-title {
		font-size: 17px !important;
	}

	.msp-header-subtitle {
		font-size: 13px !important;
	}

	.msp-header-meta {
		width: 100%;
		text-align: center;
		padding-top: 8px;
		border-top: 1px dashed var(--msp-border);
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 6px;
	}

	.msp-meta-label {
		display: inline;
	}

	.msp-sanctions-table th,
	.msp-sanctions-table td {
		padding: 10px 12px;
		font-size: 12px;
	}

	.msp-mobile-scroll-hint {
		display: flex;
	}
}

@media screen and (max-width: 480px) {
	.msp-public-sanctions-container {
		margin: 10px 0;
	}

	.msp-header-title {
		font-size: 16px !important;
	}

	.msp-sanctions-table {
		min-width: 520px;
	}

	.msp-badge {
		font-size: 10px;
		padding: 3px 7px;
	}
}
