/**
 * Cryptoria Top 100 Table
 * Cryptoria brand: gold #d4af37, orange #f5931e, dark #26272a, white #fff
 *
 * @package Cryptoria_Top_100
 */

.cryptoria-t100-wrapper {
    --t100-bg: #26272a;
    --t100-bg-hover: #2d2e32;
    --t100-text: #ffffff;
    --t100-text-muted: #c7c7c7;
    --t100-gold: #d4af37;
    --t100-orange: #f5931e;
    --t100-up: #22c55e;
    --t100-down: #ef4444;
    --t100-border: rgba(212, 175, 55, 0.2);
    --t100-font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --t100-radius: 8px;
    --t100-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

    font-family: var(--t100-font);
    background: var(--t100-bg);
    border-radius: var(--t100-radius);
    border: 2px solid var(--t100-gold);
    box-shadow: var(--t100-shadow);
    overflow: hidden;
    margin: 1.5rem 0;
}

.cryptoria-t100-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cryptoria-t100-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cryptoria-t100-table thead {
    background: rgba(0, 0, 0, 0.2);
}

.cryptoria-t100-wrapper .cryptoria-t100-table thead th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    color: #f5931e !important;
    border-bottom: 2px solid var(--t100-border);
    white-space: nowrap;
}

.cryptoria-t100-table td {
    padding: 22px 24px;
    border-bottom: 1px solid var(--t100-border);
    color: var(--t100-text);
}

.cryptoria-t100-table tbody tr:hover {
    background: var(--t100-bg-hover);
}

.cryptoria-t100-wrapper .cryptoria-t100-table th:nth-child(6),
.cryptoria-t100-wrapper .cryptoria-t100-table th:nth-child(7),
.cryptoria-t100-wrapper .cryptoria-t100-table td:nth-child(6),
.cryptoria-t100-wrapper .cryptoria-t100-table td:nth-child(7) {
    text-align: center;
}

.cryptoria-t100-coin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--t100-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cryptoria-t100-coin-link:hover {
    color: var(--t100-gold);
}

.cryptoria-t100-coin-link:focus-visible {
    outline: 2px solid var(--t100-orange);
    outline-offset: 2px;
}

.cryptoria-t100-coin-link img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
}

.cryptoria-t100-coin-name {
    font-weight: 600;
}

.cryptoria-t100-coin-symbol {
    color: var(--t100-text-muted);
    font-size: 0.85em;
}

.cryptoria-t100-wrapper .cryptoria-t100-table td.cryptoria-t100-up {
    color: var(--t100-up) !important;
    font-weight: 600;
}

.cryptoria-t100-wrapper .cryptoria-t100-table td.cryptoria-t100-down {
    color: var(--t100-down) !important;
    font-weight: 600;
}

.cryptoria-t100-sparkline-cell {
    min-width: 100px;
}

.cryptoria-t100-sparkline {
    display: block;
    width: 100px;
    height: 28px;
}

.cryptoria-t100-sparkline-empty {
    color: var(--t100-text-muted);
}

.cryptoria-t100-pagination {
    padding: 16px;
    border-top: 1px solid var(--t100-border);
}

.cryptoria-t100-pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cryptoria-t100-pagination-list li {
    list-style: none !important;
}

.cryptoria-t100-pagination-list li::before,
.cryptoria-t100-pagination-list li::after {
    content: none !important;
    display: none !important;
}

.cryptoria-t100-pagination-list li::marker {
    content: none !important;
    display: none !important;
}

.cryptoria-t100-pagination-list li a::before,
.cryptoria-t100-pagination-list li a::after,
.cryptoria-t100-pagination-list li span::before,
.cryptoria-t100-pagination-list li span::after {
    content: none !important;
    display: none !important;
}

