/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}



.text-gradient {
    background: linear-gradient(90deg, #fb8b1e, #c9c9c9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s ease-in-out infinite alternate;
}


@keyframes glow {
    from {
        text-shadow: 0 0 10px #fb8b1e;
    }
    to {
        text-shadow: 0 0 25px #c9c9c9;
    }
}

.navbar-info-text {
    font-size: small;
    line-height: 1;
    text-align: end;
    margin-bottom: 0;
}

.dmcSelectInput {
    background-color: #3b3b3b;
    color: white;
    height: 3.5rem;
    margin-bottom: 5px;
    border: transparent;
    font-size: large;
}

.dmcSelectDropdown {
    background-color: black;
    border: 1px #3b3b3b solid;
    z-index: 9999 !important;
}

.dmcSelectOption:hover {
    background-color: #282828;
}


canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    filter: blur(10px); /* Add blur effect on top of the canvas */
    z-index: -1;
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.nav-toggler-styled {
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
    transition: background ease-in-out 0.3s;
}

.nav-toggler-styled:hover {
    background: #828282;
    transition: background ease-in-out 0.3s;
}

.nav-brand-styled:hover {
    color: #828282;
    transition: color ease-in-out 0.3s;
}

.nav-brand-styled {
    margin: 0;
    color: white;
    transition: color ease-in-out 0.3s;
}

.hider {
    -webkit-animation: fadeIn 0.5s;
    animation: fadeIn 0.5s;
}

.button-navbar-custom-above-popover {
    background-color: transparent;
    border-radius: 5px;
    padding: 6px;
    white-space: nowrap;
    cursor: default !important;
}

.button-navbar-custom-above-popover:active {
    border: 0;
}

.button-navbar-custom-above-popover:hover {
    background-color: #252525;
    color: #cecece;
    transition: background-color, color 0.3s, 0.5s;
}

.button-navbar-custom:hover {
    background-color: #252525;
    color: #cecece;
    transition: background-color, color 0.3s, 0.5s;
}

.button-navbar-custom {
    background-color: transparent;
    border-radius: 5px;
    padding: 6px;
    white-space: nowrap;
}

.navbar-vertical {
    z-index: 999;
    background-color: #1f1f1f !important;
    padding: 0.5rem 0.5rem;
    position: absolute;
    margin: 8px;
    border-radius: 20px;
    height: 98%;
    transition: all 0.25s cubic-bezier(.48, -0.37, .56, 1.38);
}

.styled-swap-list-group-item {
    background: transparent;
    border-bottom: inset #837a87;
}

.styled-swap-form-select, .is-open, .is-focused, .Select--single {
    background: transparent;
}

.styled-swap-tabs {
    margin-bottom: 12px;
    --bs-nav-pills-border-radius: 20px;
    --bs-nav-tabs-border-width: 0;
}

.button-input-text-swap, .button-input-text-swap:focus {
    width: 70px;
    color: white;
    text-overflow: ellipsis;
    display: inline-block;
    margin: 2px;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: center;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.tooltip-inner {
    min-width: 320px;
}

.styled-swap-container {
    width: 100%;
}

.styled-swap-button {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    min-height: 50px;
}

.styled-swap-button-no-width {
    margin-left: auto;
    margin-right: auto;
    min-height: 50px;
}

.styled-switch {
    background-color: transparent !important;
    border: transparent !important;
    border: 0 !important;
}

.styled-switch-div {
    border-radius: 12px;
    height: 40px;
    width: 48px;
    position: relative;
    margin: -18px auto;
    background-color: rgb(27, 27, 27);
    border: 4px solid rgb(19, 19, 19);
    z-index: 10
}

.styled-swap-row {
    width: 40vw;
    margin-left: auto;
    margin-right: auto;
    background: #3b3b3b;
}

.styled-swap-row-small {
    margin-left: auto;
    margin-right: auto;
    background: #3b3b3b;
}


.styled-token-button {
    background: #1f1f1f;
    min-width: 200px;
    border: transparent;
    border: 0;
    font-weight: normal;
}

.styled-token-button:hover, .styled-token-button:active {
    background: #545454 !important;
}

.styled-input-form, .styled-input-form:active, .styled-input-form:focus {
    background-color: transparent !important;
    border: 0 !important;
    transition: opacity 250ms ease-in-out;
    color: azure;
}

.styled-input-form:focus {
    outline: transparent none 0 !important;
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0) !important;
}

/* === Laptop Styles (min-width: 1000px) === */
@media (min-width: 1000px) {
    .navbar-customized {
        padding: 10px;
        display: grid;
        grid-template-columns: 1.5fr 6fr 1fr 0.7fr;
        width: 100%;
    }
}

/* === Phone Styles (max-width: 999px) === */
@media (max-width: 999px) {
    .navbar-customized {
        padding: 10px;
        display: grid;
        grid-template-columns: 2fr 3fr 1fr 0.7fr;
        width: 100%;
    }
}

/* History page — each row in the records table.
 * Layout: top row = coloured action label (left) + explorer link (right);
 *         bottom = token name + detail line, then timestamp on its own line.
 * Action text is bolded and slightly enlarged so it stands out; detail
 * and timestamp stay muted so the data doesn't compete with the action. */
.history-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-action {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.history-token-name {
    font-size: 0.85rem;
    word-break: break-all;
}

.history-detail {
    font-size: 0.9rem;
    /* Keep the line together when there's room; allow wrap only when the
     * card is narrower than the full sentence. */
    word-break: break-word;
}

.history-timestamp {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.history-tx-link {
    color: #4dabf7;
    text-decoration: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(77, 171, 247, 0.4);
    transition: background-color 150ms ease, border-color 150ms ease;
}

.history-tx-link:hover,
.history-tx-link:focus {
    color: #fff;
    background-color: rgba(77, 171, 247, 0.2);
    border-color: #4dabf7;
    text-decoration: none;
    outline: none;
}
/* Swaps page v2 — Uniswap token-page layout (desktop only for now).
 * Header strip on top; below it the analytics column (P&L, recent trades)
 * on the left and the swap card, sticky, on the right. The card comes
 * first in the DOM so a later mobile layout can stack it on top. */
.swaps-v2 {
    max-width: 1440px;
    margin: 0 auto;
}

.swaps-v2 .styled-swap-row {
    width: 100%;
}

.swaps-v2-header {
    background: #3b3b3b;
    padding: 12px 16px;
}

.swaps-v2-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
}

.swaps-v2-icon-sm {
    width: 26px;
    height: 26px;
    align-self: flex-end;
    margin-left: -18px;
}

.swaps-v2-stat-label {
    font-size: 0.78rem;
    color: #9ca3af;
}

.swaps-v2-stat-value {
    font-size: 1.05rem;
    font-weight: 600;
}

@media (min-width: 1100px) {
    .swaps-v2-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 460px;
        grid-template-areas: "analytics card";
        gap: 12px;
        align-items: start;
    }

    .swaps-v2-card {
        grid-area: card;
        position: sticky;
        top: 12px;
    }

    .swaps-v2-analytics {
        grid-area: analytics;
        min-width: 0;
    }
}

.swaps-v2-change-pair {
    white-space: nowrap;
    font-weight: 600;
    padding: 10px 18px;
}

/* The card's pair pill must read as a selector: orange outline + caret. */
.swaps-v2 .styled-token-button {
    border: 1px solid #fb8b1e !important;
}

.swaps-v2 .styled-token-button .mantine-Button-label::after {
    content: "\25BE";
    margin-left: 8px;
    color: #fb8b1e;
}

/* generate_row_button hard-codes an inline width: 40vw; inside the 460px
 * card that overflows the card and overlaps the next block. */
.swaps-v2-trade-box div[style*="40vw"] {
    width: 100% !important;
}

/* Sibling chips in the header: same feed + maturity, other strike/type/leg. */
.swaps-v2-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(156, 163, 175, 0.45);
    background: transparent;
    color: rgba(229, 231, 235, 0.9);
    font-size: 0.85rem;
    line-height: 1.5;
}

