/**
 * Top Stats Extension CSS - Optimized Prosilver
 * Full corrected version: titles visible + multiline stats
 */

/* ============================================
   RECENT ACTIVE TICKER
   ============================================ */
#vertical-ticker {
	position: relative;
	height: 126px;
	overflow: hidden;
}

#vertical-ticker li {
	display: block;
	height: auto;
}

#vertical-ticker,
#vertical-ticker li,
#vertical-ticker .row-item {
	overflow-anchor: none;
}

.tsticker {
	position: absolute;
	top: 2px;
	right: 20px;
}

i.tsportalfa {
	color: #fff;
	padding-left: 2px;
	font-size: 20px;
	line-height: 18px;
	font-weight: 100;
}

div.ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

dl.starimg {
	position: relative;
	background-repeat: no-repeat;
}

dl.starimg::before {
	position: absolute;
	font-family: 'FontAwesome';
	font-size: 30px;
	content: "\f0e6";
	color: #0076b1;
	left: 12px;
}

/* ============================================
   TOP STATS BLOCKS
   ============================================ */
.container {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -2px;
}

.stat-block {
	flex: 1 1 50%;
	box-sizing: border-box;
	min-width: 300px;
	padding: 0 2px;
}

/* Full width for odd last child */
.container .stat-block:nth-last-child(1):nth-child(odd) {
	flex: 1 1 100%;
}

.stat-block .topiclist dl dd {
	border: none !important;
}

/* Header: dt y dd lado a lado */
.stat-block .forabg .topiclist .header dl {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stat-block .forabg .topiclist .header dt {
	font-weight: bold;
}

.stat-block .forabg .topiclist .header dd .stats_info {
	font-size: 1em;
}

/* Filas: dt = contenido, dd = stats */
.stat-block .topiclist.forums li.row dl {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
}

.stat-block .topiclist.forums li.row dt {
	flex: 1;
	display: block;
}

.stat-block .topiclist.forums li.row dd {
	position: relative; /* stats absolutos */
	min-width: 60px;
	text-align: right;
}

/* Textos multilínea */
a.stats_topic_title,
span.stats_name,
span.stats_author {
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: clip !important;
	display: block;
}

a.stats_topic_title {
	font-size: 1.1em;
	font-weight: bold;
	padding-left: 6px;
	margin-bottom: 2px;
}

span.stats_name {
	font-size: 1.1em;
	font-weight: bold;
	padding-left: 6px;
}

span.stats_name a {
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

span.stats_author {
	padding-left: 10px;
}

/* Estadísticas (derecha) */
span.stats_info,
span.stats_infos-off,
span.stats_date-off {
	position: absolute;
	right: 6px;
	top: 0;
	text-align: right;
	white-space: nowrap;
	font-size: 1.1em;
	display: block;
}

/* ============================================
   TOP POSTERS PAGE
   ============================================ */
p.tp-head {
	font-size: 1.5rem;
	text-align: center;
	margin-top: 0.5rem;
	margin-bottom: 1.75rem;
	opacity: .8;
}

p.tp-head i {
	color: #ffd900;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
	transform: scale(1.3);
	margin: 0 4px;
}

.top-posters-section {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 10px;
	margin: 14px auto;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.top-posters.podium-row {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 0;
	margin: 30px 0;
}

.top-posters.rest-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px 25px;
	margin: 20px 0 10px;
	border-top: 1px solid #eee;
	padding-top: 20px;
}

.top-poster {
	text-align: center;
	color: #333;
	position: relative;
}

.top-poster .avatar img {
	border-radius: 50%;
	border: 4px solid #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	width: 100px;
	height: 100px;
	object-fit: cover;
}

.top-poster.rest .avatar img {
	width: 40px;
	height: 40px;
	border: 3px solid #ddd;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.top-poster.rest {
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 6px 12px;
	min-width: 80px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.top-poster.rest:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.top-poster .username,
.top-poster .username-coloured {
	display: block;
	margin-top: 8px;
	font-size: 1.3em;
	line-height: 1.4;
}

.top-poster.rest .username,
.top-poster.rest .username-coloured {
	font-size: 1.1em;
	line-height: 1.2;
}

.top-poster .stats {
	font-size: 1em;
	color: #666;
}

.top-poster.rest .rank {
	margin-top: 6px;
	font-size: 0.9em;
	font-weight: bold;
	color: #999;
}

/* Podium */
.podium {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	margin-top: 10px;
	padding: 0;
	color: #fff;
	min-width: 200px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
	position: relative;
	overflow: hidden;
}

.podium.gold { height: 140px; border-radius: 8px 8px 0 0; border: 1px solid #ccc; box-shadow: 0 0 6px rgba(0,0,0,0.3); z-index: 2; }
.podium.silver { height: 110px; border-radius: 8px 0 0 8px; border: 1px solid #ccc; border-right:none; box-shadow:-3px 0 6px rgba(0,0,0,0.3); z-index:1;}
.podium.bronze { height: 80px; border-radius:0 8px 8px 0; border:1px solid #ccc; border-left:none; box-shadow:3px 0 6px rgba(0,0,0,0.3); z-index:1;}

.podium-number { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; font-weight:900; color:#d9d9d9; }
.podium.gold .podium-number { font-size:60px; }
.podium.silver .podium-number { font-size:50px; }
.podium.bronze .podium-number { font-size:40px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width:700px){
	.stat-block { flex:1 1 100%; }
	.stat-block ul.topiclist li.header dt { width:50%; text-align:left; }
	.stat-block ul.topiclist li.header dd { display:block !important; width:50%; line-height:1.2em;}
	.stat-block ul.topiclist dd { display:block !important;}
}

/* ============================================
   DARK MODE
   ============================================ */
html.phpbb-dark-mode .top-posters-section { background:#0f141a; border-color:#2a3240; box-shadow:0 3px 8px rgba(0,0,0,0.7); color:#e5e7eb;}
html.phpbb-dark-mode p.tp-head { color:#f3f4f6; }
html.phpbb-dark-mode .top-posters.rest-row { border-top-color:#2a3240; }
html.phpbb-dark-mode .top-poster { color:#e5e7eb; }
html.phpbb-dark-mode .top-poster .stats { color:#cbd5e1; }
html.phpbb-dark-mode .top-poster.rest .rank { color:#94a3b8; }
html.phpbb-dark-mode .top-poster.rest { background:#111827; border-color:#334155; box-shadow:0 2px 6px rgba(0,0,0,0.5); }
html.phpbb-dark-mode .top-poster.rest:hover { box-shadow:0 4px 10px rgba(0,0,0,0.6); }
html.phpbb-dark-mode .top-poster .avatar img { border-color:#0f141a; box-shadow:0 4px 12px rgba(0,0,0,0.5); }
html.phpbb-dark-mode .top-poster.rest .avatar img { border-color:#334155; box-shadow:0 2px 6px rgba(0,0,0,0.5); }

