/* ============================================================
   ranking.css — Pickle Pro Tour
   Sistema de diseño: Mabry Pro · navy #0b0c4c · celeste #6ed4ff
   ============================================================ */

/* ── CONTENEDOR ─────────────────────────────────────────── */
.rk-page {
    padding: 0 0 60px;
    position: relative;
}

.rk-page::before {
    pointer-events: none !important;
    z-index: 0 !important;
}

/* ── CABECERA ────────────────────────────────────────────── */
.rk-header {
    padding: 40px 0 0;
    text-align: left;
}

.rk-section-label {
    display: block;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #6ed4ff;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.rk-title {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #0b0c4c;
    margin: 0 0 24px;
    letter-spacing: -1px;
}

/* ── BUSCADOR ────────────────────────────────────────────── */
.rk-search-wrap {
    position: relative;
    max-width: 380px;
    margin: 0 auto;
    margin-bottom: 20px;
}

.rk-search-input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border-radius: 50px;
    border: 1.5px solid #D0D7E3;
    background: #fff;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    color: #0b0c4c;
    outline: none;
    transition: border-color 0.2s ease;
}

.rk-search-input::placeholder {
    color: #9BA8C0;
    font-size: 13px;
}

.rk-search-input:focus {
    border-color: #6ed4ff;
}

.rk-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9BA8C0;
    pointer-events: none;
}

.rk-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D0D7E3;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.rk-search-clear.visible {
    display: flex;
}

/* ── FILTROS ─────────────────────────────────────────────── */
.rk-filters {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 5;
    align-items: center;
}

.rk-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rk-pill {
    padding: 9px 20px;
    border-radius: 50px;
    border: 1.5px solid #D0D7E3;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    color: #6B7A99;
    background: #fff;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 5;
}

.rk-pill:hover {
    border-color: #0b0c4c;
    color: #0b0c4c;
}

.rk-pill.active {
    background: #0b0c4c;
    border-color: #0b0c4c;
    color: #fff;
}

/* ── DIVISOR ─────────────────────────────────────────────── */
.rk-divider {
    height: 1px;
    background: #E8ECF4;
    margin: 24px 0 0;
}

/* ── SPINNER ─────────────────────────────────────────────── */
.rk-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.rk-spin {
    width: 32px;
    height: 32px;
    border: 3px solid #E8ECF4;
    border-top-color: #6ed4ff;
    border-radius: 50%;
    animation: rk-spin .7s linear infinite;
}

@keyframes rk-spin {
    to { transform: rotate(360deg); }
}

/* ── SUB-LABEL ───────────────────────────────────────────── */
.rk-sub-label {
    display: block;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #9BA8C0;
    text-transform: uppercase;
    padding: 24px 0 14px;
}

/* ── PODIO ───────────────────────────────────────────────── */
.rk-podium-wrap {
    padding: 32px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.rk-pod {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 150px;
    text-decoration: none;
    color: inherit;
}

.pod-1 { max-width: 180px; }

.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }

.rk-av-wrap {
    position: relative;
    margin-bottom: 10px;
}

.rk-av {
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #6ed4ff;
    background: #0b0c4c;
    border: 3px solid #D0D7E3;
    position: relative;
    transition: border-color 0.2s ease;
}