button.swaps-v2-chip:hover {
    border-color: #fb8b1e;
    color: #fb8b1e;
}

.swaps-v2-chip.active {
    border: 1.5px solid #fb8b1e;
    background: rgba(251, 139, 30, 0.18);
    color: #fb8b1e;
    font-weight: 600;
}

.swaps-v2-info-line {
    font-size: 0.85rem;
    line-height: 1.35;
    margin-bottom: 0.3rem;
}

/* ── Swap card, Uniswap style ─────────────────────────────────────────── */
.swaps-v2-trade-box {
    background: #3b3b3b;
    padding: 12px;
}

.swaps-v2-settings-btn,
.swaps-v2-refresh {
    background: transparent;
    border: 1px solid rgba(156, 163, 175, 0.45);
    border-radius: 999px;
    color: rgba(229, 231, 235, 0.9);
    font-size: 0.8rem;
    padding: 2px 10px;
}

.swaps-v2-refresh {
    color: #fb8b1e;
    padding: 2px 8px;
}

.swaps-v2-settings-btn:hover,
.swaps-v2-refresh:hover {
    border-color: #fb8b1e;
    color: #fb8b1e;
}

.swaps-v2-settings {
    padding: 4px 0 10px;
}

.swaps-v2-box {
    background: #1f1f1f;
    border-radius: 12px;
    padding: 10px 12px;
}

