/**
 * Mejora visual del tab "Backer list" del plugin de Crowdfunding.
 * Transforma la tabla básica en cards con avatares, fechas relativas y contador.
 */

#wpneo-tab-baker_list {
	padding: 10px 0 4px;
}

/* Banner del contador (insertado vía JS) */
#wpneo-tab-baker_list .sp-donor-count {
	background: linear-gradient(135deg, #e8f5e9 0%, #fff8e1 100%);
	border: 1px solid #d4e8d4;
	border-radius: 8px;
	padding: 14px 18px;
	margin: 0 0 16px;
	font-weight: 600;
	font-size: 15px;
	color: #1f2937;
	display: flex;
	align-items: center;
	gap: 8px;
}

#wpneo-tab-baker_list .sp-donor-count .sp-count-num {
	font-size: 20px;
	font-weight: 700;
	color: #2a823b;
}

/* Tabla → cards */
#wpneo-tab-baker_list table {
	border: 0 !important;
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
	margin: 0;
}

#wpneo-tab-baker_list table tr.sp-header-row {
	display: none; /* ocultamos el header original */
}

#wpneo-tab-baker_list table tr {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	align-items: center;
	gap: 14px;
	background: #ffffff;
	border: 1px solid #eef0f3;
	border-radius: 8px;
	padding: 12px 16px;
	transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

#wpneo-tab-baker_list table tr:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	transform: translateY(-1px);
	border-color: #d4dde6;
}

#wpneo-tab-baker_list table td {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	vertical-align: middle;
}

/* Avatar con iniciales */
.sp-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #2a82d4;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	flex-shrink: 0;
	font-family: inherit;
	letter-spacing: 0.02em;
}

.sp-name {
	font-weight: 600;
	color: #1f2937;
	font-size: 15px;
	line-height: 1.3;
}

.sp-date {
	color: #6b7280;
	font-size: 12.5px;
	margin-top: 3px;
	line-height: 1.2;
}

.sp-amount {
	font-weight: 700;
	color: #2a823b;
	font-size: 18px;
	white-space: nowrap;
	letter-spacing: -0.01em;
}

/* "Mostrar más" — botón si hay muchos donantes */
#wpneo-tab-baker_list .sp-show-more {
	margin: 14px auto 0;
	display: block;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	color: #1f2937;
	padding: 9px 18px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.12s;
	font-family: inherit;
}

#wpneo-tab-baker_list .sp-show-more:hover {
	background: #e5e7eb;
}

/* ======================================================================
   "Sé el primero" banner — aparece debajo del bloque de donar cuando no
   hay donaciones aún en una campaña.
   ====================================================================== */

.sp-be-first-banner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 8px;
	padding: 16px 18px;
	margin: 14px 0 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
	width: 100%;
}

.sp-be-first-icon {
	font-size: 30px;
	line-height: 1;
	flex-shrink: 0;
}

.sp-be-first-text {
	flex: 1 1 auto;
}

.sp-be-first-title {
	font-size: 15px;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 4px;
	line-height: 1.3;
}

.sp-be-first-body {
	font-size: 13px;
	color: #4b5563;
	line-height: 1.45;
	margin: 0;
}

/* Antes de que el JS lo reposicione, ocúltalo brevemente para evitar el "flash"
   en la posición incorrecta. El JS le añade la clase .sp-be-first-positioned. */
.sp-be-first-banner:not(.sp-be-first-positioned) {
	visibility: hidden;
}
.sp-be-first-banner.sp-be-first-positioned {
	visibility: visible;
}


/* ======================================================================
   Estado vacío DENTRO del tab "Donantes" cuando no hay donaciones aún.
   ====================================================================== */

.sp-empty-backers {
	text-align: center;
	padding: 44px 22px;
	background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 10px;
	margin: 14px 0 6px;
}

.sp-empty-backers-icon {
	font-size: 48px;
	line-height: 1;
	margin-bottom: 12px;
}

.sp-empty-backers-title {
	font-size: 20px;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 8px;
	line-height: 1.3;
}

.sp-empty-backers-text {
	font-size: 15px;
	color: #4b5563;
	margin: 0;
	line-height: 1.5;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 540px) {
	.sp-empty-backers {
		padding: 32px 16px;
	}
	.sp-empty-backers-icon {
		font-size: 40px;
	}
	.sp-empty-backers-title {
		font-size: 17px;
	}
	.sp-empty-backers-text {
		font-size: 14px;
	}
}


/* Mobile */
@media (max-width: 540px) {
	#wpneo-tab-baker_list table tr {
		grid-template-columns: 44px 1fr;
		gap: 12px;
		padding: 10px 12px;
	}
	.sp-avatar {
		width: 40px;
		height: 40px;
		font-size: 14px;
	}
	.sp-amount {
		grid-column: 2;
		text-align: left;
		font-size: 16px;
		margin-top: 2px;
	}
	.sp-name {
		font-size: 14px;
	}
}