.rk-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.av-1 { width: 90px; height: 90px; font-size: 22px; border-color: #6ed4ff; }
.av-2 { width: 72px; height: 72px; font-size: 17px; }
.av-3 { width: 68px; height: 68px; font-size: 16px; }

a.rk-pod:hover .rk-av { border-color: #6ed4ff; }

.rk-badge {
    position: absolute;
    bottom: -9px;
    right: -9px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.b1 { background: #6ed4ff; color: #0b0c4c; }
.b2 { background: #8A9BBF; color: #fff; }
.b3 { background: #C47F5A; color: #fff; }

.pod-name {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #0b0c4c;
    line-height: 1.25;
    transition: color 0.2s;
}

a.rk-pod:hover .pod-name { color: #236af8; }

.pod-pts {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0b0c4c;
    margin-top: 3px;
}

.pod-pts-sm { font-size: 14px; }

.pod-flag {
    margin-top: 3px;
    height: 14px;
    display: flex;
    align-items: center;
}

.flag-img {
    height: 14px;
    width: auto;
    display: inline-block;
}

.rk-plat {
    width: 100%;
    margin-top: 12px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.plat-1 { height: 52px; background: #6ed4ff; color: #0b0c4c; }
.plat-2 { height: 38px; background: #0b0c4c; color: #fff; }
.plat-3 { height: 28px; background: #EEF1F8; color: #6B7A99; }

/* ── TARJETAS 4-10 ───────────────────────────────────────── */
.rk-top10-wrap {
    padding: 0;
    position: relative;
    z-index: 2;
}

.rk-cards {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

a.rk-card {
    background: #F4F7FD;
    border-radius: 12px;
    padding: 14px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 5;
}

a.rk-card:hover {
    border-color: #6ed4ff;
    background: #fff;
    box-shadow: 0 4px 16px rgba(110, 212, 255, 0.15);
    transform: translateY(-2px);
}

.rc-pos {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #9BA8C0;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.rc-av {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0b0c4c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #6ed4ff;
    margin-bottom: 8px;
    overflow: hidden;
    border: 2px solid #D0D7E3;
    transition: border-color 0.2s ease;
}

a.rk-card:hover .rc-av { border-color: #6ed4ff; }

.rc-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.rc-name {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #0b0c4c;
    line-height: 1.3;
}

.rc-pts {
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #236af8;
    margin-top: 4px;
}

/* ── TABLA ───────────────────────────────────────────────── */
.rk-table-wrap {
    padding: 0;
    position: relative;
    z-index: 2;
}

.rk-table {
    width: 100%;
    border-collapse: collapse;
}

.rk-table thead tr {
    border-bottom: 2px solid #EEF1F8;
}

.rk-table th {
    padding: 8px 6px;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9BA8C0;
    text-align: left;
}

.th-pos  { width: 44px; text-align: center; }
.th-flag { width: 32px; }
.th-pts  { text-align: right; width: 110px; }

.rk-table tbody tr {
    border-bottom: 1px solid #F0F4FB;
    transition: background 0.12s;
}

.rk-table tbody tr:hover td {
    background: #F4F7FD;
}

.rk-table tbody tr.rk-hidden {
    display: none;
}

.rk-table td {
    padding: 10px 6px;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    color: #0b0c4c;
}

.td-pos {
    text-align: center;
    color: #BCC5D8;
    font-weight: 700;
    font-size: 11px;
}

.td-flag { font-size: 14px; }

.td-name {
    font-weight: 500;
}

.rk-row-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.rk-row-link:hover span { color: #236af8; }

.rk-row-link:hover .tbl-av-img,
.rk-row-link:hover .tbl-av-ini { border-color: #6ed4ff; }

.tbl-av-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid #D0D7E3;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.tbl-av-ini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0b0c4c;
    color: #6ed4ff;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #D0D7E3;
    transition: border-color 0.2s ease;
}

.td-pts { text-align: right; }

.pts-badge {
    background: rgba(110, 212, 255, 0.12);
    color: #236af8;
    padding: 3px 12px;
    border-radius: 50px;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Fila "sin resultados" del buscador */
.rk-no-results {
    display: none;
    text-align: center;
    padding: 32px 0;
    color: #9BA8C0;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
}

/* ── PAGINACIÓN ──────────────────────────────────────────── */
.rk-pag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 0 8px;
    position: relative;
    z-index: 5;
}

.pag-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #E5E9F0;
    background: #fff;
    color: #0b0c4c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.pag-btn:hover:not(:disabled) {
    background: #0b0c4c;
    border-color: #0b0c4c;
    color: #fff;
}

.pag-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.pag-num {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #E5E9F0;
    background: #fff;
    color: #0b0c4c;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
    z-index: 5;
}

.pag-num:hover {
    border-color: #0b0c4c;
    background: #F4F7FD;
}

.pag-num.active {
    background: #0b0c4c;
    border-color: #0b0c4c;
    color: #6ed4ff;
}

.pag-dots {
    color: #BCC5D8;
    font-size: 13px;
    padding: 0 2px;
    line-height: 36px;
}

/* ── VACÍO ───────────────────────────────────────────────── */
.rk-empty {
    text-align: center;
    padding: 60px 0;
    color: #9BA8C0;
    font-family: var(--font-primary, 'Mabry Pro'), sans-serif;
    font-size: 14px;
    font-weight: 600;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .rk-cards { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
    .rk-title { font-size: 32px; }
    .rk-search-wrap { max-width: 100%; }
    .rk-podium-wrap { gap: 10px; }
    .pod-1 { max-width: 130px; }
    .rk-pod { max-width: 110px; }
    .rk-cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .rk-pill { padding: 8px 14px; font-size: 12px; }
}
