/* Apply this to any element (div, span, h1, etc.) */
.is-loading {
    background-color: #e2e5e7 !important;
    background-image: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0) 100%
    ) !important;
    background-size: 200% 100% !important;
    animation: skeleton-shimmer 1.5s infinite !important;
    
    /* These three lines are the "magic" */
    color: transparent !important;       /* Hides existing text */
    border-color: transparent !important; /* Hides borders */
    user-select: none;                   /* Prevents highlighting */
    pointer-events: none;                /* Prevents clicking */
    
    /* Ensure it has a size even if it's empty */
    min-height: 1em; 
    border-radius: 4px;
}

/* Apply this to any element (div, span, h1, etc.) */
.is-loading {
    background-color: #e2e5e7 !important;
    background-image: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0) 100%
    ) !important;
    background-size: 200% 100% !important;
    animation: skeleton-shimmer 1.5s infinite !important;
    
    /* These three lines are the "magic" */
    color: transparent !important;       /* Hides existing text */
    border-color: transparent !important; /* Hides borders */
    user-select: none;                   /* Prevents highlighting */
    pointer-events: none;                /* Prevents clicking */
    
    /* Hide child elements like canvas (TradingView chart) */
    overflow: hidden !important;
    position: relative !important;
    
    /* Ensure it has a size even if it's empty */
    min-height: 1em; 
    border-radius: 4px;
}

/* Hide all children inside loading elements */
.is-loading > * {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Specifically target canvas elements (TradingView charts) */
.is-loading canvas,
.is-loading iframe,
.is-loading .tv-lightweight-charts {
    display: none !important;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}