.p3-wall-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
    contain: layout paint;
}

.p3-wall-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid;
    opacity: 0.48;
    pointer-events: none;
    transform: translateY(-50%);
}

.p3-wall-line--bid { border-color: #25d695; }
.p3-wall-line--ask { border-color: #ff5f72; }
.p3-wall-line--emphasis-1 { border-top-width: 2px; }
.p3-wall-line--emphasis-2 { border-top-width: 4px; }
.p3-wall-line--emphasis-3 { border-top-width: 6px; }

.p3-wall-label {
    position: absolute;
    right: 58px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 17px;
    box-sizing: border-box;
    padding: 2px 5px 2px 3px;
    border: 1px solid;
    border-radius: 4px;
    background: rgba(9, 14, 27, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
    color: #f8fafc;
    font: 700 9px/1.2 "JetBrains Mono", ui-monospace, monospace;
    letter-spacing: -0.02em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.p3-wall-label--bid { border-color: rgba(37, 214, 149, 0.72); }
.p3-wall-label--ask { border-color: rgba(255, 95, 114, 0.72); }
.p3-wall-label--emphasis-1 { font-size: 8.5px; font-weight: 700; }
/* Keep the outer row height stable as the shared size tier thickens the border. */
.p3-wall-label--emphasis-2 { border-width: 2px; padding-top: 1px; padding-bottom: 1px; font-weight: 750; }
.p3-wall-label--emphasis-3 { border-width: 3px; padding-top: 0; padding-bottom: 0; font-weight: 800; }

.p3-wall-label--checkable {
    pointer-events: none;
}

.p3-wall-label--checkable:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.p3-wall-check {
    margin-left: 2px;
    padding-left: 5px;
    border-left: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
    font-weight: 600;
    pointer-events: none;
}

.p3-wall-check--present,
.p3-wall-check--grown { color: #25d695; }
.p3-wall-check--shrunk,
.p3-wall-check--possibly_moved,
.p3-wall-check--busy { color: #fbbf24; }
.p3-wall-check--gone,
.p3-wall-check--error { color: #ff7b8a; }
.p3-wall-check--beyond_depth,
.p3-wall-check--unknown,
.p3-wall-check--outdated,
.p3-wall-check--expired { color: #94a3b8; }

.p3-wall-exchange-icon {
    display: inline-grid;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    place-items: center;
    pointer-events: none;
}

.p3-wall-exchange-icon svg {
    display: block;
    width: 12px;
    height: 12px;
}

.p3-wall-label-text { pointer-events: none; }

.p3-wall-source {
    margin-left: 2px;
    padding-left: 5px;
    border-left: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
    font-weight: 600;
    pointer-events: none;
}

.p3-wall-source--stale {
    color: #fbbf24;
    font-weight: 800;
}

.p3-wall-source--unknown {
    color: #ff9aa6;
    font-weight: 800;
}

.p3-wall-connector {
    position: absolute;
    right: 54px;
    width: 5px;
    box-sizing: border-box;
    border-right: 1px solid;
    border-bottom: 1px solid;
    opacity: 0.62;
    pointer-events: none;
}

.p3-wall-connector--bid { border-color: rgba(37, 214, 149, 0.72); }
.p3-wall-connector--ask { border-color: rgba(255, 95, 114, 0.72); }
.p3-wall-connector--emphasis-2 { border-right-width: 2px; }
.p3-wall-connector--emphasis-3 { border-right-width: 3px; }

.p3-wall-line--recent { opacity: 0.36; }
.p3-wall-label--recent,
.p3-wall-connector--recent { opacity: 0.78; }

.p3-wall-line--stale {
    border-top-style: dashed;
    opacity: 0.3;
}

.p3-wall-label--stale,
.p3-wall-connector--stale {
    opacity: 0.58;
    filter: saturate(0.62);
}

.p3-wall-line--unknown {
    border-top-style: dotted;
    border-color: rgba(148, 163, 184, 0.62);
    opacity: 0.4;
}

.p3-wall-label--unknown {
    border-color: rgba(148, 163, 184, 0.58);
    color: #cbd5e1;
    opacity: 0.72;
}

.p3-wall-connector--unknown {
    border-color: rgba(148, 163, 184, 0.58);
    opacity: 0.5;
}

.p3-wall-tooltip {
    position: absolute;
    z-index: 18;
    max-width: 290px;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid rgba(113, 50, 245, 0.55);
    border-radius: 6px;
    background: rgba(9, 14, 27, 0.96);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
    color: #e2e8f0;
    font: 500 10px/1.45 "JetBrains Mono", ui-monospace, monospace;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 520px) {
    .p3-wall-label {
        left: 4px;
        right: 4px;
        gap: 3px;
        padding-right: 3px;
        font-size: 7px;
        white-space: normal;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .p3-wall-exchange-icon { display: none; }
    .p3-wall-label-text,
    .p3-wall-source { white-space: nowrap; }
    .p3-wall-connector { right: 0; }
}
