.aethelix-trade-marker-layer {
    position: absolute;
    inset: 0;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
    font-family: Inter, system-ui, sans-serif;
}

.aethelix-trade-marker-host {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aethelix-trade-marker-layer:not(.is-layout-ready) .aethelix-trade-marker,
.aethelix-trade-marker-layer:not(.is-layout-ready) .aethelix-trade-toggle,
.aethelix-trade-marker-layer:not(.is-layout-ready) .aethelix-trade-tooltip {
    visibility: hidden;
    opacity: 0;
}

.aethelix-trade-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid;
    border-radius: 50%;
    outline: none;
    background: #111113;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    transition: width 0.14s ease, height 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.aethelix-trade-marker:hover,
.aethelix-trade-marker:focus-visible,
.aethelix-trade-marker.is-active {
    width: 32px;
    height: 32px;
}

.aethelix-trade-marker.is-buy {
    border-color: #30d158;
    box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.12), 0 7px 18px rgba(0, 0, 0, 0.46);
}

.aethelix-trade-marker.is-sell {
    border-color: #ff453a;
    box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.12), 0 7px 18px rgba(0, 0, 0, 0.46);
}

.aethelix-trade-marker__avatar,
.aethelix-trade-tooltip__avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    line-height: 1;
}

.aethelix-trade-marker__avatar {
    width: 22px;
    height: 22px;
    font-size: 9px;
}

.aethelix-trade-marker__avatar img,
.aethelix-trade-tooltip__avatar img {
    width: 96%;
    height: 96%;
    display: block;
    object-fit: contain;
}

.aethelix-trade-marker__badge {
    position: absolute;
    right: -5px;
    bottom: -4px;
    min-width: 14px;
    height: 14px;
    display: grid;
    place-items: center;
    padding: 0 3px;
    border: 2px solid #06070a;
    border-radius: 999px;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.aethelix-trade-marker.is-buy .aethelix-trade-marker__badge {
    background: #30d158;
}

.aethelix-trade-marker.is-sell .aethelix-trade-marker__badge {
    background: #ff453a;
}

.aethelix-trade-toggle {
    position: absolute;
    top: 9px;
    right: 10px;
    z-index: 5;
    min-height: 28px;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #2c2c2e;
    border-radius: 10px;
    background: rgba(17, 17, 19, 0.9);
    color: #b4b4ba;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    pointer-events: auto;
    font-size: 10px;
    font-weight: 800;
}

.aethelix-trade-toggle.is-ready {
    display: inline-flex;
}

.aethelix-trade-toggle__signal {
    position: relative;
    width: 15px;
    height: 10px;
    display: inline-block;
}

.aethelix-trade-toggle__signal::before,
.aethelix-trade-toggle__signal::after {
    content: "";
    position: absolute;
    top: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.aethelix-trade-toggle__signal::before {
    left: 0;
    background: #30d158;
}

.aethelix-trade-toggle__signal::after {
    right: 0;
    background: #ff453a;
    box-shadow: 0 0 0 2px #111113;
}

.aethelix-trade-marker-layer.is-markers-hidden .aethelix-trade-marker,
.aethelix-trade-marker-layer.is-markers-hidden .aethelix-trade-tooltip {
    display: none !important;
}

.aethelix-trade-marker-layer.is-markers-hidden .aethelix-trade-toggle {
    opacity: 0.62;
}

.aethelix-trade-tooltip {
    position: absolute;
    z-index: 6;
    width: min(244px, calc(100% - 16px));
    display: none;
    padding: 13px;
    border: 1px solid #2c2c2e;
    border-radius: 16px;
    background: rgba(17, 17, 19, 0.97);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: none;
}

.aethelix-trade-tooltip.is-visible {
    display: block;
}

.aethelix-trade-tooltip__identity {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 10px;
    margin-bottom: 9px;
    border-bottom: 1px solid #2c2c2e;
}

.aethelix-trade-tooltip__avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    font-size: 11px;
}

.aethelix-trade-tooltip__identity-copy {
    min-width: 0;
}

.aethelix-trade-tooltip__identity-copy strong,
.aethelix-trade-tooltip__identity-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aethelix-trade-tooltip__identity-copy strong {
    font-size: 12px;
    font-weight: 800;
}

.aethelix-trade-tooltip__identity-copy span {
    margin-top: 2px;
    color: #8e8e93;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.aethelix-trade-tooltip__rows {
    display: grid;
    gap: 7px;
}

.aethelix-trade-tooltip__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.aethelix-trade-tooltip__row span {
    color: #77777d;
    font-size: 10px;
    font-weight: 650;
}

.aethelix-trade-tooltip__row strong {
    overflow: hidden;
    color: #f4f4f5;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aethelix-trade-tooltip__row.is-pnl strong.is-positive {
    color: #30d158;
}

.aethelix-trade-tooltip__row.is-pnl strong.is-negative {
    color: #ff453a;
}

@media (max-width: 640px) {
    .aethelix-trade-marker {
        width: 26px;
        height: 26px;
    }

    .aethelix-trade-marker:hover,
    .aethelix-trade-marker:focus-visible,
    .aethelix-trade-marker.is-active {
        width: 30px;
        height: 30px;
    }

    .aethelix-trade-marker__avatar {
        width: 20px;
        height: 20px;
    }

    .aethelix-trade-toggle {
        top: 7px;
        right: 8px;
        min-height: 26px;
        padding: 0 8px;
        border-radius: 9px;
        font-size: 9px;
    }

    .aethelix-trade-tooltip {
        width: min(224px, calc(100% - 12px));
        padding: 12px;
        border-radius: 15px;
    }
}
