.trade-header {
    margin-top: .6rem;
    position: relative;
}

.trade-header .trade-header-actions {
    display: flex;
}

.trade-header .trade-header-actions>span {
    padding: 0 7px
}

.trade-header .suggestion {
    position: absolute;
    top: 100%;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    display: none;
    z-index: 9;
}

.trade-header .suggestion ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.trade-header .suggestion ul li {
    padding: .5rem;
    text-transform: uppercase;
    font-size: 14px;
}

.trade-header .suggestion ul li.active,
.trade-header .suggestion ul li:hover {
    color: var(--color-white);
    background: var(--color-highlight);
}

.webpush,
.logout {
    display: flex;
    align-items: center;
    margin-left: 2px;
    cursor: pointer;
    color: var(--text-primary);
}

.webpush:hover,
.webpush:focus,
.logout:hover,
.logout:focus {
    color: var(--text-secondary);
}

.logout svg {
    height: 1.5rem;
    width: 1.5rem;
}

.trade-sessions {
    margin: 1rem .5rem;
}

.trade-session {
    position: relative;
    background: var(--bg-card);
    margin-top: 1rem;
    padding: 2.2rem 1rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
}

.trade-loading,
.trade-prospect,
.trade-new,
.trade-live {
    background: var(--bg-trade-live);
    border: 1px solid var(--border-trade-live);
}

.trade-top {
    display: flex;
}

.trade-top .order-market {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    top: 4px;
    left: 4px;
}

.trade-top .order-market .small-text-box span {
    font-size: 9px;
    cursor: pointer;
}

.trade-top .last_updated_time {
    font-size: 12px;
    margin-left: 4px;
}

.trade-top>.close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.trade-prospect .close {
    display: block;
}

.trade-top>.close-position {
    position: absolute;
    top: 4px;
    right: 4px;
    display: none;
    cursor: pointer;
}

.trade-top>.close-position span {
    font-size: 9px;
}

.trade-live .close-position {
    display: block;
}

.trade-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    margin-right: 1.5rem;
}

.trade-session:not(.trade-completed) .trade-details {
    justify-content: space-evenly;
}

.trade-details .pnl-notional {
    font-size: .7rem;
    color: var(--text-secondary);
}

.trade-top .symbol-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.trade-top>.symbol-info {
    margin-right: 1rem;
}

.trade-top .symbol-info a {
    text-align: center;
}

.trade-top .symbol-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--text-primary);
    margin: auto;
}

.trade-session .img-placeholder {
    width: 50px;
    height: 50px;
}

.trade-session .symbol-info .link {
    font-size: .7rem;
}

.trade-session .symbol-info .binance_links {
    margin-top: 4px;
}

.trade-session .symbol-info .binance_links a {
    padding-left: 4px;
}

.trade-session .symbol-info .binance_links i {
    font-size: .7rem;
}

.trade-content {
    display: flex;
    flex-grow: 1;
    flex-wrap: wrap;
    gap: 1rem;
    margin-right: 1rem;
}

.trade-completed .trade-content {
    align-items: center;
}

.trade-orders {
    display: flex;
    flex-direction: column;
    width: calc((100% - 1rem) / 2);
    position: relative;
}

.trade-orders>h5 {
    display: flex;
    align-items: center;
    column-gap: 5px;
    font-size: .75rem;
    font-weight: bold;
}

.trade-order {
    border-radius: 10px;
    padding: .5rem;
    background-color: var(--bg-order-pending);
    border: 1px solid var(--border-order-pending);
    font-size: .8rem;
}

.trade-order.order-filled {
    background-color: var(--bg-order-filled);
    border: 1px solid var(--border-order-filled);
}

.trade-order:not(:last-of-type) {
    margin-bottom: .5rem;
}

.trade-order.has-linked {
    border-color: var(--border-place-order) !important;
    cursor: pointer;
}

.place-order.linked {
    display: none;
    position: absolute;
    z-index: 10;
    width: 100%;
    padding: .5rem;
    background-color: var(--bg-place-order);
    border: 1px solid var(--border-place-order);
    border-radius: 10px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
}

.place-order.linked.visible {
    display: flex;
    flex-direction: column;
}

.trade-orders[data-type="STOP_MARKET"] .place-order.linked,
.trade-orders[data-type="TAKE_PROFIT_MARKET"] .place-order.linked,
.trade-orders[data-type="END"] .place-order.linked {
    left: 0%;
}

.trade-badges {
    display: flex;
    gap: .3rem;
    margin-bottom: .4rem;
}

