/* The tape draws a 1px separator between cells across its whole height, so any
   slack around the prices reads as stray vertical lines. Keep the strip tight
   to the content — 64px left ~20px of empty run below the row. */
.tv-ticker-wrapper {
    padding-top: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    height: 38px;
    z-index: 1;
}

/* The tape also keeps a fixed gap above the row; pull it up so the separators
   are not left running through empty space there either. */
.tv-ticker-wrapper .tv-ticker-host {
    margin-top: -10px;
    height: calc(100% + 10px);
}

/* large item strip is taller — fixed 70px clipped the TradingView tape */
.tv-ticker-wrapper[data-tv-item-size="normal"] {
    height: 118px;
}

/* hide-chart removes the sparkline row — shrink the wrapper so the tape does
   not leave an empty band under the prices (host is block-size:100%). */
.tv-ticker-wrapper[data-tv-hide-chart="true"] {
    height: 60px;
}

.tv-ticker-wrapper[data-tv-hide-chart="true"][data-tv-item-size="normal"] {
    height: 60px;
}

.tv-ticker-wrapper[data-tv-theme="dark"] {
    color-scheme: dark;
}

/* Opaque strip only when transparency is off (TradingView palette / page bleed). */
.tv-ticker-wrapper[data-tv-theme="dark"][data-tv-transparent="false"] {
    background: #131722;
}

.tv-ticker-wrapper[data-tv-theme="dark"][data-tv-transparent="true"] {
    background: transparent;
}

.tv-ticker-wrapper[data-tv-theme="light"] {
    color-scheme: light;
}

.tv-ticker-wrapper[data-tv-theme="light"][data-tv-transparent="false"] {
    background: #ffffff;
}

.tv-ticker-wrapper[data-tv-theme="light"][data-tv-transparent="true"] {
    background: transparent;
}

.tv-ticker-wrapper[data-tv-theme="dark"] tv-ticker-tape {
    color-scheme: dark;
}

.tv-ticker-wrapper[data-tv-theme="light"] tv-ticker-tape {
    color-scheme: light;
}

.tv-ticker-host {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    margin-left: 0;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.tv-ticker-wrapper.is-ready .tv-ticker-host {
    opacity: 1;
}

.tv-ticker-placeholder {
    position: absolute;
    inset: 10px 56px 10px 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.tv-ticker-wrapper[data-tv-transparent="true"] .tv-ticker-placeholder {
    background: transparent;
    backdrop-filter: none;
}

/* keep the [data-tv-transparent="true"] rule above winning — only paint the
   light placeholder when transparency is off. */
.tv-ticker-wrapper[data-tv-theme="light"][data-tv-transparent="false"] .tv-ticker-placeholder {
    background: rgba(255, 255, 255, 0.6);
}

.tv-ticker-spinner {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(203, 213, 225, 0.24);
    border-top-color: rgba(226, 232, 240, 0.95);
    animation: tvTickerSpinner 0.8s linear infinite;
}

.tv-ticker-wrapper[data-tv-theme="light"] .tv-ticker-spinner {
    border: 2px solid rgba(15, 23, 42, 0.16);
    border-top-color: rgba(15, 23, 42, 0.75);
}

.tv-ticker-loading-text {
    font-size: 12px;
    line-height: 1;
    color: rgba(226, 232, 240, 0.78);
    letter-spacing: 0.04em;
}

.tv-ticker-wrapper[data-tv-theme="light"] .tv-ticker-loading-text {
    color: rgba(15, 23, 42, 0.65);
}

.tv-ticker-wrapper.is-ready .tv-ticker-placeholder {
    opacity: 0;
    pointer-events: none;
}

@keyframes tvTickerSpinner {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* TradingView stamps its logo into the top-right corner of the tape. The tape
   is a custom element with a closed shadow root, so it cannot be styled from
   here — the corner is painted over with the strip colour instead. */
.tv-ticker-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 26px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
}

.tv-ticker-wrapper[data-tv-theme="dark"][data-tv-transparent="false"]::after {
    background: #131722;
}

.tv-ticker-blocker {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: transparent;
    pointer-events: all;
    cursor: default;
}

.tv-ticker-overlay {
    position: absolute;
    right: -3px;
    bottom: 2px;
    z-index: 999;
    display: flex;
    align-items: center;
    background: #121037;
    border-radius: 50%;
    overflow: hidden;
}

.tv-ticker-overlay img {
    height: 40px;
    width: auto;
    display: block;
}
