/* ============================================================
   MARKET LISTINGS PANEL — SHADOWMERE AESTHETIC
   Two‑pane global marketplace browser
   ============================================================ */

#market-listings-panel {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, #120e18 0%, #050308 70%);
    color: #e8ddff;
    display: flex;
    flex-direction: column;
    border: 2px solid #4b2e83;
    box-shadow: 0 0 25px rgba(120, 70, 200, 0.4);
    overflow: hidden;
}

/* ============================
   HEADER
   ============================ */

#market-listings-panel .panel-header {
    background: #15121d;
    border-bottom: 2px solid #4b2e83;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#market-listings-panel .panel-header h2 {
    margin: 0;
    font-size: 20px;
    color: #dcd0ff;
    letter-spacing: 0.08em;
}

#close-market-listings-btn {
    background: transparent;
    border: none;
    color: #dcd0ff;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s ease;
}

#close-market-listings-btn:hover {
    color: #f0e6ff;
    transform: scale(1.1);
}

/* ============================
   SEARCH + FILTER BAR
   ============================ */

.market-listings-searchbar {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(20, 16, 26, 0.85);
    border-bottom: 1px solid rgba(120, 80, 160, 0.35);
}

.market-listings-searchbar input,
.market-listings-searchbar select {
    background: #1a1522;
    border: 1px solid #4b2e83;
    color: #e8ddff;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: "Cinzel", serif;
    font-size: 14px;
    transition: 0.2s ease;
}

.market-listings-searchbar input:focus,
.market-listings-searchbar select:focus {
    border-color: #a884ff;
    box-shadow: 0 0 8px rgba(160, 120, 255, 0.35);
}

/* ============================
   TWO-PANE LAYOUT
   ============================ */

.market-listings-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 320px;
    overflow: hidden;
}

/* ============================
   LEFT PANE — LISTINGS
   ============================ */

.market-listings-left {
    overflow-y: auto;
    padding: 12px;
    background: rgba(15, 10, 18, 0.85);
    border-right: 1px solid rgba(120, 80, 160, 0.35);
}

/* Listing row */
.market-listing-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(120,120,255,0.25);
    border-radius: 6px;
    color: #e8e8ff;
    box-shadow: inset 0 0 8px rgba(60,60,120,0.2);
    cursor: pointer;
    transition: 0.2s ease;
}

.market-listing-row:hover {
    background: rgba(120,120,255,0.15);
    border-color: rgba(160,160,255,0.55);
    transform: translateY(-1px);
}

.listing-name {
    font-weight: bold;
    color: #f0e6ff;
}

.listing-amount {
    text-align: center;
    color: #d0c8ff;
}

.listing-price {
    text-align: right;
    color: #c9a34f;
    font-weight: bold;
}

/* ============================
   RIGHT PANE — DETAILS
   ============================ */

.market-listings-right {
    background: rgba(20, 16, 26, 0.9);
    padding: 16px;
    overflow-y: auto;
}

.market-listings-right h3 {
    margin-top: 0;
    color: #f0e6ff;
    text-shadow: 0 0 6px #000;
}

.market-listing-details {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(120,120,255,0.25);
    border-radius: 6px;
    box-shadow: inset 0 0 8px rgba(60,60,120,0.2);
}

.market-listing-details .detail-name {
    font-size: 18px;
    font-weight: bold;
    color: #f0e6ff;
    margin-bottom: 8px;
}

.market-listing-details .detail-type,
.market-listing-details .detail-rarity,
.market-listing-details .detail-amount,
.market-listing-details .detail-price,
.market-listing-details .detail-seller {
    margin-bottom: 6px;
    color: #d0c8ff;
}

/* BUY BUTTON */
.market-listing-details .market-btn.buy {
    margin-top: 12px;
    width: 100%;
    text-align: center;
}

/* ============================
   EMPTY STATE
   ============================ */

.empty {
    padding: 20px;
    text-align: center;
    color: #a89acb;
    font-style: italic;
}
