/* ============================================================
   Ticketplate List Events — v3.1
   Estilos 1, 2 y 3
   ============================================================ */

/* ── Reset base ─────────────────────────────────────────────── */
.tp-list *,
.tp-list *::before,
.tp-list *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.tp-list {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	width: 100%;
}

/* ── Avisos ─────────────────────────────────────────────────── */
.tp-notice {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	padding: 14px 18px;
	border-radius: 8px;
}
.tp-empty { background: #f5f5f5; color: #777; }
.tp-error { background: #fff3f3; color: #c00; border: 1px solid #ffd5d5; }


/* ============================================================
   COMPONENTES COMPARTIDOS
   ============================================================ */

/* ── Bloque de fecha ────────────────────────────────────────── */
/* El color del texto lo pone el inline style desde PHP (color2) */
.tp-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex-shrink: 0;
	line-height: 1;
}

.tp-date__month {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	opacity: 0.85;
}

.tp-date__day {
	display: block;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
}

.tp-date__time {
	display: block;
	font-size: 10px;
	font-weight: 500;
	opacity: 0.8;
	margin-top: 3px;
}

/* ── Nombre del evento ──────────────────────────────────────── */
/* color lo pone el inline style desde PHP (color3) */
.tp-info__name {
	display: block;
	font-weight: 700;
	line-height: 1.35;
}

/* ── Ciudad ─────────────────────────────────────────────────── */
.tp-info__city {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
}

.tp-info__city svg {
	width: 10px;
	height: 10px;
	flex-shrink: 0;
}

/* ── Botón de tickets ───────────────────────────────────────── */
/* color lo pone el inline style desde PHP (color2) */
.tp-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	transition: opacity 0.15s, transform 0.15s;
	cursor: pointer;
}

.tp-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.tp-btn:active { transform: translateY(0); opacity: 0.95; }

.tp-btn--soldout {
	background: #e0e0e0 !important;
	color: #999 !important;
	cursor: default;
	pointer-events: none;
}
.tp-btn--soldout:hover { opacity: 1; transform: none; }


/* ============================================================
   STYLE 1 — Lista sin thumbnail
   ============================================================ */

.tp-style-1 .tp-box {
	display: flex;
	align-items: center;
	border-bottom: 1px solid #f0f0f0;
	padding: 10px 0;
	transition: background 0.15s;
}

.tp-style-1 .tp-box:first-child { border-top: 1px solid #f0f0f0; }
.tp-style-1 .tp-box:hover { background: #fafafa; }

.tp-style-1 .tp-date {
	width: 64px;
	min-height: 56px;
	border-radius: 8px;
	padding: 10px 6px;
	flex-shrink: 0;
}

.tp-style-1 .tp-info {
	flex: 1;
	min-width: 0;
	padding: 0 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tp-style-1 .tp-info__name {
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tp-style-1 .tp-action {
	flex-shrink: 0;
	padding-left: 8px;
}


/* ============================================================
   STYLE 2 — Grid 3 columnas con thumbnail 1:1
   ============================================================ */

.tp-style-2 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.tp-card {
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(0,0,0,0.13), 0 0 0 1px rgba(0,0,0,0.05);
}

/* Imagen 1:1 */
.tp-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eee;
}

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

.tp-card:hover .tp-card__image img {
	transform: scale(1.04);
}

.tp-card__image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.4;
}

.tp-card__image-placeholder svg {
	width: 40px;
	height: 40px;
}

/* Badge de fecha sobre la imagen */
.tp-card__date {
	position: absolute;
	top: 10px;
	left: 10px;
	border-radius: 8px;
	padding: 7px 10px;
	min-width: 46px;
	text-align: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Cuerpo de la card */
.tp-card__body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	flex: 1;
}

.tp-card__body .tp-info__name {
	font-size: 15px;
}

.tp-card__body .tp-btn {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 10px;
}


/* ============================================================
   STYLE 3 — Lista con thumbnail 1:1
   ============================================================ */

.tp-style-3 .tp-box {
	display: flex;
	align-items: center;
	border-bottom: 1px solid #f0f0f0;
	padding: 10px 0;
	transition: background 0.15s;
}

.tp-style-3 .tp-box:first-child { border-top: 1px solid #f0f0f0; }
.tp-style-3 .tp-box:hover { background: #fafafa; }

/* Thumbnail cuadrado 1:1 */
.tp-thumb--row {
	width: 60px;
	aspect-ratio: 1 / 1;
	border-radius: 7px;
	overflow: hidden;
	flex-shrink: 0;
	margin-right: 10px;
	background: #eee;
}

.tp-thumb--row img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tp-style-3 .tp-date {
	width: 54px;
	min-height: 54px;
	border-radius: 7px;
	padding: 8px 5px;
	flex-shrink: 0;
}

.tp-style-3 .tp-date__day { font-size: 22px; }

.tp-style-3 .tp-info {
	flex: 1;
	min-width: 0;
	padding: 0 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tp-style-3 .tp-info__name {
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tp-style-3 .tp-action {
	flex-shrink: 0;
	padding-left: 8px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
	.tp-style-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.tp-style-2 {
		grid-template-columns: 1fr;
	}

	.tp-style-1 .tp-info__name,
	.tp-style-3 .tp-info__name {
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.tp-style-1 .tp-btn,
	.tp-style-3 .tp-btn {
		padding: 8px 12px;
		font-size: 11px;
	}
}


/* ============================================================
   MODO OSCURO
   ============================================================ */
@media (prefers-color-scheme: dark) {
	.tp-style-1 .tp-box,
	.tp-style-3 .tp-box {
		border-bottom-color: #2a2a2a;
	}
	.tp-style-1 .tp-box:first-child,
	.tp-style-3 .tp-box:first-child {
		border-top-color: #2a2a2a;
	}
	.tp-style-1 .tp-box:hover,
	.tp-style-3 .tp-box:hover {
		background: #1a1a1a;
	}

	.tp-card {
		background: #1e1e1e;
		box-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
	}
	.tp-card:hover {
		box-shadow: 0 10px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
	}

	.tp-thumb--row,
	.tp-card__image { background: #2a2a2a; }
}
