.row.sm-gutters {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-bottom: 15px;
}

.row.sm-gutters>[class*="col-md-"] {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.col-md-6 {
    display: flex;
    flex-direction: column;
}

.col-md-6 .main-chart {
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.col-md-6 .market-trade {
    flex: 1;
    margin-top: 25px !important;
    position: relative;
    z-index: 5;
    clear: both;
}

#tradingview_chart {
    width: 100%;
    height: 480px;
    position: relative;
}

.market-pairs .tab-content,
.market-pairs [role="tabpanel"],
.market-pairs .table-responsive,
#order-book-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

#order-book-container {
    width: 100%;
}

#order-book-container>.table {
    width: 100%;
    table-layout: fixed;
    margin-bottom: 0;
}

#order-book-container th,
#order-book-container td {
    padding: 7px 5px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 33.333%;
}

#ob-asks,
#ob-bids {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 220px;
    scrollbar-width: thin;
}

#ob-asks tr,
#ob-bids tr,
#order-book-container thead tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.price-up {
    color: #0ecb81 !important;
    background-color: rgba(14, 203, 129, 0.15);
    transition: background-color 0.3s ease;
}

.price-down {
    color: #f6465d !important;
    background-color: rgba(246, 70, 93, 0.15);
    transition: background-color 0.3s ease;
}

.green {
    color: #0ecb81;
}

.red {
    color: #f6465d;
}

.currency-row {
    cursor: pointer;
    transition: background-color .15s ease;
}

.currency-row:hover,
.currency-row.active {
    background: rgba(255, 255, 255, .08);
}

.currency-row.active td:first-child {
    font-weight: 600;
}

.ob-loading {
    text-align: center;
    padding: 20px 0;
    opacity: .7;
}

.market-trade-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 5px !important;
    padding: 0 !important;
    margin: 10px 0 !important;
    list-style: none !important;
}

.market-trade-list li {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.market-trade-list li a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 6px 2px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.market-trade-list li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 767px) {
    .row.sm-gutters>[class*="col-md-"] {
        display: block;
    }
    #ob-asks,
    #ob-bids {
        max-height: 160px;
    }
    #tradingview_chart {
        min-height: 350px;
        height: 350px;
    }
    .col-md-6 .market-trade {
        margin-top: 20px !important;
    }
    .market-trade-buy,
    .market-trade-sell {
        width: 100%;
    }
}