/* ══════════════════════════════════════════════════
   Stock Widget by Studio 96 — sw96.css v1.0.0
   ══════════════════════════════════════════════════ */

/* ── Base ── */
.sw96-card, .sw96-ticker, .sw96-chart-wrap,
.sw96-table-wrap, .sw96-news-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}
.sw96-card *, .sw96-ticker *, .sw96-chart-wrap *,
.sw96-table-wrap *, .sw96-news-wrap * { box-sizing: border-box; }

/* ══ QUOTE CARD ══ */
.sw96-card {
    background: var(--sw96-bg, #1a1a2e);
    border: 1px solid var(--sw96-bd, #2a2a4a);
    border-radius: 14px;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 4px 28px rgba(0,0,0,.35);
    transition: transform .2s, box-shadow .2s;
}
.sw96-card:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(0,0,0,.4); }

.sw96-card-header {
    background: var(--sw96-hd, #16213e);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--sw96-bd, #2a2a4a);
}

/* Logo box */
.sw96-logo-box {
    width: 40px; height: 40px;
    border-radius: 8px;
    border: 1px solid var(--sw96-bd, #2a2a4a);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    background: var(--sw96-hd, #16213e);
}
.sw96-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.sw96-logo-init-wrap { font-size: 11px; font-weight: 600; text-align: center; }

.sw96-card-title { flex: 1; min-width: 0; }
.sw96-sym {
    display: block;
    font-size: 15px; font-weight: 600;
    color: var(--sw96-tx, #e0e0e0);
    letter-spacing: .3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw96-name {
    display: block;
    font-size: 11px;
    color: var(--sw96-mu, #888);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sw96-badge {
    font-size: 12px; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    white-space: nowrap; flex-shrink: 0;
}

/* Card body */
.sw96-card .sw96-price,
.sw96-card .sw96-change,
.sw96-card .sw96-stats,
.sw96-card .sw96-sparkline,
.sw96-card .sw96-updated { padding: 0 16px; }

.sw96-price {
    font-size: 38px; font-weight: 600;
    color: var(--sw96-pr, #fff);
    letter-spacing: -1.5px;
    margin: 14px 0 2px;
    line-height: 1;
}
.sw96-price small { font-size: 14px; font-weight: 400; opacity: .6; margin-left: 4px; }

.sw96-change { font-size: 14px; font-weight: 500; margin-bottom: 12px; }

.sw96-stats {
    display: flex; gap: 14px; flex-wrap: wrap;
    border-top: 1px solid var(--sw96-bd, #2a2a4a);
    padding-top: 12px; margin-top: 4px;
}
.sw96-stat { display: flex; flex-direction: column; gap: 3px; }
.sw96-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.sw96-stat-val   { font-size: 13px; font-weight: 600; }

.sw96-sparkline { margin: 12px 0 4px; height: 50px; }
.sw96-spark-canvas { width: 100%; height: 50px; display: block; }

.sw96-updated { font-size: 10px; color: var(--sw96-mu,#888); padding-bottom: 14px; margin-top: 6px; }

/* ══ TICKER ══ */
.sw96-ticker {
    background: var(--sw96-bg, #1a1a2e);
    border-top: 1px solid;
    border-bottom: 1px solid;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    width: 100%;
}
.sw96-ticker-inner {
    display: inline-flex;
    animation: sw96-scroll linear infinite;
    white-space: nowrap;
}
.sw96-ticker-inner:hover { animation-play-state: paused; cursor: pointer; }
@keyframes sw96-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.sw96-tick-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 13px; }
.sw96-tick-sym   { font-weight: 600; }
.sw96-tick-price { font-weight: 400; }
.sw96-tick-chg   { font-size: 12px; font-weight: 600; }
.sw96-tick-sep   { padding: 0 2px; opacity: .4; }

/* ══ CHART ══ */
.sw96-chart-wrap {
    background: var(--sw96-bg, #1a1a2e);
    border: 1px solid var(--sw96-bd, #2a2a4a);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,.3);
}
.sw96-chart-header {
    background: var(--sw96-hd, #16213e);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--sw96-bd, #2a2a4a);
}
.sw96-period-bar {
    display: flex;
    gap: 4px;
    padding: 10px 16px 0;
}
.sw96-period {
    font-size: 11px; padding: 4px 10px;
    border: 1px solid var(--sw96-bd, #2a2a4a);
    border-radius: 20px; cursor: pointer;
    background: transparent;
    color: var(--sw96-mu, #888);
    transition: all .15s;
}
.sw96-period.active,
.sw96-period:hover {
    background: var(--sw96-up, #00c875);
    border-color: var(--sw96-up, #00c875);
    color: #fff;
}
.sw96-chart-wrap canvas { display: block; padding: 10px 16px 14px; width: 100% !important; }

/* ══ TABLE ══ */
.sw96-table-wrap {
    background: var(--sw96-bg, #1a1a2e);
    border: 1px solid var(--sw96-bd, #2a2a4a);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,.3);
}
.sw96-table-title {
    padding: 12px 16px;
    font-size: 14px; font-weight: 600;
    border-bottom: 1px solid;
}
.sw96-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sw96-table thead th {
    padding: 10px 14px;
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .05em;
    text-align: right;
    border-bottom: 1px solid var(--sw96-bd, #2a2a4a);
}
.sw96-table thead th:first-child { text-align: left; }
.sw96-table td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid var(--sw96-bd, #2a2a4a);
}
.sw96-table td:first-child { text-align: left; }
.sw96-tr:hover { filter: brightness(1.1); }
.sw96-tr:last-child td { border-bottom: none; }

/* Table logo small */
.sw96-table .sw96-logo-box { width: 28px; height: 28px; border-radius: 5px; font-size: 8px; }

/* ══ NEWS ══ */
.sw96-news-wrap {
    border: 1px solid var(--sw96-bd, #2a2a4a);
    border-radius: 14px;
    overflow: hidden;
}
.sw96-news-title {
    padding: 12px 16px;
    font-size: 14px; font-weight: 600;
    border-bottom: 1px solid var(--sw96-bd, #2a2a4a);
}
.sw96-news-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid;
    text-decoration: none;
    transition: filter .15s;
}
.sw96-news-item:hover { filter: brightness(1.1); }
.sw96-news-item:last-child { border-bottom: none; }
.sw96-news-headline { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.sw96-news-meta { font-size: 11px; }

/* ══ ERROR ══ */
.sw96-error {
    background: rgba(224,62,62,.1);
    border: 1px solid rgba(224,62,62,.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: #e03e3e;
    font-size: 13px;
    font-family: -apple-system, sans-serif;
}

/* ══ Responsive ══ */
@media (max-width: 600px) {
    .sw96-card  { max-width: 100%; }
    .sw96-price { font-size: 30px; }
    .sw96-table { font-size: 12px; }
    .sw96-table th, .sw96-table td { padding: 8px 8px; }
}
