/* FIFA Rank Plugin - Frontend Styles */

.fifar-container {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.fifar-header {
    margin-bottom: 10px;
}

.fifar-title {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #1a1a2e;
}

.fifar-error {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

/* Filter Tabs (Segmented Control) */
.fifar-container .fifar-filter {
    display: inline-flex !important;
    background: #f0f0f1 !important;
    border-radius: 12px !important;
    padding: 2px !important;
    margin-bottom: 25px !important;
    border: 1px solid #e2e4e7 !important;
    position: relative !important;
    gap: 0 !important;
}

.fifar-container .fifar-filter-option {
    position: relative !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #50575e !important;
    padding: 10px 24px !important;
    border-radius: 10px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    z-index: 1 !important;
    margin: 0 !important;
}

.fifar-container .fifar-filter-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
}

.fifar-container .fifar-filter-option:hover {
    color: #1a1a2e !important;
}

/* Active Tab State */
.fifar-container .fifar-filter-option.active {
    background: #ffffff !important;
    color: #1a1a2e !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

[dir="rtl"] .fifar-container .fifar-filter {
    flex-direction: row !important;
}

/* Table */
.fifar-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.fifar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: #fff;
}

.fifar-table thead {
    background: #1a1a2e;
    color: #fff;
}

.fifar-table thead th {
    padding: 16px 12px !important;
    text-align: inherit !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    white-space: nowrap !important;
    border: none !important;
}

/* RTL Support */
[dir="rtl"] .fifar-table thead th,
[dir="rtl"] .fifar-table tbody td {
    text-align: right;
}

.fifar-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.fifar-table tbody tr:hover {
    background-color: #f8f9fa;
}

.fifar-table tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

.fifar-table tbody tr:nth-child(odd):hover {
    background-color: #f0f0f0;
}

/* Preferred team highlight */
.fifar-table tbody tr.fifar-preferred {
    background-color: #fff8e1 !important;
}

.fifar-table tbody tr.fifar-preferred:hover {
    background-color: #ffecb3 !important;
}

/* Filtered odd/even overrides */
.fifar-table tbody tr.fifar-odd.fifar-preferred {
    background-color: #fff0c2 !important;
}

.fifar-table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
}

.fifar-col-rank {
    width: 50px !important;
    font-weight: 700 !important;
    color: #50575e !important;
    text-align: center !important;
    font-size: 15px !important;
    padding: 10px 4px !important;
}

.fifar-col-flag {
    width: 45px;
    text-align: center !important;
}

.fifar-col-flag img {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.fifar-col-team {
    font-weight: 500;
}

.fifar-col-points {
    width: 60px;
    text-align: center !important;
    color: #555;
    font-weight: 600;
}

.fifar-col-status {
    width: 60px;
    text-align: center !important;
}

/* Movement indicators */
.fifar-movement {
    font-size: 0.8em;
    font-weight: 700;
    display: inline-block;
    min-width: 35px;
    text-align: center;
}

.fifar-up {
    color: #28a745;
}

.fifar-down {
    color: #dc3545;
}

.fifar-same {
    color: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .fifar-table {
        font-size: 0.82em;
    }

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

    .fifar-col-points {
        display: none;
    }

    .fifar-col-flag img {
        width: 24px;
    }
}