.swaps-v2-box-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

.swaps-v2-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 26px;
}

.swaps-v2-box .swaps-v2-chip {
    font-size: 0.75rem;
    padding: 0 8px;
}

/* ── P&L widget ───────────────────────────────────────────────────────── */
.swaps-v2-stats {
    display: grid;
    gap: 0.25rem;
    padding: 0.25rem 0 0.6rem;
    border-bottom: 1px solid rgba(108, 117, 125, 0.18);
}

.swaps-v2-greeks {
    border-top: 1px solid rgba(108, 117, 125, 0.18);
    padding-top: 0.5rem;
}

.swaps-v2-greeks .swaps-v2-stats {
    border-bottom: 0;
}

/* While the P&L chart recomputes, the callback's `running` dims the old
 * one instead of covering it with a spinner. */
.swaps-v2-pnl {
    transition: opacity 150ms ease-out;
}

/* The P&L figure has no fixed height: Plotly fills this box. */
.swaps-v2-pnl-graph {
    height: 420px;
}

.swaps-v2-details summary {
    cursor: pointer;
    color: #9ca3af;
}

/* Recent trades: title and "no trades yet" on one line; a table still
 * takes its own full-width line. */
.swaps-v2-trades-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.75rem;
}

.swaps-v2-trades-inner > #swap-recent-trades-body {
    flex-basis: 100%;
}

.swaps-v2-trades-inner > #swap-recent-trades-body:has(> span:only-child) {
    flex-basis: auto;
}

/* ── Swap card: Buy / Sell, summary, button ───────────────────────────── */
.swaps-v2-mode-control {
    flex: 1;
    max-width: 240px;
}

.swaps-v2-summary {
    padding: 10px 4px 8px;
}

.swaps-v2-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Long labels ("Insufficient USDC", "Buy 2 × ETH Call 2,527 Long") wrap
 * instead of being clipped by Mantine's nowrap label. */
.swaps-v2-trade-box #do-swap-button,
.swaps-v2-trade-box #add-liquidity-button {
    height: auto;
    min-height: 50px;
    font-size: 1.25rem !important;
}

.swaps-v2-trade-box #do-swap-button .mantine-Button-label,
.swaps-v2-trade-box #add-liquidity-button .mantine-Button-label {
    white-space: normal;
    overflow: visible;
    text-align: center;
    line-height: 1.3;
    padding: 6px 0;
}

/* Add liquidity: the USDC pill is a label, not a selector — no caret. */
.swaps-v2 #add-liquidity-usdc-button {
    border-color: rgba(156, 163, 175, 0.45) !important;
}

