/* TradingView: full-width embed; trading-embed-lazy.js sets px width on the iframe. */

#trading-embed-root.trading-embed {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
}

#trading-embed-root.trading-embed--loading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 26rem;
    padding: 2.5rem 1.5rem;
    overflow: hidden;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#trading-embed-root.trading-embed--loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 50% at 50% 0%,
        color-mix(in srgb, var(--primary, #f37927) 22%, transparent) 0%,
        transparent 70%
    );
    pointer-events: none;
    opacity: 0.7;
}

#trading-embed-root.trading-embed--loading .trading-embed-loading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    text-align: center;
    gap: 0.75rem;
}

#trading-embed-root.trading-embed--loading .trading-embed-loading__ring {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary, #f37927);
    border-radius: 50%;
    animation: trading-embed-spin 0.85s linear infinite;
    will-change: transform;
}

#trading-embed-root.trading-embed--loading h4.trading-embed-loading__title {
    margin: 0;
    font-size: 1.125rem !important; /* 18px at 16px root; balanced vs page headings */
    font-weight: 600 !important;
    color: #fff !important;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

#trading-embed-root.trading-embed--loading p.trading-embed-loading__text {
    margin: 0;
    font-size: 0.875rem !important; /* 14px */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55) !important;
}

@keyframes trading-embed-spin {
    to {
        transform: rotate(360deg);
    }
}

.trading-embed-outer {
    width: 100% !important;
    max-width: 100% !important;
}

.trading-embed .tradingview-widget-container,
.trading-embed .tradingview-widget-container__widget {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#trading-embed-root.trading-embed iframe,
.trading-embed iframe {
    display: block;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border: 0;
}

.trading-embed .tradingview-widget-copyright {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #trading-embed-root.trading-embed--loading .trading-embed-loading__ring {
        animation: none !important;
    }
}