.cryptoria-t100-pagination-list li a,
.cryptoria-t100-pagination-list li span {
    display: inline-block;
    padding: 8px 14px;
    color: var(--t100-gold);
    text-decoration: none;
    border: 1px solid var(--t100-border);
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cryptoria-t100-pagination-list li a:hover {
    background: var(--t100-gold);
    color: var(--t100-bg);
    border-color: var(--t100-gold);
}

.cryptoria-t100-pagination-list li a:focus-visible {
    outline: 2px solid var(--t100-orange);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cryptoria-t100-coin-link,
    .cryptoria-t100-pagination-list li a,
    .cryptoria-t100-pagination-list li span {
        transition: none;
    }
}

.cryptoria-t100-pagination-current {
    background: var(--t100-orange);
    color: var(--t100-bg) !important;
    border-color: var(--t100-orange) !important;
}

.cryptoria-t100-message {
    padding: 24px;
    text-align: center;
    color: var(--t100-text-muted);
}

.cryptoria-t100-error {
    color: var(--t100-down);
}

/* Responsive: hide some columns on smaller screens, use data-label */
@media (max-width: 992px) {
    .cryptoria-t100-table th:nth-child(n+6),
    .cryptoria-t100-table td:nth-child(n+6) {
        display: none;
    }
}

/* Mobile: sticky # + Име, horizontal scroll for rest */
@media (max-width: 768px) {
    .cryptoria-t100-table {
        min-width: 949px;
        table-layout: fixed;
    }

    .cryptoria-t100-table thead th,
    .cryptoria-t100-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .cryptoria-t100-wrapper .cryptoria-t100-table thead th {
        white-space: normal;
        line-height: 1.2;
        vertical-align: top;
    }

    .cryptoria-t100-table thead th:nth-child(3),
    .cryptoria-t100-table td:nth-child(3) { min-width: 95px; width: 95px; }
    .cryptoria-t100-table thead th:nth-child(4),
    .cryptoria-t100-table td:nth-child(4) { min-width: 100px; width: 100px; }
    .cryptoria-t100-table thead th:nth-child(5),
    .cryptoria-t100-table td:nth-child(5) { min-width: 100px; width: 100px; }
    .cryptoria-t100-table thead th:nth-child(6),
    .cryptoria-t100-table td:nth-child(6) { min-width: 155px; width: 155px; }
    .cryptoria-t100-table thead th:nth-child(7),
    .cryptoria-t100-table td:nth-child(7) { min-width: 100px; width: 100px; }
    .cryptoria-t100-table thead th:nth-child(8),
    .cryptoria-t100-table td:nth-child(8) { min-width: 120px; width: 120px; }
    .cryptoria-t100-table thead th:nth-child(9),
    .cryptoria-t100-table td:nth-child(9) { min-width: 85px; width: 85px; }

    .cryptoria-t100-table thead th:nth-child(1),
    .cryptoria-t100-table td:nth-child(1),
    .cryptoria-t100-table thead th:nth-child(2),
    .cryptoria-t100-table td:nth-child(2) {
        position: sticky;
        z-index: 5;
        background-color: #26272a;
        box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
    }

    .cryptoria-t100-table thead th:nth-child(1),
    .cryptoria-t100-table td:nth-child(1) {
        left: 0;
        width: 28px;
        min-width: 28px;
        max-width: 28px;
        padding-left: 6px;
        padding-right: 2px;
    }

    .cryptoria-t100-table thead th:nth-child(2),
    .cryptoria-t100-table td:nth-child(2) {
        padding-left: 6px;
    }

    .cryptoria-t100-table thead th:nth-child(1) {
        background-color: #1a1b1d;
    }

    .cryptoria-t100-table tbody tr:hover td:nth-child(1) {
        background-color: #2d2e32;
    }

    .cryptoria-t100-table thead th:nth-child(2),
    .cryptoria-t100-table td:nth-child(2) {
        left: 28px;
        width: 160px;
        min-width: 160px;
        max-width: 160px;
    }

    .cryptoria-t100-table thead th:nth-child(2) {
        background-color: #1a1b1d;
    }

    .cryptoria-t100-table tbody tr:hover td:nth-child(2) {
        background-color: #2d2e32;
    }

    .cryptoria-t100-table td:nth-child(1) {
        font-weight: 700;
        color: var(--t100-text-muted);
    }

    .cryptoria-t100-table td:nth-child(3) {
        font-weight: 600;
    }

    .cryptoria-t100-coin-link {
        flex-wrap: nowrap;
        min-width: 0;
    }

    .cryptoria-t100-coin-link img {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
    }

    .cryptoria-t100-coin-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cryptoria-t100-table th:nth-child(n+6),
    .cryptoria-t100-table td:nth-child(n+6) {
        display: table-cell !important;
    }

    .cryptoria-t100-table thead th:nth-child(9),
    .cryptoria-t100-table td:nth-child(9) {
        border-left: none;
        border-right: none;
        overflow: hidden;
    }

    .cryptoria-t100-sparkline-cell {
        overflow: hidden;
    }

    .cryptoria-t100-sparkline {
        width: 100%;
        max-width: 100%;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .cryptoria-t100-table thead th,
    .cryptoria-t100-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .cryptoria-t100-table thead th:nth-child(1),
    .cryptoria-t100-table td:nth-child(1) {
        width: 26px;
        min-width: 26px;
        max-width: 26px;
        padding-left: 4px;
        padding-right: 2px;
    }

    .cryptoria-t100-table thead th:nth-child(2),
    .cryptoria-t100-table td:nth-child(2) {
        left: 26px;
        width: 150px;
        min-width: 150px;
        max-width: 150px;
        padding-left: 6px;
    }

    .cryptoria-t100-coin-link img {
        width: 22px;
        height: 22px;
    }

    .cryptoria-t100-pagination-list {
        gap: 4px;
    }

    .cryptoria-t100-pagination-list li a,
    .cryptoria-t100-pagination-list li span {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}
