/* Container & Table Base */
.tsp-data-container {
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 12px;
}

.tsp-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  letter-spacing: -0.02em; /* Tighten character spacing */
}

/* Base Cell Styling - Consolidating base properties */
.tsp-data-table th,
.tsp-data-table td {
  padding: 4px 7px;
  border-bottom: 1px solid #eee;
}

.tsp-data-table thead {
  background-color: #f8f9fa;
}

.tsp-data-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #555;
  letter-spacing: 0.05em;
}

/* Alignment Logic */
/* Default: Align first column to the left */
.tsp-data-table th:first-child,
.tsp-data-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: #333;
  min-width: 80px;
}

/* Align everything ELSE to the right */
.tsp-data-table th:not(:first-child),
.tsp-data-table td:not(:first-child) {
  text-align: right;
}

/* Positive and Negative Coloring */
.tsp-pos {
  color: #27ae60 !important;
  font-weight: 600;
}

.tsp-neg {
  color: #e74c3c !important;
  font-weight: 600;
}

/* Disclaimer text */
.tsp-disclaimer {
  color: #777;
  font-style: italic;
  line-height: 1.4;
  font-size: 0.9em;
}

/* --- Responsive Layout (Mobile Cards) --- */
@media screen and (max-width: 600px) {
  .tsp-data-table thead {
    display: none;
  }

  .tsp-data-table tr {
    display: block;
    border: 2px solid #eee;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden; /* Ensures background/borders follow radius */
  }

  .tsp-data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
    white-space: normal; /* Allow wrapping only on mobile cards if data is long */
  }

  .tsp-data-table td:last-child {
    border-bottom: none;
  }

  .tsp-data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #888;
    margin-right: 10px; /* Space between label and value */
  }
}
