/* ECB Widget */
.ecb-widget {
    margin-top: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    font-size: 14px;
}

/* Header */
.ecb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.ecb-head-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.ecb-logo {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: #f1f5f9;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

.ecb-title {
    margin: 0 0 1px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.ecb-sub {
    margin: 0;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.3;
}

.ecb-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.58rem;
    font-weight: 600;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}

/* Table */
.ecb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ecb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}

.ecb-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ecb-table thead th {
    padding: 7px 10px;
    font-size: 0.63rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    text-align: center;
}

.ecb-table thead th:first-child {
    text-align: start;
}

.ecb-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}

.ecb-table tbody tr:last-child {
    border-bottom: none;
}

.ecb-table tbody tr:hover {
    background: #f8fafc;
}

/* Currency cell */
.ecb-td-cur {
    padding: 9px 10px;
}

.ecb-cur-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.ecb-flag {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,.07);
}

.ecb-cur-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.ecb-cur-code {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e3a5f;
    unicode-bidi: embed;
    line-height: 1.2;
}

.ecb-cur-name {
    font-size: 0.66rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ecb-cur-link:hover .ecb-cur-code { color: #0369a1; }

/* Price cells */
.ecb-td-price {
    padding: 9px 10px;
    text-align: center;
    vertical-align: middle;
}

.ecb-val {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: embed;
    line-height: 1.2;
}

.ecb-chg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: embed;
    white-space: nowrap;
    margin-top: 2px;
}

.ecb-chg.up     { color: #16a34a; }
.ecb-chg.down   { color: #dc2626; }
.ecb-chg.same,
.ecb-chg.stable { color: #94a3b8; }

/* Footer */
.ecb-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ecb-updated {
    font-size: 0.67rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.ecb-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e3a5f;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: background .15s;
}

.ecb-more:hover { background: #dbeafe; color: #1e3a5f; }

@media (max-width: 360px) {
    .ecb-table thead th,
    .ecb-td-cur,
    .ecb-td-price { padding: 8px 8px; }

    .ecb-val { font-size: 0.82rem; }
    .ecb-cur-code { font-size: 0.73rem; }
}
