/* ── Easy Stock Charts ────────────────────────────────────────────────────── */

.esc-wrap {
    display: block;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

/* ── Table title ──────────────────────────────────────────────────────────── */

.esc-table__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Base table ───────────────────────────────────────────────────────────── */

.esc-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

/* ── Header row ───────────────────────────────────────────────────────────── */

.esc-table__head-row {
    border-bottom: 1px solid currentColor;
}

.esc-table__th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 10px;
    white-space: nowrap;
    opacity: 0.55;
}

.esc-table__th--company  { padding-left: 15px; }
.esc-table__th--price    { padding-right: 15px; }

.esc-table__th--change,
.esc-table__th--price {
    text-align: right;
}

/* ── Body rows ────────────────────────────────────────────────────────────── */

.esc-table__row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.esc-table__td {
    padding: 10px 10px;
    vertical-align: middle;
    white-space: nowrap;
}

.esc-table__td--company {
    padding-left: 15px;
    white-space: normal;
    word-break: break-word;
    width: 100%;
}

.esc-table__td--change {
    text-align: right;
}

.esc-table__td--price {
    text-align: right;
    font-weight: 500;
    padding-right: 15px;
}

/* ── Bold row modifier ────────────────────────────────────────────────────── */

.esc-table__row--bold .esc-table__td {
    font-weight: 700;
}

/* ── Highlight row modifier ───────────────────────────────────────────────── */

.esc-table__row--highlight .esc-table__td {
    background-color: rgba(0, 100, 255, 0.06);
}

.esc-table__row--highlight .esc-table__td:first-child {
    padding-left: 12px;
    border-left: 3px solid #0064ff;
}

/* ── Up / down colours ────────────────────────────────────────────────────── */

.esc-up   { color: #16a34a; }
.esc-down { color: #dc2626; }

/* ── Light theme ──────────────────────────────────────────────────────────── */

.esc-table--light {
    color: #111827;
}

.esc-table--light .esc-table__row {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.esc-table--light .esc-table__row--highlight .esc-table__td {
    background-color: rgba(0, 100, 255, 0.05);
}

/* ── Dark theme ───────────────────────────────────────────────────────────── */

.esc-table--dark {
    color: #e5e7eb;
}

.esc-table--dark .esc-table__row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.esc-table--dark .esc-table__row--highlight .esc-table__td {
    background-color: rgba(100, 160, 255, 0.1);
}

.esc-table--dark .esc-table__row--highlight .esc-table__td:first-child {
    border-left-color: #60a5fa;
}

.esc-table--dark .esc-up   { color: #4ade80; }
.esc-table--dark .esc-down { color: #f87171; }

/* ── Hidden rows (load more) ──────────────────────────────────────────────── */

.esc-row--hidden {
    display: none;
}

/* ── Load more button ─────────────────────────────────────────────────────── */

.esc-load-more {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 15px;
    background: none;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    text-align: center;
}

.esc-load-more:hover {
    opacity: 1;
}

/* ── Error notice ─────────────────────────────────────────────────────────── */

.esc-error {
    color: #dc2626;
    font-style: italic;
}
