/* FRB Ranking WordPress Plugin Styles */

/* Override visited/active link color on ranking dropdown items */
.frb-menu-item a:visited,
.frb-menu-item a:link,
.frb-menu-item a,
.frb-menu-item a:hover {
    color: #1c1c1c !important;
    opacity: 1 !important;
    background: none !important;
}

/* Also override player/ranking content links */
.frb-ranking-wrapper a:visited,
.frb-player-link:visited {
    color: #1a5fa8 !important;
}

.frb-ranking-wrapper a:visited:hover,
.frb-player-link:visited:hover {
    color: #b38600 !important;
}

/* Hide WordPress page title and breadcrumb on pages containing the ranking plugin */
.page:has(.frb-ranking-wrapper) .entry-title,
.page:has(.frb-ranking-wrapper) .af-breadcrumbs-wrapper {
    display: none;
}

.frb-ranking-wrapper {
    max-width: 100%;
}

.frb-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Title */
.frb-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 15px 0 12px;
}

.frb-title i {
    color: #000;
    margin-right: 6px;
}

.frb-meta i {
    color: #000;
    margin-right: 4px;
}

.frb-snapshot-selector label i {
    color: #000;
    margin-right: 3px;
}

.frb-date-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #777;
}

/* Category Navigation */
.frb-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid #e0e4ea;
}

.frb-cat-group {
    min-width: 140px;
}

.frb-cat-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a3a5c;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}

.frb-cat-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.frb-cat-link {
    font-size: 13px;
    color: #555;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.frb-cat-link:hover {
    background: #e8edf3;
    color: #1a3a5c;
}

.frb-cat-link.frb-active {
    background: #1a3a5c;
    color: #fff;
    font-weight: 600;
}

/* Snapshot Selector */
.frb-snapshot-selector {
    margin-bottom: 14px;
}

.frb-snapshot-selector form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.frb-snapshot-selector label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    margin-top: 3px;
    color: #444;
}

.frb-snapshot-selector select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    line-height: 1;
}

/* Tables */
.frb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.frb-table thead th {
    background: #000;
    color: #fff;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ffbf3f;
}

.frb-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}

.frb-table tbody tr:nth-child(even) {
    background: #fff;
}

.frb-table tbody tr:hover {
    background: inherit;
}

.frb-table tbody tr:last-child td {
    border-bottom: none;
}

.frb-center {
    text-align: center;
}

.frb-left {
    text-align: left;
}

/* Player Links */
.frb-player-link {
    color: #1a5fa8;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.frb-player-link:hover {
    color: #b38600;
    border-bottom-color: #b38600;
}

/* Summary Table */
.frb-summary-table {
    width: auto;
    min-width: 280px;
    margin-bottom: 25px;
}

.frb-summary-table tbody td:first-child {
    text-align: left;
}

/* Event Sections */
.frb-event-section {
    margin-bottom: 28px;
}

.frb-event-title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid #ffbf3f;
}

.frb-event-title a,
.frb-event-title a:link,
.frb-event-title a:visited {
    color: #1a5fa8 !important;
    text-decoration: none;
}

.frb-event-title a:hover {
    color: #b38600 !important;
}

/* History Table */
.frb-history-table {
    width: auto;
}

.frb-history-table tbody td:first-child {
    text-align: left;
}

.frb-top-n td:first-child {
    font-weight: 700;
}

.frb-total-row td {
    border-bottom: none !important;
    border-top: 2px solid #000;
    text-align: right;
    padding-top: 10px;
    font-size: 13px;
    color: #000;
    background: transparent !important;
}

/* Tournament Table */
.frb-tournament-table thead th.frb-col-name {
    text-align: center;
}

.frb-tournament-table td:first-child {
    text-align: left;
    white-space: nowrap;
}

/* Meta info */
.frb-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #555;
}

/* Legend */
.frb-legend {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    margin-bottom: 12px;
}

/* Breadcrumb */
.frb-breadcrumb {
    margin-bottom: 12px;
    font-size: 13px;
}

.frb-breadcrumb a {
    color: #1a5fa8;
    text-decoration: none;
}

.frb-breadcrumb a:hover {
    color: #b38600;
}

/* Responsive */
@media (max-width: 768px) {
    .frb-category-nav {
        flex-direction: column;
        gap: 10px;
    }

    .frb-table {
        font-size: 12px;
    }

    .frb-table thead th,
    .frb-table tbody td {
        padding: 6px 8px;
    }

    .frb-event-section,
    .frb-ranking-wrapper {
        overflow-x: auto;
    }

    .frb-meta {
        flex-direction: column;
        gap: 4px;
    }

    .frb-snapshot-selector form {
        flex-wrap: wrap;
    }

    .frb-snapshot-selector select {
        flex: 1;
    }
}
