/* Trading Screen Plugin CSS - Version 2.5 */
.ts-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #0A0E11;
    color: #FFFFFF;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ts-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
}

.ts-buttons {
    display: flex;
    gap: 10px;
}

.ts-button {
    padding: 6px 12px; /* Reduced padding for smaller button */
    border: none;
    border-radius: 4px;
    font-size: 12px; /* Smaller font size */
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ts-button:hover {
    transform: scale(1.03); /* Reduced scale for subtle hover */
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.ts-refresh-button {
    background: #00D4FF;
}

.ts-csv-button {
    background: #005B99;
}

.ts-whatsapp-button {
    background: #25D366;
}

.ts-loading-spinner {
    width: 14px;
    height: 14px;
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ts-button.loading .ts-loading-spinner {
    display: inline-block;
}

.ts-button.loading .ts-button-text {
    display: none;
}

#ts-last-updated {
    font-size: 12px;
    color: #A0A0A0;
    margin-bottom: 12px;
}

.ts-error-notice {
    display: none;
    background: #FF4D4D;
    color: #FFFFFF;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 12px;
}

.ts-table-container {
    background: #12171A;
    border-radius: 6px;
    overflow-x: auto;
}

.ts-table {
    width: 100%;
    border-collapse: collapse;
    color: #FFFFFF;
}

.ts-table th,
.ts-table td {
    padding: 8px 10px;
    font-size: 12px;
}

.ts-table th {
    background: #1C2526;
    color: #00D4FF;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
}

.ts-table th[data-sort]:hover {
    background: #2A3436;
}

.ts-table th[data-sort]::after {
    content: ' ↕';
    font-size: 9px;
}

.ts-table th.sorted-asc::after {
    content: ' ↑';
}

.ts-table th.sorted-desc::after {
    content: ' ↓';
}

.ts-table td {
    border-bottom: 1px solid #1C2526;
}

.ts-row-odd {
    background: #12171A;
}

.ts-row-even {
    background: #161C20;
}

.ts-numeric {
    text-align: right;
    font-family: 'Roboto Mono', monospace;
}

.ts-price {
    transition: background-color 0.5s ease;
}

.ts-price-flash-positive {
    animation: flash-positive 0.5s ease;
}

.ts-price-flash-negative {
    animation: flash-negative 0.5s ease;
}

@keyframes flash-positive {
    0% { background-color: rgba(0, 255, 0, 0.3); }
    100% { background-color: transparent; }
}

@keyframes flash-negative {
    0% { background-color: rgba(255, 0, 0, 0.3); }
    100% { background-color: transparent; }
}

.ts-positive {
    color: #00FF00;
}

.ts-negative {
    color: #FF0000;
}

.ts-neutral {
    color: #808080;
}

.ts-tooltip {
    position: relative;
}

.ts-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1C2526;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
}

@media (max-width: 768px) {
    .ts-container {
        padding: 12px;
    }

    .ts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ts-buttons {
        flex-wrap: wrap;
    }

    .ts-table th,
    .ts-table td {
        font-size: 11px;
        padding: 6px 8px;
    }
}