/* trading.css */

/* ── Paywall blur ────────────────────────────────────── */
.blur-paywall {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
}

#paywall-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 12px;
}

#paywall-overlay.hidden {
    display: none;
}

.paywall-inner {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 360px;
}

/* ── Trader cards ────────────────────────────────────── */
#traders-container {
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#traders-container::-webkit-scrollbar {
    display: none;
}

.trader-card {
    min-width: 160px;
    max-width: 180px;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trader-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ── Profit/Loss text ────────────────────────────────── */
.text-profit {
    color: #22c55e;
}

.text-loss {
    color: #ef4444;
}

/* ── Trade action badges ─────────────────────────────── */
.badge-buy {
    background-color: #dcfce7;
    color: #16a34a;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
}

.badge-sell {
    background-color: #fee2e2;
    color: #dc2626;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
}

.badge-hold {
    background-color: #f3f4f6;
    color: #6b7280;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
}

/* ── Status badges ───────────────────────────────────── */
.badge-ongoing {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-complete {
    background-color: #e5e7eb;
    color: #6b7280;
}

.badge-planning {
    background-color: #dbeafe;
    color: #2563eb;
}

.badge-halt {
    background-color: #fee2e2;
    color: #dc2626;
}

.badge-holding {
    background-color: #fef3c7;
    color: #d97706;
}

/* ── Trade log entry ─────────────────────────────────── */
.tradelog-entry {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    transition: background-color 0.15s;
}

.tradelog-entry:hover {
    background-color: #f9fafb;
}

.tradelog-reasoning {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.tradelog-entry.expanded .tradelog-reasoning {
    display: block;
}

/* ── Leaderboard row ─────────────────────────────────── */
#leaderboard-body tr {
    transition: background-color 0.15s;
}

#leaderboard-body tr:hover {
    background-color: #f9fafb;
}

.rank-1 {
    color: #f59e0b;
    font-weight: 800;
}

.rank-2 {
    color: #9ca3af;
    font-weight: 700;
}

.rank-3 {
    color: #cd7f32;
    font-weight: 700;
}

/* ── Report button ───────────────────────────────────── */
.report-btn-purchase {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.report-btn-purchase:hover {
    opacity: 0.9;
}

.report-btn-download {
    background-color: #22c55e;
    color: white;
}

.report-btn-download:hover {
    background-color: #16a34a;
}

/* ── Mobile responsive ───────────────────────────────── */
@media (max-width: 768px) {
    .trader-card {
        min-width: 130px;
        padding: 12px !important;
    }

    .trader-card .text-lg {
        font-size: 14px;
    }

    .trader-card .text-sm {
        font-size: 12px;
    }

    .tradelog-entry {
        padding: 8px 10px;
    }
}

/* ── Archive cards ───────────────────────────────────── */
.archive-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ── Skeleton loading ────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