.swaps-v2 #add-liquidity-usdc-button .mantine-Button-label::after {
    content: none;
}

/* Add liquidity: the pills must not squeeze the amount. `.styled-token-button`
 * has min-width 200px, which left the option field three digits wide. The
 * option pill carries a short label (`pill_label`: no underlying, no date —
 * both are in the header), so it needs no truncation. */
.swaps-v2 #add-liquidity-usdc-button,
.swaps-v2 #add-liquidity-option-token-button {
    min-width: 0;
}

/* Three modes need the full card width, not the Buy/Sell 240px. */
.swaps-v2-trade-box #add-liquidity-mode {
    flex: 1;
    max-width: none;
}

/* ── Position strip ───────────────────────────────────────────────────── */
.swaps-v2-position {
    background: #3b3b3b;
    padding: 10px 16px;
}

/* "How this option pays" under the pair name: a plain orange text link. */
.swaps-v2-link {
    background: none;
    border: 0;
    padding: 0;
    color: #fb8b1e;
    font-size: 0.85rem;
    text-align: left;
}

.swaps-v2-link:hover {
    text-decoration: underline;
}

/* ── Greek overlay control: dark, like the sibling chips ──────────────── */
.swaps-v2-segmented.mantine-SegmentedControl-root,
.swaps-v2-segmented {
    background: #262626;
    border: 1px solid rgba(156, 163, 175, 0.28);
}

.swaps-v2-segmented .mantine-SegmentedControl-label {
    color: #9ca3af;
}

.swaps-v2-segmented .mantine-SegmentedControl-label[data-active],
.swaps-v2-segmented .mantine-SegmentedControl-control[data-active] .mantine-SegmentedControl-label {
    color: #fb8b1e;
}

.swaps-v2-segmented .mantine-SegmentedControl-indicator {
    background: rgba(251, 139, 30, 0.16);
    box-shadow: inset 0 0 0 1px rgba(251, 139, 30, 0.55);
}

/* Mantine draws the separators as a 1px ::before with a light
 * background colour; on the dark control they read as white bars. */
.swaps-v2-segmented .mantine-SegmentedControl-control::before {
    background-color: rgba(156, 163, 175, 0.18) !important;
}

/* ── Disabled chips: say at once why, on hover and keyboard focus ─────── */
/* Dimmed by colour, not opacity: opacity would fade the tooltip too
 * (a pseudo-element inherits it). */
.swaps-v2-chip.disabled {
    position: relative;
    cursor: not-allowed;
    color: rgba(229, 231, 235, 0.35);
    border-color: rgba(156, 163, 175, 0.2);
}

.swaps-v2-chip.disabled[data-tip]:hover,
.swaps-v2-chip.disabled[data-tip]:focus-visible {
    color: rgba(229, 231, 235, 0.6);
    outline: none;
}

/* Tooltip for [data-tip] chips, placed by assets/strike_strip.js. */
.sf-chip-tip {
    display: none;
    position: fixed;
    z-index: 2000;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    background: #111827;
    border: 1px solid rgba(156, 163, 175, 0.35);
    color: #f3f4f6;
    font-size: 0.75rem;
    pointer-events: none;
}

/* ── Strike strip: three chips in view, the rest scroll sideways ─────── */
.swaps-v2-strike-strip {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    position: relative;
    scrollbar-width: none;
    max-width: 60vw;
}

.swaps-v2-strike-strip::-webkit-scrollbar {
    display: none;
}

.swaps-v2-strike-strip > * {
    flex: 0 0 auto;
}

