/**
 * Formatting of tables, rows and cells
 * As this is intended to define reusable table formats it does not include cell formatting specific to individual items (see podcastviews.css)
 **/

/* Tables will normally have borders, so have margins to align the borders with surrounding text */
table {
  width: calc(100% - 1rem);
  margin: 0 0.5rem;
  border-collapse: collapse;
  table-layout: fixed;					/* Cells will be equal width unless specified */
}

.centred  {
  /* set auto left and right margins */
  margin-left: auto;
  margin-right: auto;
}

/* Full-width (no margin) tables */
/* Used for tables used to present rows of images aligned with associated text, or used for navigation purposes */
/* - relies on cell padding to do the actual alignment. */
.borderless,
.images,
.context-whos-who table {
	width: 100%;
	margin: 0;
}

.context-ssgu table,
.context-news table {
  table-layout: auto;					/* Override default that columns are equal width */
}

/* Set top margin on navigation tables in case preceded by img that has no bottom margin */
table.navigation  {
	margin-top: 1rem;
}

/* Contact form table used to present phone and address details - cellpadding=4 so reduce margin to align with text below it */
.path-contact table  {
  margin: 0 0.25rem;
}

#block-views-block-series-sermons-table table,
.view-ccnm-sermons table.views-table,
table.sermon-navigation,
table.navigation {
  background-color: var(--colour-whitesmoke);  		/* "white smoke" */
}

tr.even {
  background-color: #e0e0e0;
}

/* Rows */
/* Define a thin 'CCNM grey' border for the top of the bottom of each row in a views table, by default */
.views-table tr  {
  border-top: 1px solid #C5C5C5;
  border-bottom: 1px solid #C5C5C5;  
  background-color: white;
}

/* Highlight row (colour light grey) in views tables when the mouse hovers over it */
.views-table tr:hover  {
	background-color: #e6e6e6;
}

/* Striped table features alternating light/dark grey rows */
.striped tr  {
	border-bottom: 1px solid #ccc;
}

.striped tbody tr:first-child  {			/* First row should have the same top border */
	border-top: 1px solid #ccc;
}

.striped tbody tr:nth-child(even)  {
	background-color: #e0e0e0;
}

.striped tbody tr:nth-child(odd)  {
	background-color: #ededed;
}

/* Cells */
th {
    background-color:#e6e6e6;
}

/* Standard padding of 0.5rem for cells (heading and main body) */
th, td  {
	padding: 0.5rem;
}

/* Standard border tables */
.context-ssgu td, 
.context-ssgu th {
	border: 1px solid #b3b3b3;
} 

.sermon-navigation td {
  border: 1px solid #cccccc;
  text-align: center;
  padding: 0.5rem;
}

td p {
  margin: 0.5rem;
}

td.views-field  {
	font-size: 0.875rem;			/* 14px */
}

/* Cells in the Who's Who table - bottom padding to space out the entry for each person */
.context-whos-who td  {
  padding-bottom: 1.5rem;
}

td.views-field-field-ccnm-group-logo  {
  min-width: 120px;
}

/* Formatting specific for small screens i.e. smartphone (portrait) */
@media all and (max-width: 479px)  {

.section-preaching table {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
} 

.images,
.views-table {
  width: calc(100% - 1rem);
  margin: 0 0.5rem;
}

.images tbody, 
.images tr {
  display: block;
  width: 100%;
}

.images td  {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0;
} 

}
/* End of formatting specific for small screens i.e. smartphone (portrait) */
/* @media all and (max-width: 479px) */

@media all and (max-width: 959px)  {
	
}

/* Formatting specific for larger screens */
@media all and (min-width: 960px)  {
	
.context-news table {
	width: 100%;
	margin: 0;
}

}
/* End of (min-width: 960px) formatting */