.order-cancel {
    cursor: pointer;
    margin-left: auto;
}

.trade-badges .small-text-box span {
    font-size: .6rem;
    padding: 1px 4px;
}

.trade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px .5rem;
}

.trade-grid>p {
    margin-bottom: 0;
    display: flex;
    gap: .2rem;
    align-items: center;
}

.trade-grid .trade-time {
    grid-column: 1 / -1;
    margin-top: .4rem;
}

.trade-grid p,
.trade-grid span {
    font-size: .7rem;
}

.place-order-title {
    margin-top: .5rem;
    color: var(--text-secondary);
}

.place-order-add {
    cursor: pointer;
    margin-left: 4px;
}

.place-order-add:hover {
    color: var(--color-profit);
}

.place-order {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: .5rem;
    background-color: var(--bg-place-order);
    border: 1px solid var(--border-place-order);
    border-radius: 10px;
    font-size: .8rem;
    margin-bottom: .5rem;
}

.place-order>span {
    position: absolute;
    bottom: .2rem;
    cursor: pointer;
}

.place-order-row {
    display: flex;
    gap: .2rem;
    padding-bottom: .2rem;
    width: 100%;
}

.place-order-row.start,
.place-order-row.end {
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 0.4rem;
}

.place-order-row .status {
    display: flex;
    flex-direction: row;
    gap: .3rem;
    font-size: .7rem;
    border-bottom: none;
    text-transform: capitalize;
}

.place-order-row select,
.place-order-row input {
    width: 100%;
    height: 1.4rem;
    padding: 2px 3px;
    border-radius: .5rem;
    text-transform: lowercase;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    margin-bottom: .2rem;
    font-size: 0.7rem;
}

.place-order-row input {
    padding: 2px 7px;
}

.place-order-meta>div {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    gap: .3rem;
    font-size: .7rem;
    border-bottom: none;
    text-transform: capitalize;
}


.place-order:not(.saved) .place-order-view,
.place-order.saved .place-order-edit,
.place-order.saved .trade-discard,
.place-order.saved .trade-save,
.place-order.saved.editing .place-order-view,
.place-order.saved.editing .trade-cancel,
.place-order.saved.editing .trade-edit {
    display: none;
}

.place-order.saved.editing .place-order-edit {
    display: block;
}

.place-order.saved.editing .trade-discard,
.place-order.saved.editing .trade-save {
    display: inline;
}

.place-order-view span {
    font-size: .7rem;
    text-transform: capitalize;
}

.place-order-actions .place-order-time,
.place-order-actions .place-order-error {
    font-size: .7rem;
}

.trade-grid .place-order-time {
    font-size: .7rem;
    margin-left: 4px;
}

.place-order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .4rem;
}

.place-order-actions .actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.place-order-actions .actions>span {
    cursor: pointer;
}

.place-order-actions .trade-edit i {
    font-size: 11px;
}

.trade-pnl {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 25%;
}

.trade-pnl h4 {
    display: flex;
    align-items: center;
    font-size: .9rem;
    font-weight: bold;
    margin-bottom: 0;
}

.trade-pnl h4 .percent {
    margin-left: 4px;
}

.trade-pnl p {
    margin: 0;
    font-size: .9rem;
    margin-top: 3px;
}

.trade-pnl p.pnl-percentage {
    font-size: .9rem;
    margin-top: 4px;
}

.trade-errors {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.trade-error {
    display: flex;
    align-items: center;
    background: var(--bg-order-pending);
    border: 1px solid var(--border-order-pending);
    border-radius: 1rem;
    padding: 6px 10px;
    color: var(--text-primary);
    gap: 7px;
}

.trade-error-count {
    font-size: 1.3rem;
    font-weight: bold;
    margin-right: 10px;
    white-space: nowrap;
}

.trade-error-message {
    flex: 1;
    font-size: .7rem;
}

.trade-error-dismiss {
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.6;
}

.trade-error-dismiss:hover {
    opacity: 1;
}


.trade-bottom {
    display: flex;
    justify-content: space-between;
    min-height: 30px;
    margin-top: 1rem;
    font-size: 0.7rem;
}

.trade-bottom .ema {
    display: flex;
    flex-direction: column;
    min-width: 7rem
}

.trade-bottom .total_value {
    overflow: hidden;
}

/* Bootstrap overrides for dark inputs */
.trade-header .form-control,
#suggestion-input {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.trade-header .form-control:focus,
#suggestion-input:focus {
    background: var(--bg-input);
    color: var(--text-primary);
}