/* Table */
.json-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.json-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: none;
}

.json-table tr {
  border-bottom: 1px solid #ddd;
}

.json-table th,
.json-table td {
  padding: 8px;
  text-align: center;
  border: none;
}

.json-table thead th {
  font-weight: 400;
}

.json-table tbody th,
.json-table tbody td {
  font-size: 16px;
  font-weight: 600;
}

.json-table tbody tr td:first-child,
.json-table tbody tr th:first-child {
  color: #020202;
}

.json-table tbody td:not(:first-child) {
  color: #db2b3e;
}

.json-table tbody th:not(.group-header th) {
  text-align: center;
}

.group-header th {
  text-align: left !important;
  color: #db2b3e !important;
}

.json-table-error,
.json-table-empty,
.json-table-field-error,
.json-table-field-empty {
  padding: 20px;
  text-align: center;
  color: #888;
}

.json-table-error,
.json-table-field-error {
  color: #d9534f;
}

/* Graphs */
.json-chart-container {
  width: 100%;
  height: 400px;
  margin-bottom: 20px;
  position: relative;
}

.json-chart-line,
.json-chart-multi,
.json-chart-radar,
.json-chart-bar,
.json-chart-doughnut,
.json-chart-polar {
  width: 100%;
  height: 100%;
}

.chart-legend {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  margin: 0 10px 10px 0;
}

.chart-legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  border-radius: 3px;
}

/* Visualization Controls */
.json-visualization-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.json-visualization-controls {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}

.json-visualization-controls-container {
  margin-bottom: 15px;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 10px;
}

.vis-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  color: #555 !important;
  border: 1px solid #ddd !important;
  border-width: 1px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  margin: 0 4px 0 0 !important;
  box-shadow: none !important;
}

.vis-button:hover {
  background-color: #f9f9f9 !important;
  border-color: #dd2341 !important;
}

.vis-button.active {
  background-color: #dd2341 !important;
  border-color: #dd2341 !important;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15) !important;
}

.vis-button svg {
  width: 20px !important;
  height: 20px !important;
  fill: #555 !important;
}

.vis-button:hover svg {
  fill: #dd2341 !important;
}

.vis-button.active svg {
  fill: #fff !important;
}

.json-visualizations {
  position: relative;
}

.json-vis-panel {
  width: 100%;
}

.json-table-title {
  margin-bottom: 15px;
}

.json-table-caption {
  margin-top: 10px;
  font-style: italic;
  color: #666;
}

.json-visualization-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: nowrap;
}

.json-visualization-header .json-table-title {
  margin-bottom: 0;
  margin-right: 15px;
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: calc(100% - 200px);
}

.json-visualization-controls-container {
  flex-shrink: 0;
  width: auto;
  align-self: flex-start;
}

@media (max-width: 768px) {
  .json-visualization-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .json-visualization-header .json-table-title {
    max-width: 100%;
    margin-bottom: 10px;
    margin-right: 0;
  }

  .json-visualization-controls-container {
    justify-content: flex-end;
    width: 100%;
  }
}

.json-table-group-filter {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.json-table-group-filter label {
  margin: auto 20px auto;
}
select.json-group-selector {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  min-width: 200px;
}

/* Edit Link */
.json-table-edit-link {
  display: inline-block;
  margin-left: 8px;
  color: #666;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  vertical-align: middle;
  font-size: 1rem
}

.json-table-edit-link:hover {
  opacity: 1;
  color: #0073aa;
}

.json-table-edit-link svg {
  width: 16px;
  height: 16px;
  vertical-align: baseline;
}

/* Responsive - ocultar en móviles si es necesario */
@media (max-width: 768px) {
  .json-table-edit-link {
    display: none;
  }
}
