/* ==========================================================================
  tables
  Redefine tables here.
 ========================================================================== */

.data-table--nowrap table.data-table th,
table.data-table.data-table--nowrap th {
	white-space: nowrap;
}

// /* Actions
//  ========================================================================== */

.data-table__actions {
	padding: 1rem;

	.data-table__action__toggle {
		background-color: $white;
	}

	&.data-table__actions--top,
	&.data-table__actions--bottom {
		margin: 0 !important;
	}
}

.data-table__actions--top {
	border-bottom: 1px solid $blue-gray-light;
}

.data-table__actions--bottom {
	border-top: 1px solid $blue-gray-light;
}

// /* nested
//  ========================================================================== */

.data-table.data-table--zebra td.data-table--nested,
.data-table.data-table--lined th.data-table--nested {
  padding: 0 !important;

  > table tr {
    background-color: transparent;

    &:last-child {
      border-bottom: none;
    }
  }

  > table thead {
  	border: none;
  }

  > table thead tr {

  	&:first-child {
  		border-top: none;
  	}
  	border-bottom-width: 1px;
  }
}


// /* Tighter tables
//  ========================================================================== */

.data-table.data-table--tight {
	th,
	td {
		font-size: 1.5rem;
		padding: 1rem 0.8rem;
	}
}

// /* Links in tables
//  ========================================================================== */

.data-table tbody a:not(.button) {
  color: $primary-blue;
  text-decoration: underline;

  &:focus,
  &:hover {
  	color: lighten($primary-blue, 5%);
  }
}

/* Draggable tables
 ========================================================================== */

tr[draggable="true"].draggable-object td {
	cursor: grab;

	&:focus {
		cursor: crosshair;
	}
}

tr[draggable="true"].draggable-object.is-dragging-object td {
	cursor: grabbing;
}
