/* mods/crypto/assets/css/watchlist.css — Unified Watchlist Intelligence (/watchlist) */

.wl-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    color: var(--text-main, #f8fafc);
}

.wl-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82));
    border: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 1.25rem;
}

.wl-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wl-hero-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.wl-hero h1 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main, #f8fafc);
}

.wl-hero p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-dim, #94a3b8);
}

.wl-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.wl-add-box {
    position: relative;
    min-width: 250px;
}

.wl-add-input {
    width: 100%;
    padding: 0.58rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-main, #f8fafc);
    font-size: 0.86rem;
    outline: none;
    transition: border-color 0.18s ease;
}

.wl-add-input:focus {
    border-color: #f59e0b;
}

.wl-add-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 310px;
    overflow-y: auto;
    border-radius: 12px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.wl-add-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.83rem;
    color: #f8fafc;
}

.wl-add-item:hover {
    background: rgba(245, 158, 11, 0.14);
}

.wl-add-item-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.wl-add-item-left img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.56rem 0.95rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.85);
    color: var(--text-main, #f8fafc);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.16s ease;
}

.wl-btn:hover {
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.wl-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: rgba(245, 158, 11, 0.6);
    color: #0f172a;
}

.wl-btn-primary:hover {
    border-color: #fbbf24;
    filter: brightness(1.05);
}

/* KPI Strip */
.wl-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.wl-kpi-card {
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left-width: 4px;
}

.wl-kpi-lbl {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-dim, #94a3b8);
    margin-bottom: 0.35rem;
}

.wl-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main, #f8fafc);
    line-height: 1.2;
}

.wl-kpi-sub {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-dim, #94a3b8);
}

/* Empty State */
.wl-empty-card {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px dashed rgba(245, 158, 11, 0.45);
    margin-bottom: 1.25rem;
}

.wl-empty-icon {
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.wl-empty-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    color: var(--text-main, #f8fafc);
}

.wl-empty-card p {
    max-width: 580px;
    margin: 0 auto 1.25rem;
    font-size: 0.9rem;
    color: var(--text-dim, #94a3b8);
    line-height: 1.55;
}

.wl-empty-btns {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Table Card */
.wl-table-card {
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.wl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    flex-wrap: wrap;
}

.wl-sort-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-dim, #94a3b8);
    font-weight: 600;
}

.wl-select {
    padding: 0.42rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main, #f8fafc);
    font-size: 0.82rem;
    outline: none;
}

.wl-count-pill {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim, #94a3b8);
}

.wl-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.wl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.wl-table thead th {
    text-align: left;
    padding: 0.78rem 0.95rem;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim, #94a3b8);
    background: rgba(30, 41, 59, 0.55);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    white-space: nowrap;
}

.wl-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.14s ease;
}

.wl-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.05);
}

.wl-table td {
    padding: 0.82rem 0.95rem;
    vertical-align: middle;
}

.wl-asset-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wl-star-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: #f59e0b;
    transition: transform 0.15s ease;
}

.wl-star-btn:hover {
    transform: scale(1.2);
}

.wl-coin-icon-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
    flex-shrink: 0;
    text-decoration: none;
}

.wl-coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.wl-coin-fallback {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #334155;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
}

.wl-coin-name-link {
    font-weight: 800;
    color: var(--text-main, #f8fafc);
    text-decoration: none;
    font-size: 0.92rem;
}

.wl-coin-name-link:hover {
    color: #38bdf8;
}

.wl-coin-sub {
    font-size: 0.73rem;
    color: var(--text-dim, #94a3b8);
}

.wl-tr-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.63rem;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    margin-left: 4px;
}

.wl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.52rem;
    border-radius: 6px;
    font-size: 0.71rem;
    font-weight: 800;
    white-space: nowrap;
}

.wl-badge-bull {
    background: rgba(16, 185, 129, 0.16);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.wl-badge-bear {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.wl-badge-warn {
    background: rgba(245, 158, 11, 0.16);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.wl-badge-neut {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.wl-term-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.wl-term-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem;
    border-radius: 7px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-main, #f8fafc);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.14s ease;
}

.wl-term-btn:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* Light Theme High-Contrast Overrides */
[data-theme="light"] .wl-hero {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .wl-hero h1,
[data-theme="light"] .wl-kpi-val,
[data-theme="light"] .wl-coin-name-link,
[data-theme="light"] .wl-empty-card h3 {
    color: #0f172a;
}

[data-theme="light"] .wl-hero p,
[data-theme="light"] .wl-kpi-lbl,
[data-theme="light"] .wl-kpi-sub,
[data-theme="light"] .wl-coin-sub,
[data-theme="light"] .wl-empty-card p {
    color: #475569;
}

[data-theme="light"] .wl-kpi-card,
[data-theme="light"] .wl-table-card,
[data-theme="light"] .wl-empty-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .wl-add-input,
[data-theme="light"] .wl-select,
[data-theme="light"] .wl-btn:not(.wl-btn-primary),
[data-theme="light"] .wl-term-btn {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .wl-add-dropdown {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .wl-add-item {
    color: #0f172a;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .wl-table thead th {
    background: #f1f5f9;
    color: #334155;
    border-bottom-color: #cbd5e1;
}

[data-theme="light"] .wl-table tbody tr {
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .wl-badge-bull {
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

[data-theme="light"] .wl-badge-bear {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

[data-theme="light"] .wl-badge-warn {
    background: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

[data-theme="light"] .wl-badge-neut {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

[data-theme="light"] .wl-tr-badge {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 1024px) {
    .wl-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wl-hide-md {
        display: none;
    }
}

@media (max-width: 720px) {
    .wl-kpi-grid {
        grid-template-columns: 1fr;
    }
    .wl-hide-sm {
        display: none;
    }
    .wl-add-box {
        width: 100%;
    }
}
