/* ==========================================================================
   ARROYOMU - RANKINGS STYLESHEET (DARK & GOLD EDITION)
   WebEngine CMS Theme Styling
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONTENEDORES Y TARJETAS DE RANKINGS
   -------------------------------------------------------------------------- */
.ranking-card {
	margin-top: 10px;
}

.ranking-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0 !important;
}

/* Cabecera dorada en caso de no estar enlazada globalmente */
.card-header-gold {
	background: linear-gradient(135deg, rgba(65, 30, 26, 0.95), rgba(35, 15, 13, 0.98));
	border-bottom: 1px solid rgba(203, 155, 81, 0.5);
	padding: 13px 20px;
	color: #f6e27a;
	font-family: 'Cinzel', serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.8px;
	display: flex;
	align-items: center;
	gap: 10px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
	box-shadow: inset 0 1px 0 rgba(246, 226, 122, 0.2);
}

.card-header-gold i {
	color: #cb9b51;
	font-size: 17px;
}

/* --------------------------------------------------------------------------
   2. MENÚ PRINCIPAL DE RANKINGS (.rankings_menu)
   -------------------------------------------------------------------------- */
.rankings_menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	align-items: center;
	margin: 12px 0 20px 0;
	padding: 6px;
}

.rankings_menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 18px;
	background: linear-gradient(145deg, rgba(38, 17, 14, 0.85), rgba(18, 7, 6, 0.95));
	border: 1px solid rgba(203, 155, 81, 0.4);
	border-radius: 20px;
	color: #d8c29d !important;
	font-family: 'Rajdhani', sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	text-decoration: none !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.rankings_menu a:hover {
	background: linear-gradient(145deg, rgba(65, 30, 26, 0.95), rgba(35, 15, 13, 0.98));
	border-color: #f6e27a;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(203, 155, 81, 0.35);
}

