body { font-family: Arial, Helvetica, sans-serif; }
.rankings-table { border-collapse: collapse; width: 100%; }
.rankings-table th, .rankings-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
.rankings-table th { background: #f2f2f2; }
#table-container { overflow-x: auto; }
#main {
    background-color: rgba(255, 255, 255, var(--bg-alpha));
}

#rankings {
    width: min(1200px, 88%);
    margin: 0 auto;
    box-sizing: border-box;
}

.rankings-table .highlight { background: rgba(165, 204, 212, var(--bg-alpha)); font-weight: 600; }
.rankings-table th.highlight { background: rgba(165, 204, 212, 1); }

/* Alternating rows */
.rankings-table tbody tr:nth-child(even) { background: #faf8f5; }
.rankings-table tbody tr:nth-child(odd) { background: #fff; }

/* Row hover */
.rankings-table tbody tr:hover { background: rgba(165, 204, 212, 0.18); }

/* Sortable column headers */
.rankings-table th.sortable {
    cursor: pointer;
    user-select: none;
    min-height: 44px;
    padding: 10px 8px;
    white-space: nowrap;
}

.rankings-table th.sortable:hover { background: rgba(165, 204, 212, 0.5); }

.sort-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.75em;
    vertical-align: middle;
}

/* Skeleton loading rows */
.skeleton-row td {
    padding: 12px 8px;
    border: 1px solid #ddd;
}

.skeleton-bar {
    height: 16px;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Table caption for accessibility */
.rankings-table caption {
    caption-side: top;
    text-align: left;
    font-size: 0.8rem;
    color: var(--color-text-light);
    padding: 4px 0 8px;
}

/* Responsive table pattern */
.responsive-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.responsive-table-wrap .rankings-table th:first-child,
.responsive-table-wrap .rankings-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: inherit;
}

.live-info-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: rgba(165, 204, 212, 0.15);
    border: 1px solid rgba(165, 204, 212, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.live-info-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Override the global `#main p { width: min(50%, 1140px) }` measure rule from
 * general.css — inside this banner the paragraph must fill its container,
 * otherwise it renders at half width and wraps against the dismiss button. */
#main .live-info-content p,
.live-info-content p {
    margin: 0;
    width: 100%;
    max-width: none;
    text-align: left;
    color: var(--color-text-light);
}

.live-info-content {
    flex: 1 1 auto;
    min-width: 0;
}

.live-info-dismiss {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.live-info-dismiss:hover {
    color: var(--color-text);
}

.flag-icon {
    color: #e6a817;
    font-size: 1.1em;
    cursor: help;
}

/* Make select controls match the country selector / calculation form style */
.control-select,
#year-select,
#order-select {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 10px 12px;
    border-radius: 8px;
    transition: box-shadow 120ms ease, transform 80ms ease;
    position: relative;
    z-index: 1160;
}
.control-select:hover, .control-select:focus,
#year-select:hover, #year-select:focus,
#order-select:hover, #order-select:focus {
    box-shadow: 0 6px 18px rgba(16,32,42,0.06);
    outline: none;
}

