/**
 * Trust2 — Trade / Coin page (chart + markets list)
 */

body.frontend-futuristic .fe-trade-page .inner-banner {
    background: linear-gradient(180deg, rgba(6, 11, 20, 0.95), rgba(8, 12, 22, 0.85));
    border-bottom: 1px solid var(--fe-border);
}

body.frontend-futuristic .fe-trade-page .inner-banner-title {
    color: var(--fe-text);
}

body.frontend-futuristic .fe-trade-page .breadcrumb-item,
body.frontend-futuristic .fe-trade-page .breadcrumb-item a {
    color: var(--fe-muted);
}

body.frontend-futuristic .fe-trade-page .breadcrumb-item.active {
    color: var(--fe-text);
}

/* —— TradingView card —— */
body.frontend-futuristic .fe-tv-section {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

body.frontend-futuristic .fe-tv-card {
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--color-primary) 40%, transparent),
        rgba(255, 255, 255, 0.06) 45%,
        color-mix(in srgb, #6366f1 25%, transparent)
    );
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

body.frontend-futuristic .fe-tv-card__inner {
    border-radius: 17px;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(14, 20, 35, 0.98), rgba(6, 10, 20, 0.99));
}

body.frontend-futuristic .fe-tv-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fe-border);
    background: rgba(0, 0, 0, 0.25);
}

body.frontend-futuristic .fe-tv-card__symbol {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.frontend-futuristic .fe-tv-card__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--fe-border);
}

body.frontend-futuristic .fe-tv-card__icon img {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain;
    display: block;
}

body.frontend-futuristic .fe-tv-card__meta {
    min-width: 0;
}

body.frontend-futuristic .fe-tv-card__meta h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fe-text);
    line-height: 1.2;
}

body.frontend-futuristic .fe-tv-card__exchange {
    font-size: 0.72rem;
    color: var(--fe-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.frontend-futuristic .fe-tv-card__live {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

body.frontend-futuristic .fe-tv-card__price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--fe-text);
    font-variant-numeric: tabular-nums;
}

body.frontend-futuristic .fe-tv-card__change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

body.frontend-futuristic .fe-tv-card__change.positive {
    color: #2ebd85;
    background: rgba(46, 189, 133, 0.12);
}

body.frontend-futuristic .fe-tv-card__change.negative {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.12);
}

body.frontend-futuristic .fe-tv-intervals {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--fe-border);
    flex-shrink: 0;
}

body.frontend-futuristic .fe-tv-intervals button {
    border: none;
    background: transparent;
    color: var(--fe-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

body.frontend-futuristic .fe-tv-intervals button:hover {
    color: var(--fe-text);
}

body.frontend-futuristic .fe-tv-intervals button.is-active {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 15%, transparent);
}

body.frontend-futuristic .fe-tv-chart-wrap {
    position: relative;
    min-height: 300px;
    background: #0a0f18;
}

body.frontend-futuristic .fe-tv-chart-wrap #tradingview-chart {
    width: 100%;
    height: 500px;
    min-height: 300px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

body.frontend-futuristic .fe-tv-chart-wrap.is-ready #tradingview-chart {
    opacity: 1;
}

body.frontend-futuristic .fe-tv-chart-skeleton {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #0a0f18;
    z-index: 2;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.frontend-futuristic .fe-tv-chart-wrap.is-ready .fe-tv-chart-skeleton {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.frontend-futuristic .fe-tv-chart-skeleton__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--fe-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: feTvSpin 0.8s linear infinite;
}

body.frontend-futuristic .fe-tv-chart-skeleton span {
    font-size: 0.8rem;
    color: var(--fe-muted);
}

/* —— Markets tabs on trade page —— */
body.frontend-futuristic .fe-trade-markets.fe-markets-section {
    overflow: visible;
}

body.frontend-futuristic .fe-trade-markets {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

body.frontend-futuristic .fe-trade-markets__head h2 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    color: var(--fe-text);
    margin-bottom: 1.25rem;
}

body.frontend-futuristic .fe-trade-markets__tabs-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 4px 10px;
    margin-bottom: 1rem;
}

body.frontend-futuristic .fe-trade-markets__tabs-scroll::-webkit-scrollbar {
    display: none;
}

body.frontend-futuristic .fe-trade-markets .fe-trade-markets__tabs.nav-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    border: none;
    gap: 10px;
    margin-bottom: 0 !important;
    padding: 0;
    overflow: visible;
}

body.frontend-futuristic .fe-trade-markets .fe-trade-markets__tabs .nav-item {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

body.frontend-futuristic .fe-trade-markets .fe-trade-markets__tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: 1px solid var(--fe-border);
    border-radius: 999px;
    color: var(--fe-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 20px;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

body.frontend-futuristic .fe-trade-markets .fe-trade-markets__tabs .nav-link.active {
    color: var(--color-primary);
    border-color: color-mix(in srgb, var(--color-primary) 50%, var(--fe-border));
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

body.frontend-futuristic .fe-trade-markets .fe-markets-table-wrap {
    margin-top: 0;
}

body.frontend-futuristic .fe-trade-markets .table-container.fe-markets-table {
    background: linear-gradient(165deg, rgba(14, 20, 35, 0.98), rgba(6, 10, 20, 0.99));
    border-radius: 17px;
}

body.frontend-futuristic .fe-trade-markets .fe-markets-table__grid th,
body.frontend-futuristic .fe-trade-markets .fe-markets-table__grid td {
    color: var(--fe-text) !important;
}

body.frontend-futuristic .fe-trade-markets .pagination {
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: var(--fe-border);
    --bs-pagination-color: var(--fe-muted);
    --bs-pagination-hover-color: var(--color-primary);
    --bs-pagination-active-bg: color-mix(in srgb, var(--color-primary) 20%, transparent);
    --bs-pagination-active-border-color: var(--color-primary);
}

@media (min-width: 992px) {
    body.frontend-futuristic .fe-tv-chart-wrap #tradingview-chart {
        height: 520px;
    }
}

@media (max-width: 767px) {
    body.frontend-futuristic .fe-tv-section {
        padding-top: 1rem;
    }

    body.frontend-futuristic .fe-tv-card__header {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    body.frontend-futuristic .fe-tv-intervals {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.frontend-futuristic .fe-tv-chart-wrap {
        min-height: 280px;
    }

    body.frontend-futuristic .fe-tv-chart-wrap #tradingview-chart {
        height: 300px;
    }
}

@keyframes feTvSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    body.frontend-futuristic .fe-tv-chart-skeleton__spinner {
        animation: none;
    }
}
