/* ===============================
   MoneroMarket Global UI (LOCKED)
   =============================== */

:root {
    --bg-main: #0b0b0b;
    --bg-card: #121212;
    --bg-input: #1d1d1d;
    --bg-hover: #222;
    --border-soft: #2a2a2a;

    --text-main: #e0e0e0;
    --text-muted: #888;
    --text-dim: #777;

    --accent: #ff6600;
    --accent-soft: #ff8533;

    --radius-sm: 6px;
    --radius-md: 10px;

    --font-main: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: monospace;
}
/* ===============================
   Filters (Grid shrink fix)
   =============================== */

.filters select,
.filters input {
    min-width: 0;
}


.ad-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ad-form input,
.ad-form select,
.ad-form textarea {
    width: 100%;
}

/* ===============================
   Reset / Base
   =============================== */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
}

/* ===============================
   Typography
   =============================== */

h1, h2, h3 {
    margin: 0 0 16px;
    font-weight: 600;
}

h1 {
    font-size: 1.35rem;
    text-align: center;
}

h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }

.note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 14px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal.hidden {
    display: none;
}
.modal-card {
    background: #111;
    padding: 20px;
    border-radius: 8px;
    max-width: 360px;
    width: 90%;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===============================
   Containers / Cards
   =============================== */

.container {
    width: min(100%, 1200px);
    margin: 80px auto;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
}

/* ===============================
   Buttons
   =============================== */

button,
.btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

button:hover,
.btn:hover {
    background: var(--accent-soft);
}

/* ===============================
   Ad Cards (LOCKED – Mobile First)
   =============================== */

.ad-row {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 6px;
    column-gap: 12px;
}

/* LEFT COLUMN */
.ad-left {
    grid-column: 1;
}

.ad-username {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seller-link {
    color: inherit;
    text-decoration: none;
}

.seller-link:hover {
    color: var(--accent-soft);
}

.profile-wrap {
    width: min(100%, 900px);
    margin: 24px auto;
    padding: 0 12px;
}

.profile-card pre {
    margin: 10px 0 0;
    padding: 12px;
    background: #0d0d0d;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-stat {
    background: #0d0d0d;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.profile-stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.profile-stat-value {
    display: block;
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }
}

.online-dot {
    width: 7px;
    height: 7px;
    background: #2ecc71;
    border-radius: 50%;
}

/* Price directly under username */
.ad-price {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2px;
}

/* Rating bottom-left */
.ad-rating {
    font-size: 0.72rem;
    color: #ffc857;
    margin-top: 4px;
}

/* RIGHT COLUMN */
.ad-right {
    grid-column: 2;
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Top right: limits */
.ad-limits {
    font-weight: 500;
}

/* Center right: margin */
.ad-margin {
    margin-top: 4px;
    font-size: 0.7rem;
}

/* Bottom right: trades */
.ad-trades {
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===============================
   Trade Button Layout
   =============================== */

.trade-action {
    margin-top: 14px;
    text-align: center;
}

.trade-action .btn {
    width: 100%;
}

/* ===============================
   Desktop Upgrade
   =============================== */

@media (min-width: 640px) {
    .trade-action .btn {
        width: auto;
        min-width: 160px;
    }
}

/* ===============================
   Header / Navigation
   =============================== */

.site-header {
    background: var(--bg-card);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-soft);
}

.logo {
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-item .icon {
    font-size: 1.1rem;
    line-height: 1;
}

.nav-item .text {
    font-size: 0.9rem;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--accent-soft);
}

.nav-item.danger:hover {
    color: #ff8a80;
}

@media (max-width: 700px) {
    .header-nav {
        gap: 4px;
    }

    .nav-item {
        padding: 8px;
    }

    .nav-item .icon {
        font-size: 1.2rem;
    }

    .nav-item .text {
        display: none;
    }
}

/* ===============================
   Responsive Containers
   =============================== */

@media (max-width: 480px) {
    .container {
        margin: 40px 12px;
        padding: 22px;
    }
}

/* ===============================
   Global Footer
   =============================== */
.site-footer-global {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(8, 8, 8, 0.94);
    border-top: 1px solid var(--border-soft);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.site-footer-global a {
    color: #f6c945;
    text-decoration: none;
    font-weight: 600;
}

.site-footer-global a:hover {
    text-decoration: underline;
}

body {
    padding-bottom: 46px;
}

.nav-item-bell {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f6c945;
    color: #111;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}


.toast-stack {
    position: fixed;
    top: 74px;
    right: 12px;
    z-index: 1200;
    display: grid;
    gap: 8px;
    width: min(92vw, 360px);
}

.toast-pill {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    box-shadow: 0 8px 22px rgba(0,0,0,.35);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
}

.toast-pill.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #123220;
    border-color: #25643d;
    color: #b9f3cf;
}

.toast-error {
    background: #341516;
    border-color: #6f2a2c;
    color: #ffb7b7;
}

.toast-info {
    background: #2f220f;
    border-color: #7d5b25;
    color: #ffe4ab;
}

@media (max-width: 640px) {
    .toast-stack {
        right: 50%;
        transform: translateX(50%);
        top: 66px;
    }
}