.swaps-v2-strike-strip.more-left {
    mask-image: linear-gradient(to right, transparent 0, #000 14px);
}

.swaps-v2-strike-strip.more-right {
    mask-image: linear-gradient(to left, transparent 0, #000 14px);
}

.swaps-v2-strike-strip.more-left.more-right {
    mask-image: linear-gradient(to right, transparent 0, #000 14px,
                                #000 calc(100% - 14px), transparent 100%);
}

/* ── Links to the docs site ───────────────────────────────────────────── */
.swaps-v2-docs-link {
    color: #fb8b1e;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}

.swaps-v2-docs-link:hover {
    text-decoration: underline;
}

.swaps-v2-docs-link .bi {
    font-size: 0.7em;
}

/* Greeks: folded under the chart. */
.swaps-v2-greeks summary {
    font-size: 0.8rem;
    padding: 0 0.5rem 0.4rem;
}

/* "The formula" tooltip in the payoff modal: formula on one line. */
.swaps-v2-formula-tip .tooltip-inner {
    max-width: 520px;
    padding: 10px 12px;
    text-align: left;
}

.swaps-v2-formula {
    white-space: nowrap;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    padding: 6px 8px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.07);
}

.swaps-v2-formula-note {
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 440px;
}

/* Overlay control: equal-width buttons. Mantine measures the controls
 * to place its indicator, so fixed flex bases keep them aligned. */
.swaps-v2-segmented {
    width: 22rem;
}

.swaps-v2-segmented .mantine-SegmentedControl-control {
    flex: 1 1 0;
    min-width: 0;
}

/* Refresh-quote button: a round icon button, icon centred. Bootstrap
 * Icons sets vertical-align: -.125em on the glyph, which pushed it down. */
.swaps-v2-refresh {
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.swaps-v2-refresh .bi::before {
    vertical-align: 0;
}

/* A chip whose pair exists only for another expiry: clickable, dashed. */
.swaps-v2-chip.elsewhere {
    border-style: dashed;
    color: rgba(229, 231, 235, 0.7);
}

/* ── Swaps page, phones (≤ 767px) ─────────────────────────────────────
 * Below 1100px the grid already stacks: header, swap card, P&L, position,
 * recent trades. This block makes each of them fit 360–430px screens. */
@media (max-width: 767.98px) {
    .swaps-v2.styled-swap-container {
        padding: 8px 8px 48px !important;
    }

    /* Header: title row, then stats on one line, then chips on one line;
     * "Change pair" becomes a full-width button at the bottom. */
    .swaps-v2-header {
        flex-wrap: wrap;
        padding: 12px;
        gap: 10px !important;
    }

    .swaps-v2-header > .flex-grow-1 {
        width: 100%;
        min-width: 0;
    }

    .swaps-v2-change-pair {
        order: 2;
        width: 100%;
        padding: 8px 12px;
    }

    .swaps-v2-hdr-title {
        width: 100%;
        min-width: 0;
        align-items: flex-start !important;
    }

    .swaps-v2-hdr-title > div:last-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .swaps-v2-hdr-title .fs-4 {
        font-size: 1.2rem !important;
        line-height: 1.25;
    }

    /* Pair id and "How this option pays" stack instead of squeezing the
     * id into a one-character column. */
    .swaps-v2-hdr-title .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 2px !important;
    }

    .swaps-v2-icon {
        width: 36px;
        height: 36px;
    }

    /* Second asset badge on the big icon's lower-right corner; with the
     * title wrapping, flex-end put it under the whole title block. */
    .swaps-v2-icon-sm {
        width: 20px;
        height: 20px;
        margin-left: -14px;
        margin-top: 20px;
        align-self: flex-start;
    }

    /* Six Greek buttons in ~360px: tighter labels, nothing cut off. */
    .swaps-v2-segmented .mantine-SegmentedControl-label {
        padding-left: 2px;
        padding-right: 2px;
        font-size: 12px;
    }

    /* Pair stats on one line; what does not fit scrolls sideways, with
     * the edge faded (assets/strike_strip.js sets more-left/right). */
    .swaps-v2-hdr-stats,
    .swaps-v2-chip-groups {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
        width: 100%;
    }

    .swaps-v2-hdr-stats::-webkit-scrollbar,
    .swaps-v2-chip-groups::-webkit-scrollbar {
        display: none;
    }

    .swaps-v2-hdr-stats {
        gap: 14px !important;
    }

    .swaps-v2-hdr-stats > .swaps-v2-stat {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .swaps-v2-hdr-stats .swaps-v2-stat-label {
        font-size: 0.7rem;
    }

    .swaps-v2-hdr-stats .swaps-v2-stat-value {
        font-size: 0.85rem;
    }

    /* What is not in the chips below comes first: spot, time left and
     * liquidity; leg, kind and maturity (also shown by the chips) after.
     * DOM order: spot, leg, kind, maturity, expires in, liquidity. */
    .swaps-v2-hdr-stats > .swaps-v2-stat {
        order: 3;
    }

    .swaps-v2-hdr-stats > .swaps-v2-stat:nth-child(1) {
        order: 0;
    }

    .swaps-v2-hdr-stats > .swaps-v2-stat:nth-child(5) {
        order: 1;
    }

    .swaps-v2-hdr-stats > .swaps-v2-stat:nth-child(6) {
        order: 2;
    }

    /* Maturity: the date is enough, "Expires in" is next to it. */
    .swaps-v2-hdr-utc {
        display: none;
    }

    /* Switch chips on one line too: no group labels, a thin rule between
     * strike, type, leg and expiry. */
    .swaps-v2-chip-groups {
        gap: 0 !important;
        margin-top: 10px !important;
    }

    .swaps-v2-chip-group {
        flex: 0 0 auto;
        flex-wrap: nowrap !important;
        padding: 0 8px;
        border-left: 1px solid rgba(156, 163, 175, 0.3);
    }

    .swaps-v2-chip-group:first-child {
        padding-left: 0;
        border-left: 0;
    }

    .swaps-v2-chip-group > .swaps-v2-stat-label {
        display: none;
    }

    .swaps-v2-chip-groups .swaps-v2-chip {
        padding: 2px 8px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .swaps-v2-strike-strip {
        max-width: none;
    }

    .swaps-v2-hdr-stats.more-right,
    .swaps-v2-chip-groups.more-right {
        mask-image: linear-gradient(to left, transparent 0, #000 24px);
    }

    .swaps-v2-hdr-stats.more-left,
    .swaps-v2-chip-groups.more-left {
        mask-image: linear-gradient(to right, transparent 0, #000 24px);
    }

    .swaps-v2-hdr-stats.more-left.more-right,
    .swaps-v2-chip-groups.more-left.more-right {
        mask-image: linear-gradient(to right, transparent 0, #000 24px,
                                    #000 calc(100% - 24px), transparent 100%);
    }

    /* Swap card: the amount gets its own line above the pair pill. */
    .swaps-v2-amount-row {
        flex-wrap: wrap;
    }

    .swaps-v2-amount-row > * {
        flex: 1 1 100%;
        min-width: 0;
    }

    .swaps-v2-amount-row .styled-token-button {
        width: 100%;
        max-width: 100%;
    }

    .swaps-v2-amount-row .styled-token-button .mantine-Button-label {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* P&L: overlay control full width under its label. */
    .swaps-v2-overlay-row {
        flex-wrap: wrap;
        width: 100%;
    }

    .swaps-v2-segmented {
        width: 100%;
    }

    /* Stats and Greeks: 3 columns, not 6 squeezed into one row. The
     * column count is set inline from the cell count, hence !important. */
    #swap-pnl-widget .swaps-v2-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        row-gap: 0.6rem;
    }

    #swap-pnl-widget .swaps-v2-stats > div > div:last-child {
        font-size: 0.95rem !important;
        overflow-wrap: anywhere;
    }

    /* Swap summary: labels on one line, long values wrap instead. */
    .swaps-v2-summary-row > span:first-child {
        white-space: nowrap;
    }

    .swaps-v2-summary-row > span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* Slippage breakdown rows: the 1rem indent cost a line per row. */
    #swaps-fee-preview div[style*="padding-left: 1rem"] {
        padding-left: 0 !important;
    }

    .swaps-v2-pnl-graph {
        height: 340px;
    }

    .swaps-v2-position {
        padding: 10px 12px;
    }

    .swaps-v2-position > div {
        gap: 12px !important;
    }
}
