/* ──────────────────────────────────────────────────────────────
   trades.css — Player-to-player trade-offer pages
   Reuses glass-card, inv-showcase-card, market-tabs from the existing
   design tokens. New classes are prefixed `.trades-*`.

   Sizing: rely on Bootstrap `fs-*` and `small` — do NOT add font-size.
   ────────────────────────────────────────────────────────────── */

/* ── Trades list rows ────────────────────────────────────────── */
.trades-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trades-row {
    color: inherit;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.trades-row:hover {
    transform: translateY(-1px);
}

.trades-row-party {
    min-width: 0;
}

.trades-row-message {
    max-width: 100%;
}

/* ── Avatar (used in list, detail header, player picker) ─────── */
.trades-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(13, 202, 240, 0.25);
    object-fit: cover;
    flex-shrink: 0;
}

.trades-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 202, 240, 0.08);
    color: rgba(13, 202, 240, 0.7);
}

/* ── Status chips for non-pending offers ──────────────────────── */
.trades-status-chip {
    padding: 0.35em 0.7em;
    border-radius: 999px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

.trades-status-pending {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.35);
    color: #0dcaf0;
}

.trades-status-accepted {
    background: rgba(25, 238, 25, 0.1);
    border-color: rgba(25, 238, 25, 0.35);
    color: rgb(25, 238, 25);
}

.trades-status-denied {
    background: rgba(255, 19, 19, 0.1);
    border-color: rgba(255, 19, 19, 0.35);
    color: rgb(255, 19, 19);
}

.trades-status-canceled {
    background: rgba(255, 203, 49, 0.1);
    border-color: rgba(255, 203, 49, 0.35);
    color: rgb(255, 203, 49);
}

.trades-status-expired {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.55);
}

/* ── Player-picker chip (search result) ──────────────────────── */
.trades-player-pick {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.trades-player-pick:hover {
    background: rgba(13, 202, 240, 0.08);
    border-color: rgba(13, 202, 240, 0.35);
}

.trades-player-pick.is-selected {
    background: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.6);
}

/* ── New-trade item selection cards ──────────────────────────── */
/* The whole card is the click target. Selected cards get a stronger
   info-blue border than the default `.inv-showcase-card.is-selected`
   so the picker reads as a deliberate two-state toggle. */
.trades-pick-card {
    cursor: pointer;
}

.trades-pick-card.is-selected {
    border: 2px solid #0dcaf0;
    box-shadow: 0 0 0 2px rgba(13, 202, 240, 0.25),
                0 10px 26px rgba(0, 0, 0, 0.45);
}

.trades-pick-card.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

    .trades-pick-card.is-disabled:hover {
        transform: none;
        box-shadow: none;
    }

/* Tiny "✓" chip in the top-right corner when selected. Mirrors the
   placement of `.inv-equipped-overlay` so it doesn't fight the
   StatTrak chip stacked in `.market-card-header` (top-left). */
.trades-pick-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.85);
    color: #0b1018;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

    .trades-pick-check i {
        font-size: 0.75rem;
        line-height: 1;
    }

/* ── Empty / placeholder states inside trade pages ───────────── */
.trades-empty {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.trades-empty i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Destructive paired-action button. Mirrors `.connect-btn` from
   `servers.css` (gradient fill + uppercase + same radius) but in
   red — used on paired accept/deny rows (e.g. trade detail) so the
   two choices read as equal visual weight instead of green-primary
   vs ghost-outline. */
.deny-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.deny-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.deny-btn:active {
    transform: translateY(0);
}

.deny-btn:disabled,
.deny-btn[disabled] {
    opacity: 0.55;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* ── Detail: greyed-out "item no longer exists" card ─────────── */
.trades-missing-card {
    opacity: 0.6;
    border: 1px dashed rgba(255, 255, 255, 0.15) !important;
}

.trades-missing-card .inv-showcase-card-img {
    background: rgba(0, 0, 0, 0.3);
}

/* ── Notification card extensions ────────────────────────────── */

/* Clickable variant of `.market-notif-card`. The base card was
   originally read-only; we make it focusable + keyboard-actionable
   when used in the new clickable bell flow. */
.market-notif-card-clickable {
    cursor: pointer;
}

.market-notif-card-clickable:focus-visible {
    outline: 2px solid rgba(13, 202, 240, 0.65);
    outline-offset: 1px;
}

/* Trade-offer notification card icon "thumb" (replaces the image
   slot used by the market card). */
.trades-notif-card .trades-notif-icon {
    width: 64px;
    height: 42px;
    border-radius: 6px;
    background: rgba(13, 202, 240, 0.06);
    border: 1px solid rgba(13, 202, 240, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trades-notif-card .trades-notif-icon i {
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .trades-notif-card .trades-notif-icon {
        width: 52px;
        height: 36px;
    }
}

/* ── Independent-scroll item panels in NewTrade.razor ─────────
   Each panel scrolls within its own 80vh viewport so the user
   can hunt through both inventories side-by-side without the
   whole page scrolling. The header chip stays sticky inside
   the scroll region.                                            */
.trades-items-panel {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

@media (max-width: 991.98px) {
    .trades-items-panel {
        max-height: 80svh;
    }
}

.trades-items-panel-header {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(8px);
}
