/* PiyasaDetay Akilli Haber Tablolari v1.0
   Opt-in only: <div class="pd-smart-table"><table>...</table></div>
   No changes to existing article tables or other components. */
.pd-article-content .pd-smart-table {
  box-sizing: border-box;
  width: 100%;
  max-width: 600px;
  margin: 26px auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border, #364152);
  border-radius: 10px;
  background: var(--surface, #171c24);
  box-shadow: none;
}
/* Column-aware sizes: 2 columns = 600px, 3 = 880px, 4+ = article width */
.pd-article-content .pd-smart-table:has(table tr > :nth-child(3)) {
  max-width: 880px;
}
.pd-article-content .pd-smart-table:has(table tr > :nth-child(4)) {
  max-width: 100%;
}
.pd-article-content .pd-smart-table > table {
  display: table; /* override theme's global display:block for tables */
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  box-shadow: none;
  overflow: visible;
  table-layout: auto;
}
.pd-article-content .pd-smart-table > table th,
.pd-article-content .pd-smart-table > table td {
  box-sizing: border-box;
  padding: 12px 15px;
  border-color: var(--border, #364152);
  line-height: 1.55;
  font-size: 14px;
  vertical-align: middle;
  overflow-wrap: break-word;
}
.pd-article-content .pd-smart-table > table tr > :first-child { border-left: 0; }
.pd-article-content .pd-smart-table > table tr > :last-child { border-right: 0; }
.pd-article-content .pd-smart-table > table tr:last-child > * { border-bottom: 0; }
.pd-article-content .pd-smart-table > table thead tr:first-child > * { border-top: 0; }
.pd-article-content .pd-smart-table > table th {
  font-weight: 700;
  background: var(--surface-soft, #202630);
  color: var(--text, #eef2f7);
}
/* Ticker + company name: compact first column, flexible second column */
.pd-article-content .pd-smart-table:not(:has(table tr > :nth-child(3))) > table tr > :first-child {
  width: 33%;
}
/* Wide datasets keep a readable minimum width on smaller displays. */
@media (max-width: 760px) {
  .pd-article-content .pd-smart-table { width: 100%; max-width: 100%; margin: 22px auto; }
  .pd-article-content .pd-smart-table > table th,
  .pd-article-content .pd-smart-table > table td { padding: 10px 12px; font-size: 13px; }
  .pd-article-content .pd-smart-table:has(table tr > :nth-child(3)) > table { min-width: 610px; }
  .pd-article-content .pd-smart-table:has(table tr > :nth-child(4)) > table { min-width: 760px; }
}