.rankings_menu a.active {
	background: linear-gradient(135deg, #f6e27a 0%, #cb9b51 50%, #996c2a 100%) !important;
	border-color: #ffd700 !important;
	color: #120706 !important;
	font-weight: 800;
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(203, 155, 81, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* --------------------------------------------------------------------------
   3. FILTRO DE CLASES CON AVATARES (.rankings-class-filter)
   -------------------------------------------------------------------------- */
.rankings-class-filter {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	align-items: center;
	margin: 5px auto 22px auto;
	padding: 12px 24px;
	background: rgba(14, 6, 5, 0.7);
	border: 1px solid rgba(203, 155, 81, 0.3);
	border-radius: 35px;
	list-style: none !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(203, 155, 81, 0.05);
}

.rankings-class-filter li {
	display: inline-block;
	text-align: center;
	margin: 0;
	padding: 0;
	list-style: none !important;
	background-image: none !important;
}

.rankings-class-filter li a.rankings-class-filter-selection {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none !important;
	color: rgba(255, 255, 255, 0.75);
	font-family: 'Rajdhani', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.25s ease;
}

.char-rankings-class-filter-image {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(203, 155, 81, 0.55);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: block;
	margin: 0 auto 5px auto;
}

.rankings-class-filter-grayscale .char-rankings-class-filter-image {
	filter: grayscale(85%) opacity(55%);
	border-color: rgba(203, 155, 81, 0.25);
}

.rankings-class-filter li a:hover,
.rankings-class-filter li a:not(.rankings-class-filter-grayscale) {
	color: #f6e27a !important;
	text-shadow: 0 0 8px rgba(246, 226, 122, 0.5);
}

.rankings-class-filter li a:hover .char-rankings-class-filter-image,
.rankings-class-filter li a:not(.rankings-class-filter-grayscale) .char-rankings-class-filter-image {
	filter: grayscale(0%) opacity(100%);
	border-color: #ffd700;
	box-shadow: 0 0 14px rgba(246, 226, 122, 0.65);
	transform: scale(1.12);
}

/* --------------------------------------------------------------------------
   4. TABLA GENERAL DE POSICIONES (.rankings-table)
   -------------------------------------------------------------------------- */
.rankings-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-family: 'Rajdhani', sans-serif;
	margin-bottom: 0;
	background: transparent;
	border: none;
}

.rankings-table tr:first-child td {
	background: linear-gradient(135deg, rgba(55, 24, 21, 0.98), rgba(28, 11, 9, 0.98));
	color: #f6e27a !important;
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 12px 10px;
	border-bottom: 2px solid rgba(203, 155, 81, 0.55);
	border-top: none;
	text-align: center;
	box-shadow: inset 0 1px 0 rgba(246, 226, 122, 0.15);
}

.rankings-table td {
	padding: 10px 8px;
	vertical-align: middle;
	text-align: center;
	border-bottom: 1px solid rgba(203, 155, 81, 0.12);
	border-top: none;
	font-size: 14.5px;
	color: rgba(255, 255, 255, 0.9) !important;
	-webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
	-webkit-background-clip: border-box !important;
	background-clip: border-box !important;
	text-shadow: none;
	transition: background 0.2s ease;
}

.rankings-table td a {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-weight: 700;
	text-decoration: none;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	transition: color 0.2s ease;
}

.rankings-table td a:hover {
	color: #f6e27a !important;
	-webkit-text-fill-color: #f6e27a !important;
	text-shadow: 0 0 6px rgba(246, 226, 122, 0.4);
}

/* Filas alternadas para puestos estándar */
.rankings-table tr:nth-child(even):not(.ranking-first-place):not(.ranking-second-place):not(.ranking-third-place) td {
	background: rgba(14, 6, 5, 0.45);
}

.rankings-table tr:hover:not(.ranking-first-place):not(.ranking-second-place):not(.ranking-third-place) td {
	background: rgba(203, 155, 81, 0.08);
}

/* --------------------------------------------------------------------------
   5. PODIO DE HONOR: 1°, 2° Y 3° PUESTO
   -------------------------------------------------------------------------- */

/* Celda de posición en la tabla */
.rankings-table td.col-rank-pos {
	width: 50px;
	min-width: 50px;
	text-align: center !important;
	vertical-align: middle !important;
	padding: 8px 4px !important;
}

/* Insignia / Medalla de Posición (span dentro de td.col-rank-pos) */
.rankings-table-place {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-family: 'Rajdhani', sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.85) !important;
	-webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
	background: transparent;
	margin: 0 auto;
	line-height: 1;
	text-align: center;
	box-sizing: border-box;
}

/* --- 1° LUGAR: ORO IMPERIAL --- */
.rankings-table tr.ranking-first-place td {
	background: linear-gradient(90deg, rgba(203, 155, 81, 0.22) 0%, rgba(35, 17, 12, 0.65) 45%, rgba(18, 7, 6, 0.65) 100%) !important;
	border-top: 1px solid rgba(255, 215, 0, 0.45) !important;
	border-bottom: 1px solid rgba(255, 215, 0, 0.45) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	font-weight: 700;
}

.rankings-table tr.ranking-first-place td:first-child {
	border-left: 3px solid #ffd700 !important;
}

.rankings-table tr.ranking-first-place .rankings-table-place {
	background: linear-gradient(135deg, #fff3a8 0%, #f6e27a 35%, #cb9b51 100%) !important;
	color: #140807 !important;
	-webkit-text-fill-color: #140807 !important;
	border: 1px solid #ffd700 !important;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.65), inset 0 1px 1px #ffffff;
	font-weight: 900;
	font-size: 15px;
	text-shadow: none !important;
}

.rankings-table tr.ranking-first-place td a {
	color: #f6e27a !important;
	-webkit-text-fill-color: #f6e27a !important;
	font-weight: 800;
	text-shadow: 0 0 8px rgba(246, 226, 122, 0.5) !important;
}

.rankings-table tr.ranking-first-place .rankings-class-image {
	border: 2px solid #ffd700 !important;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

/* --- 2° LUGAR: PLATA MÍSTICA --- */
.rankings-table tr.ranking-second-place td {
	background: linear-gradient(90deg, rgba(220, 220, 235, 0.16) 0%, rgba(30, 20, 18, 0.65) 45%, rgba(18, 7, 6, 0.65) 100%) !important;
	border-top: 1px solid rgba(220, 220, 235, 0.35) !important;
	border-bottom: 1px solid rgba(220, 220, 235, 0.35) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	font-weight: 700;
}

.rankings-table tr.ranking-second-place td:first-child {
	border-left: 3px solid #e0e0ea !important;
}

.rankings-table tr.ranking-second-place .rankings-table-place {
	background: linear-gradient(135deg, #ffffff 0%, #e6e6f0 40%, #a8a8b8 100%) !important;
	color: #140807 !important;
	-webkit-text-fill-color: #140807 !important;
	border: 1px solid #ffffff !important;
	box-shadow: 0 0 8px rgba(220, 220, 235, 0.55), inset 0 1px 1px #ffffff;
	font-weight: 900;
	font-size: 15px;
	text-shadow: none !important;
}

.rankings-table tr.ranking-second-place td a {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-weight: 800;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.4) !important;
}

.rankings-table tr.ranking-second-place .rankings-class-image {
	border: 2px solid #e0e0ea !important;
	box-shadow: 0 0 8px rgba(220, 220, 235, 0.5);
}

/* --- 3° LUGAR: BRONCE ANCESTRAL --- */
.rankings-table tr.ranking-third-place td {
	background: linear-gradient(90deg, rgba(205, 127, 50, 0.18) 0%, rgba(32, 17, 13, 0.65) 45%, rgba(18, 7, 6, 0.65) 100%) !important;
	border-top: 1px solid rgba(205, 127, 50, 0.4) !important;
	border-bottom: 1px solid rgba(205, 127, 50, 0.4) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	font-weight: 700;
}

.rankings-table tr.ranking-third-place td:first-child {
	border-left: 3px solid #cd7f32 !important;
}

.rankings-table tr.ranking-third-place .rankings-table-place {
	background: linear-gradient(135deg, #ffd1b3 0%, #e59866 40%, #cd7f32 100%) !important;
	color: #140807 !important;
	-webkit-text-fill-color: #140807 !important;
	border: 1px solid #ffb380 !important;
	box-shadow: 0 0 8px rgba(205, 127, 50, 0.5), inset 0 1px 1px #ffffff;
	font-weight: 900;
	font-size: 15px;
	text-shadow: none !important;
}

.rankings-table tr.ranking-third-place td a {
	color: #f5b078 !important;
	-webkit-text-fill-color: #f5b078 !important;
	font-weight: 800;
	text-shadow: 0 0 6px rgba(245, 176, 120, 0.4) !important;
}

.rankings-table tr.ranking-third-place .rankings-class-image {
	border: 2px solid #cd7f32 !important;
	box-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
}

/* --------------------------------------------------------------------------
   7. AVATARES DE PERSONAJE Y LOGOS
   -------------------------------------------------------------------------- */
.rankings-class-image {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: middle;
	border: 1px solid rgba(203, 155, 81, 0.45);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
	transition: transform 0.2s ease;
}

.rankings-class-image:hover {
	transform: scale(1.15);
	border-color: #f6e27a;
}

/* Logos de Gremios / Guilds */
.rankings-table img[src*="guildlogo"] {
	image-rendering: pixelated;
	border-radius: 3px;
	border: 1px solid rgba(203, 155, 81, 0.4);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
	vertical-align: middle;
}

/* Banderas de País */
.rankings-table img[src*="country"] {
	border-radius: 2px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	vertical-align: middle;
}

/* Indicador de Estado Online/Offline */
.online-status-indicator {
	margin-left: 6px;
	vertical-align: middle;
	width: 9px;
	height: 9px;
}

/* --------------------------------------------------------------------------
   8. FOOTER DE ACTUALIZACIÓN (.rankings-update-time)
   -------------------------------------------------------------------------- */
.rankings-update-time {
	margin-top: 14px;
	padding: 10px 16px;
	background: rgba(14, 6, 5, 0.65);
	border: 1px solid rgba(203, 155, 81, 0.25);
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.65);
	font-family: 'Rajdhani', sans-serif;
	font-size: 13px;
	text-align: right;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.rankings-update-time::before {
	content: "\f017";
	font-family: FontAwesome;
	color: #cb9b51;
	font-size: 13px;
}
