
.forex-page {
    width: 100%;
    min-width: 0;
    --fx-card: var(--bs-tertiary-bg, rgba(127,127,127,.055));
    --fx-border: var(--bs-border-color, rgba(127,127,127,.18));
    --fx-muted: var(--bs-secondary-color, #7c8795);
    color: var(--bs-body-color, inherit);
}

.forex-primary-section,
.forex-primary-grid {
    width: 100%;
    max-width: none;
    min-width: 0;

}

.forex-primary-grid {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: block;
    min-height: 78px;
}

.forex-card-layer {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 13px;
    width: 100%;
    min-width: 0;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    transition: transform 1500ms cubic-bezier(.18, .72, .22, 1), opacity 1500ms ease;
}

    .forex-card-layer.is-active {
        position: relative;
        inset: auto;
        opacity: 1;
        transform: translate3d(0, 0, 0);
        z-index: 1;
    }

.forex-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 78px;
    padding: 10px 14px;
    border: 1px solid var(--fx-border);
    border-radius: 13px;
    background: var(--fx-card);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(20,25,35,.035);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    transition: border-color .2s ease;
}

    .forex-card:hover {
        border-color: rgba(155,135,245,.55);
    }

.forex-card-line-one,
.forex-card-line-two {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.forex-symbol {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.forex-trend {
    width: 25px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forex-price {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    font-weight: 750;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}

.forex-change {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: .74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.forex-positive {
    color: #169b68;
}

.forex-negative {
    color: #d45b64;
}

.forex-neutral {
    color: var(--fx-muted);
}

.forex-loading-card {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fx-border);
    border-radius: 13px;
    background: var(--fx-card);
}

.forex-loader {
    width: 17px;
    height: 17px;
    border: 2px solid var(--fx-border);
    border-top-color: #9b87f5;
    border-radius: 50%;
    animation: fxSpin .8s linear infinite;
}

@keyframes fxSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991.98px) {
    .forex-primary-grid {
        min-height: 169px;
    }

    .forex-card-layer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .forex-card {
        height: 79px;
    }

    .forex-price {
        font-size: 1.08rem;
    }
}

@media (max-width: 575.98px) {
    .forex-primary-grid {
        min-height: 165px;
    }

    .forex-card-layer {
        gap: 9px;
    }

    .forex-card {
        height: 78px;
        padding: 9px 10px;
        gap: 6px;
    }

    .forex-symbol {
        font-size: .79rem;
    }

    .forex-price {
        font-size: .98rem;
    }

    .forex-change {
        font-size: .68rem;
    }

    .forex-trend {
        width: 22px;
        height: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forex-card-layer {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .forex-card {
        transition: none;
    }
    /* Reduce the space between Forex cards and the Crypto ticker by 50% */
    #forexMarket + #cryptoLoading {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

        #forexMarket + #cryptoLoading.d-none {
            display: none !important;
        }
}
