/* Enhanced Ranking Pages Styles */

/* Table Improvements */
#highscore table,
#guildHighscore table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(42, 35, 25, 0.7);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #8B6914;
    table-layout: auto;
}

/* Players Table Column Widths */
#highscore table .rank-th-1,
#highscore table tbody th { 
    width: 50px; 
    min-width: 50px;
    max-width: 50px;
}

#highscore table .rank-th-2 { 
    width: auto; 
    min-width: 150px;
}

#highscore table .rank-th-3,
#highscore table tbody td.badges-col { 
    width: 100px; 
    min-width: 100px;
    max-width: 100px;
}

#highscore table .rank-th-4,
#highscore table tbody td.level-table { 
    width: 70px; 
    min-width: 70px;
    max-width: 70px;
}

#highscore table .rank-th-5,
#highscore table tbody td.exp-table { 
    width: 120px;
    min-width: 120px;
}

/* Guilds Table Column Widths */
#guildHighscore table .guildrank-th-1,
#guildHighscore table tbody th { 
    width: 45px; 
    min-width: 45px;
    max-width: 45px;
}

#guildHighscore table .guildrank-th-2 { 
    width: 20%; 
    min-width: 100px;
}

#guildHighscore table .guildrank-th-3 { 
    width: 20%; 
    min-width: 100px;
}

#guildHighscore table .guildrank-th-4,
#guildHighscore table tbody td.badges-col { 
    width: 105px; 
    min-width: 105px;
    max-width: 105px;
}

#guildHighscore table .guildrank-th-5,
#guildHighscore table tbody td.level-table { 
    width: 60px; 
    min-width: 60px;
    max-width: 60px;
}

#guildHighscore table .guildrank-th-6,
#guildHighscore table tbody td.exp-table { 
    width: auto;
    min-width: 85px;
}

#highscore table thead tr,
#guildHighscore table thead tr {
    background: linear-gradient(135deg, #5a4a2a, #3a2a1a);
    border-bottom: 3px solid #B8860B;
}

#highscore table thead th,
#guildHighscore table thead th {
    padding: 14px 6px;
    color: #FFD700;
    font-weight: 700;
    text-align: center;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border-right: 1px solid rgba(184, 134, 11, 0.3);
    vertical-align: middle;
}

#highscore table thead th:last-child,
#guildHighscore table thead th:last-child {
    border-right: none;
}

#highscore table tbody tr,
#guildHighscore table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(139, 105, 20, 0.2);
}

#highscore table tbody tr:hover,
#guildHighscore table tbody tr:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: scale(1.005);
}

#highscore table tbody tr.zebra,
#guildHighscore table tbody tr.zebra {
    background: rgba(20, 15, 10, 0.4);
}

#highscore table tbody tr.zebra:hover,
#guildHighscore table tbody tr.zebra:hover {
    background: rgba(255, 215, 0, 0.18);
}

#highscore table tbody th,
#highscore table tbody td,
#guildHighscore table tbody th,
#guildHighscore table tbody td {
    padding: 12px 6px;
    text-align: center;
    color: #FFE4B5;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    vertical-align: middle;
}

#highscore table tbody th,
#guildHighscore table tbody th {
    font-weight: 700;
    color: #FFD700;
    font-size: 14px;
}

/* Badges Column */
.badges-col {
    white-space: nowrap;
}

/* RTL (Arabic) - badges align left */
html[dir="rtl"] .badges-col {
    text-align: left;
    padding-left: 4px;
}

/* LTR (English) - badges align right */
html[dir="ltr"] .badges-col {
    text-align: right;
    padding-right: 4px;
}

html[dir="rtl"] .empire-flag-rank {
    margin-right: 4px;
    margin-left: 0;
}

html[dir="ltr"] .empire-flag-rank {
    margin-left: 4px;
    margin-right: 0;
}

html[dir="ltr"] .trophy,
html[dir="ltr"] .player-badge-rank {
    margin-left: 2px;
}

.empire-flag-rank {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.trophy {
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

.trophy-gold {
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.7));
}

.trophy-silver {
    filter: drop-shadow(0 0 4px rgba(192, 192, 192, 0.7));
}

.trophy-bronze {
    filter: drop-shadow(0 0 4px rgba(205, 127, 50, 0.7));
}

.player-badge-rank {
    display: inline-block;
    font-size: 16px;
    vertical-align: middle;
    margin: 0 2px;
}

.badge-monarch-rank {
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.7));
}

.badge-subscriber-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-size: 10px;
    background: linear-gradient(135deg, #4169E1, #1E3A8A);
    border: 1px solid #4169E1;
    box-shadow: 0 0 4px rgba(65, 105, 225, 0.5);
}

/* Enhanced Pagination */
.wp-pagenavi-enhanced {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(42, 35, 25, 0.85);
    border-radius: 8px;
    border: 2px solid #8B6914;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.wp-pagenavi-enhanced .nav-btn {
    display: inline-block;
    padding: 10px 16px;
    background: linear-gradient(135deg, #5a4a2a, #3a2a1a);
    color: #FFE4B5;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #8B6914;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.wp-pagenavi-enhanced .nav-btn:hover {
    background: linear-gradient(135deg, #6a5a3a, #4a3a2a);
    color: #FFD700;
    border-color: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.wp-pagenavi-enhanced .current-page {
    background: linear-gradient(135deg, #B8860B, #FFD700, #B8860B);
    color: #1a1a1a;
    border-color: #FFD700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.wp-pagenavi-enhanced .current-page:hover {
    transform: none;
    cursor: default;
}

.wp-pagenavi-enhanced .first-btn,
.wp-pagenavi-enhanced .prev-btn,
.wp-pagenavi-enhanced .next-btn {
    font-weight: 700;
    background: linear-gradient(135deg, #6a5a3a, #4a3a2a);
    font-size: 16px;
}

/* Search Form Improvements */
.ranks-dropdowns-box {
    background: rgba(42, 35, 25, 0.85);
    padding: 18px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #8B6914;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranks-dropdowns-box form {
    margin: 0;
    padding: 0;
}

.ranks-dropdowns-box label {
    color: #FFD700;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    margin: 0 8px 0 0;
    display: inline-block;
    vertical-align: middle;
}

.ranks-dropdowns-box input[type="text"] {
    background: rgba(20, 15, 10, 0.7);
    border: 2px solid #B8860B;
    color: #FFE4B5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-sizing: border-box;
    vertical-align: middle;
    height: 36px;
}

.ranks-dropdowns-box input[type="text"]::placeholder {
    color: rgba(255, 228, 181, 0.5);
}

.ranks-dropdowns-box input[type="text"]:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    background: rgba(20, 15, 10, 0.9);
    color: #FFF;
}

.ranks-dropdowns-box .small-btn {
    background: linear-gradient(135deg, #B8860B, #FFD700, #B8860B);
    color: #1a1a1a;
    border: 2px solid #FFD700;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    vertical-align: middle;
    height: 36px;
    line-height: 18px;
    outline: none !important;
}

.ranks-dropdowns-box .small-btn:focus {
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ranks-dropdowns-box .small-btn i {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

.ranks-dropdowns-box .small-btn span {
    display: inline-block;
    vertical-align: middle;
}

.ranks-dropdowns-box .small-btn:hover {
    background: linear-gradient(135deg, #DAA520, #FFD700, #DAA520);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ranks-dropdowns-box .small-btn:active {
    transform: translateY(0px);
}

.clearfloat {
    clear: both;
}
