/* --- Wall Street Premium Widget Dizajn --- */
:root {
    --ws-bg: #ffffff;
    --ws-border: #f0f3f6;
    --ws-text-main: #0b1426;
    --ws-text-sub: #7b849b;
    
    /* Globalne Berzanske Boje */
    --ws-green: #0ecb81; /* Binance stil */
    --ws-red: #f6465d;   /* Binance stil */
}

/* Glavni kontejner */
.ws-finance-widget {
    background: var(--ws-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(11, 20, 38, 0.04), 0 2px 8px rgba(11, 20, 38, 0.02);
    border: 1px solid var(--ws-border);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    margin: 30px 0;
    width: 100%;
}

/* Elegantno zaglavlje sa LIVE indikatorom */
.ws-widget-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ws-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
}

.ws-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ws-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trepereća tačka za osjećaj "Uživo" */
.ws-live-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--ws-green);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(14, 203, 129, 0.4);
    animation: ws-pulse 2s infinite;
}

@keyframes ws-pulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(14, 203, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}

.ws-subtitle {
    font-size: 12px;
    color: var(--ws-text-sub);
}

/* Lista sredstava */
.ws-market-list {
    display: flex;
    flex-direction: column;
}

/* Pojedinačni red - Umjesto <tr> sada koristimo Flexbox */
.ws-market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ws-border);
    transition: background-color 0.2s ease;
}

.ws-market-row:hover {
    background-color: #f8fafd;
}

.ws-market-row:last-child {
    border-bottom: none;
}

/* Lijeva strana: Ikonica i Ime */
.ws-asset-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ws-icon-wrap {
    width: 44px;
    height: 44px;
    background: #f0f3f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.ws-name-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ws-asset-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ws-text-main);
    line-height: 1.2;
}

.ws-asset-ticker {
    font-size: 13px;
    color: var(--ws-text-sub);
    margin-top: 3px;
    font-weight: 500;
}

/* Desna strana: Cijena i Promjena */
.ws-price-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ws-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ws-current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ws-text-main);
    line-height: 1.2;
    font-family: "SF Pro Display", -apple-system, sans-serif; /* Optimizovano za brojeve */
}

.ws-price-unit {
    font-size: 12px;
    color: var(--ws-text-sub);
    margin-top: 3px;
    font-weight: 500;
}

/* Premium Badge za procente (Solidne boje, bijeli tekst) */
.ws-change-badge {
    width: 80px; /* Fiksna širina da bi svi bili poravnati */
    padding: 8px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    font-family: "SF Pro Display", -apple-system, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ws-bullish { background-color: var(--ws-green); }
.ws-bearish { background-color: var(--ws-red); }

/* Prazno stanje */
.ws-empty-state {
    padding: 40px;
    text-align: center;
    color: var(--ws-text-sub);
    background: var(--ws-bg);
    border-radius: 16px;
    border: 1px solid var(--ws-border);
    font-weight: 500;
}

/* =========================================
   SAVRŠEN MOBILNI PRIKAZ
========================================= */
@media (max-width: 600px) {
    .ws-widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }
    
    .ws-market-row {
        padding: 16px;
    }
    
    .ws-icon-wrap {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 10px;
    }
    
    .ws-asset-name, .ws-current-price {
        font-size: 15px;
    }
    
    /* Na mobitelu smanjujemo razmak između cijene i procenta */
    .ws-price-info {
        gap: 12px;
    }
    
    .ws-change-badge {
        width: 70px;
        padding: 6px 0;
        font-size: 13px;
    }
}
/* =========================================
   DARK MODE PODRŠKA (Premium izgled)
========================================= */
@media (prefers-color-scheme: dark) {
    :root {
        --ws-bg: #1e2329;       /* Tamno siva Binance pozadina */
        --ws-border: #2b3139;   /* Tamniji obrubi */
        --ws-text-main: #eaecef;/* Svijetli tekst */
        --ws-text-sub: #848e9c; /* Zatamnjeni tekst */
    }

    .ws-widget-header {
        background: #181a20;
    }

    .ws-market-row:hover {
        background-color: #2b3139;
    }

    .ws-icon-wrap {
        background: #2b3139;
        /* Ako Emojiji previše blješte u dark modu, možeš im smanjiti opacity: */
        /* opacity: 0.9; */
    }
}