/*
 * Legends of Omega - TOP MONEY
 * Complementa style.css SIN modificarlo: el bloque del HOME reutiliza las clases
 * de TOP GUERREROS (.sidebar-module, .ranking-item, .rank-*) y aqui solo se
 * agrega lo propio: icono dorado, etiqueta GP + WC debajo y la pagina completa.
 */

:root {
    --topmoney-gold: #fcc419;
    --topmoney-gold-soft: rgba(252, 196, 25, 0.10);
    --topmoney-gold-border: rgba(252, 196, 25, 0.45);
}

/* ------------------------------------------------------------------ */
/* HOME: icono dorado de monedas en el titulo                          */
/* ------------------------------------------------------------------ */
.topmoney-module h3 i {
    color: var(--topmoney-gold);
    background: var(--topmoney-gold-soft);
    border-color: var(--topmoney-gold-border);
    box-shadow: inset 0 0 5px rgba(252, 196, 25, 0.15);
}

.topmoney-module:hover h3 i {
    background: rgba(252, 196, 25, 0.18);
    border-color: var(--topmoney-gold);
    box-shadow: 0 0 8px rgba(252, 196, 25, 0.3), inset 0 0 5px rgba(252, 196, 25, 0.2);
}

/* ------------------------------------------------------------------ */
/* HOME: fila (mismo flex que TOP GUERREROS + recorte de nombres largos) */
/* ------------------------------------------------------------------ */
.topmoney-who {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.topmoney-module .character-avatar-wrapper {
    flex: 0 0 auto;
}

.topmoney-module .rank-name {
    min-width: 0;
}

/* Con saldos muy altos el nombre pasa a 2 lineas (cabe en la altura del
   avatar) en vez de recortarse: un ranking no puede ocultar el nombre. */
.topmoney-module .rank-name a {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

/* GP arriba dentro de la etiqueta (.rank-value), WC inmediatamente debajo */
.topmoney-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 0 0 auto;
    margin-left: 8px;
    text-align: right;
    line-height: 1.3;
}

.topmoney-gp {
    white-space: nowrap;
}

.topmoney-gp sup {
    color: var(--topmoney-gold);
    font-weight: 700;
}

.topmoney-wc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    padding-right: 8px;
    opacity: 0.85;
}

.topmoney-wc sup {
    font-weight: 700;
}

.topmoney-private {
    font-style: italic;
}

.topmoney-private i {
    font-size: 0.65rem;
    margin-right: 2px;
    color: var(--topmoney-gold);
}

/* ------------------------------------------------------------------ */
/* Pagina completa /rankings/money/                                    */
/* ------------------------------------------------------------------ */
.topmoney-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, rgba(21, 21, 26, 0.85) 0%, rgba(13, 13, 17, 0.9) 100%);
    border: 1px solid rgba(253, 126, 20, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.topmoney-page-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--topmoney-gold);
    background: var(--topmoney-gold-soft);
    border: 1px solid var(--topmoney-gold-border);
    font-size: 1.1rem;
}

.topmoney-page-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.topmoney-page-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

main table.table.topmoney-table .topmoney-col-pos {
    width: 48px;
    text-align: center !important;
    font-weight: 800;
    color: var(--text-secondary) !important;
}

main table.table.topmoney-table .topmoney-col-class {
    width: 66px;
}

main table.table.topmoney-table td.topmoney-col-balance {
    text-align: right !important;
}

/* La fila de cabecera no se "levanta" al pasar el mouse (como .rankings-table) */
main table.table.topmoney-table tr.topmoney-head:hover {
    transform: none !important;
    box-shadow: none !important;
}

main table.table.topmoney-table tr.topmoney-head:hover td {
    background: transparent !important;
}

/* Mismos enlaces que .rankings-table a (style.css) */
main table.table.topmoney-table a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

main table.table.topmoney-table a:hover {
    color: var(--accent-orange);
    text-shadow: 0 0 5px rgba(253, 126, 20, 0.4);
}

.topmoney-class-name {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-secondary);
}

main table.table.topmoney-table tr.topmoney-podium-1 .topmoney-col-pos {
    color: var(--topmoney-gold) !important;
}

main table.table.topmoney-table tr.topmoney-podium-2 .topmoney-col-pos {
    color: #ced4da !important;
}

main table.table.topmoney-table tr.topmoney-podium-3 .topmoney-col-pos {
    color: #e8a26b !important;
}

.topmoney-pager {
    margin-top: 0.5rem;
}

.topmoney-pager .ellipsis {
    color: var(--text-secondary);
    padding: 0 0.4em;
}

.topmoney-rule-note {
    clear: both;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.topmoney-rule-note i {
    color: var(--topmoney-gold);
    margin-right: 4px;
}

/* Privacidad del jugador */
.topmoney-privacy {
    margin-top: 1.5rem;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(135deg, rgba(21, 21, 26, 0.85) 0%, rgba(13, 13, 17, 0.9) 100%);
    border: 1px solid rgba(253, 126, 20, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.topmoney-privacy-title {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.topmoney-privacy-title i {
    margin-right: 6px;
    color: var(--accent-orange);
}

.topmoney-privacy-desc {
    margin-bottom: 0.9rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topmoney-privacy-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.topmoney-privacy-option:hover {
    border-color: rgba(253, 126, 20, 0.45);
}

.topmoney-privacy-option input {
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--accent-orange);
}

.topmoney-privacy .btn-more {
    margin-top: 0.6rem;
    font-family: inherit;
    cursor: pointer;
}

.topmoney-privacy-login {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.topmoney-privacy-login i {
    margin-right: 4px;
    color: var(--accent-orange);
}

.topmoney-privacy-login a {
    color: var(--accent-orange);
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Moviles                                                             */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
    /* index-home.php pone todas las tablas en display:block con scroll;
       esta cabe entera, asi que se mantiene como tabla a ancho completo. */
    main table.table.topmoney-table {
        display: table;
        width: 100% !important;
    }

    /* "tr td" iguala la especificidad de la cabecera de style.css (tr:first-child td).
       Medido a 375 px: la tabla ocupa justo el ancho util de <main> (283 px),
       incluso con el saldo maximo posible (2,147,483,647 GP). */
    main table.table.topmoney-table tr td {
        padding: 0.55rem 0.3rem !important;
    }

    main table.table.topmoney-table tr.topmoney-head td {
        font-size: 0.68rem !important;
        letter-spacing: 0.5px !important;
    }

    main table.table.topmoney-table .topmoney-col-pos {
        width: 24px;
    }

    main table.table.topmoney-table .topmoney-col-class {
        width: 40px;
    }

    main table.table.topmoney-table .rankings-class-image {
        width: 32px !important;
        height: 32px !important;
    }

    main table.table.topmoney-table .topmoney-gp {
        font-size: 0.72rem;
        padding: 2px 6px;
    }

    main table.table.topmoney-table .topmoney-wc {
        padding-right: 6px;
    }

    main table.table.topmoney-table .topmoney-col-name {
        overflow-wrap: anywhere;
    }

    .topmoney-page-header {
        padding: 0.8rem 1rem;
    }

    .topmoney-privacy {
        padding: 1.1rem 1rem;
    }

    .topmoney-privacy .btn-more {
        width: 100%;
    }
}
