/*
 * GarfNet Info DB stylesheet.
 *
 * Presentation for tables produced by the [garf-info] shortcode.
 */


/* -------------------------------------------------------------
 * Outer table wrapper
 * ------------------------------------------------------------- */

.garf-info-table-wrap {
	overflow-x: auto;
	width: 100%;
	margin: 1em 0;
}


/* -------------------------------------------------------------
 * Main table
 * ------------------------------------------------------------- */

.garf-info-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: auto;
}


/* -------------------------------------------------------------
 * Table headings
 * ------------------------------------------------------------- */

.garf-info-table th {
	padding: 0.6em 0.75em;
	text-align: left;
	font-weight: 600;
	vertical-align: bottom;

	border: 0;
	border-bottom: 2px solid #999;

	background: transparent;
	color: inherit;

	white-space: normal;
}


/* -------------------------------------------------------------
 * Sortable headings
 *
 * Make them look like ordinary table headings rather than
 * WordPress/theme buttons.
 * ------------------------------------------------------------- */

.garf-info-table th a,
.garf-info-table th button {
	display: inline;

	padding: 0 !important;
	margin: 0 !important;

	border: 0 !important;
	border-radius: 0 !important;

	background: transparent !important;
	background-image: none !important;

	color: inherit !important;
	font: inherit;
	font-weight: inherit;

	text-decoration: none;

	box-shadow: none !important;
	text-shadow: none;

	cursor: pointer;
}


/* Hover/focus should still look like a heading */

.garf-info-table th a:hover,
.garf-info-table th a:focus,
.garf-info-table th button:hover,
.garf-info-table th button:focus {
	padding: 0 !important;
	margin: 0 !important;

	background: transparent !important;
	color: inherit !important;

	text-decoration: underline;

	box-shadow: none !important;
	outline-offset: 2px;
}


/* -------------------------------------------------------------
 * Sort indicators
 * ------------------------------------------------------------- */

.garf-info-sort-indicator {
	display: inline-block;

	margin-left: 0.35em;

	font-size: 0.75em;
	line-height: 1;

	opacity: 0.65;

	vertical-align: middle;
	white-space: nowrap;
}

.garf-info-sort {
	white-space: normal;
	text-align: left !important;
}


/* -------------------------------------------------------------
 * Table cells
 * ------------------------------------------------------------- */

.garf-info-table td {
	padding: 0.5em 0.75em;

	text-align: left;
	vertical-align: top;

	border: 0;
	border-bottom: 1px solid #ddd;

	overflow-wrap: normal;
	word-break: normal;
	white-space: normal;	
}


/* -------------------------------------------------------------
 * Alternating rows
 * ------------------------------------------------------------- */

.garf-info-table tbody tr:nth-child(even) {
	background-color: rgba(0, 0, 0, 0.035);
}


/* -------------------------------------------------------------
 * Row hover
 * ------------------------------------------------------------- */

.garf-info-table tbody tr:hover {
	background-color: rgba(0, 0, 0, 0.07);
}


/* -------------------------------------------------------------
 * Error messages
 * ------------------------------------------------------------- */

.garf-info-error {
	padding: 0.75em 1em;

	border-left: 4px solid #c00;

	background: #f8f8f8;
	color: #333;
}


/* -------------------------------------------------------------
 * Audio controls
 * ------------------------------------------------------------- */

.garf-info-table audio {
	max-width: 100%;
}
