/* main layout structure */

html {
	font-family: Helvetica, Verdana, 'Arial New', Arial, sans-serif;
	color: #000;
	background-color: #47b;
	margin: 0;
	padding: 0 3.5em; 
}
body {
	background: #edf2f8 no-repeat scroll;
	margin: 10px auto 8px;
	padding: 180px 32px 5px;
	max-width: 960px;
	border-right: 5px solid #257;
	border-bottom: 4px solid #257;
	border-radius: 20px;
}
h1 {
	color: #eff;
	background-color: #257;
	margin: 0px;
	padding: 3px 3px 0px 3px;
	display: inline;
}
h1 + p {
	font-size: smaller;
	color: #777;
	margin: 0px;
	padding-left: 4em;
	border-bottom: 1px solid #789;
	border-right: 10px solid #257;
	border-top: 2px solid #257;
}
h2 {
	font-size: 1.2em;
	margin: 20px 0px;
	color: #257;
	border-top: 2px solid #257;
	border-bottom: 1px solid #257;
	border-left: 10px solid #257;
	background-color: #dde2e8;
	padding: 1px 3px 2px 3px;
	width: 33%;
	text-align: center;
}

/* image lists */

ul.imagelinks, ul.imagelinks li {
	margin-left: 0px;
	padding-left: 0px;
	list-style-type: none;
}

/* links and related */

a, span.likelink {
	font-size: 0.8em;
	color: #257;
	padding: 1px 3px;
	text-decoration: none;
	border-bottom: 1px solid #adb2b8;
	border-right: 10px solid #adb2b8;
}
a:hover {
	background-color: #dde2e8;
	border-right-color: #257;
	border-bottom-color: #257;
}
ul.imagelinks a, span.likelink {
	display: block;
	margin: 5px;
	padding: 3px;
}
ul.imagelinks a img {
	float: left;
	margin: 0px 5px 0px 0px;
	border: 1px solid #257;
}
* html ul.imagelinks a, * html span.likelink { height: 1%; } /* IE 6 guillotine bug fix */

/* hack for lack of stretch-to-fit with floats */

span.clear-all {
	clear: left;
	height: 1px;
	overflow: hidden;
	display: block;
}
span.likelink {
	clear: left;
}

/* special cases */

/* Tibetan text, for browsers that don't know how to fontswitch */
span.tibet {
	font-family: "Tibetan Machine Uni", "Arial Unicode MS", Jomolhari, "OSX Tibetan", UTibetan, sans-serif;
}

/* images that are not in a link, such as maps */
p img {
	margin: 0.5em auto;
	display: block;
	border: 1px solid #000;
}

/* images that accompany blocks of text */
.accompanyment {
	float: right;
	clear: right;
}
.accompanyment a {
	display: block;
}

/* text input on translation tools and search */
input[type="text"] {
	width: 20em;
}
fieldset ul, fieldset li {
	margin: 0;
	padding: 0;
	list-style-type: none;
}

/* for underlining word fragments in pronunciation guides */
.parthighlighted em {
	font-weight: normal;
	font-style: normal;
	text-decoration: underline;
}

/* for showing hidden text without JS support */
a[onclick^="return showmore"]:active { content: attr(title); }

/* links to show slideshow and jump sections */
p.slideshowlink {
	text-align: center;
}

/* paging links */

ul.page-link {
	line-height: 2.5em;
}
ul.page-link li {
	display: inline;
	font-size: 0.8em;
}
ul.page-link a, ul.page-link span {
	padding: 0.5em 0.9em;
	border: 1px solid #adb2b8;
	font-size: 1em;
}
ul.page-link span {
	color: #bbb;
	border-color: #e0e0e0;
}
ul.page-link a:hover, ul.page-link li.current span {
	color: #257;
	background-color: #dde2e8;
	border-color: #257;
}

/* footer */

ul.bot-link, ul.bot-link li, ul.top-link, ul.top-link li, ul.page-link, ul.page-link li {
	margin-left: 0;
	padding-left: 0;
	text-align: center;
}

ul.bot-link li, ul.top-link li {
	display: inline;
	padding: 0 0.5em 0 0.9em; /* right padding is also beside a space, so left padding must be bigger */
	border-left: 1px solid black;
}

ul.bot-link li:first-child, ul.top-link li:first-child {
	padding-left: 0.5em; /* reset it on the first one so it's balanced with the last one */
	border-left-width: 0;
}

li.current a {
	background-color: #dde2e8;
	border-right-color: #257;
	border-bottom-color: #257;
}

/* data tables */

table, th, td {
	border: 1px solid #47b;
	border-collapse: collapse;
	padding: 2px;
	vertical-align: middle;
}
table.ranked tbody {
	counter-reset: rankings;
}
table.ranked tbody tr {
	counter-increment: rankings;
}
table.ranked tbody th + td::after {
	display: table-cell;
	content: " #"counter(rankings);
	float: right;
	font-size: smaller;
	color: #999;
}
tbody th {
	text-align: left;
}
thead th {
	background-color: #dde2e8;
}
caption {
	caption-side: bottom;
	font-size: smaller;
	font-weight: bold;
	font-variant: small-caps;
}
table.celllinks a {
	display: block;
}
var.grid, var.grid + var, var.grid + var + var {
	font-style: normal;
}
var.grid + var, var.grid + var + var {
	margin-left: 0.3em;
}
th.clickable a, th.sorted a {
	font-size: 1em;
	padding: 0;
	text-decoration: underline;
	border: 0px;
}
th.clickable a:hover {
	text-decoration: none;
}
th.sorted {
	background-color: #cdd2d8;
}
th.sorted a:hover {
	background-color: transparent;
}

/* data tables can use thumbnail images that expand when hovered */

td.thumb a {
	display: block;
	position: relative;
	height: 1em;
	width: 1.5em;
}
td.thumb img {
	max-height: 1em;
	max-width: 1.5em;
	border: none;
}
td.thumb a:hover {
	z-index: 2;
}
td.thumb a:hover img {
	max-height: none;
	max-width: none;
	position: absolute;
	right: 2em;
	top: 50%;
	margin-top: -30px;
	border: 1px solid #257;
}

/* grid ref info box */

tr.activerow th, tr.activerow td {
	background-color: #f6f87c; /* half way between background and yellow */
}
.gridinfo {
	position: absolute;
	top: 500px;
	left: 0;
	background-color: #f6f8fb;
	border: 1px solid black;
	border-radius: 7px;
	background-clip: padding-box; /* prevents antialiasing leaking the background */
	box-shadow: 0 5px 10px #222;
}
.gridinfo dl, .gridinfo dt, .gridinfo dd, .gridinfo h2 {
	margin: 0;
	padding: 0;
	border: none;
}
.gridinfo .closer {
	position: absolute; /* float makes IE 7 stretch width to the same as the viewport */
	right: 0.2em;
	top: 0.2em;
	padding: 0 0.2em;
	border: 1px solid #adb2b8;
}
.gridinfo h2 {
	padding-right: 1.3em; /* space for the closer button */
	white-space: nowrap;
	width: auto;
	border-bottom: 1px solid black;
	background-color: #cdd2d8;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}
.gridinfo dl {
	margin: 0.2em 0;
}
.gridinfo dt {
	background-color: #dde2e8;
	border-top: 1px solid #adb2b8;
	border-bottom: 1px solid #adb2b8;
	padding: 0 2px;
}
.gridinfo dd {
	white-space: nowrap;
	padding: 0 2px;
}
.gridunderlay {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: black;
	opacity: 0.5;
}

/* slideshow styles */

html.showingslides, html.showingslides body, div.slidelist, div.slideimage {
	background: #abc;
}
html.showingslides a {
	background: transparent;
	font-size: 1em;
	padding: 0;
	border-bottom-width: 0;
	border-right-width: 0;
}
div.prvnxt {
	padding: 4px 0;
}
div.prvnxt * {
  white-space: nowrap;
}
div.prvnxt a {
	margin: 0 5px;
	padding: 0 5px;
	text-decoration: none;
	background: #eee;
	color: #22c;
	border: 2px outset silver;
}
div.prvnxt label {
	margin: 0 5px;
}
div.prvnxt a:active {
	border-style: inset;
}
div.prvnxt a.closebutton {
	margin-top: -2px;
}
div.slidescroll {
	border-bottom: 1px solid #777;
}
div.slidescroll img {
	margin: 5px 10px;
	border: 1px solid black;
}
div.slidescroll a.current img {
	margin: 2px 7px;
	border: 4px solid #22c;
}
div.slideimage {
	/* prevent a margin collapse with the inner div */
	padding-top: 10px;
}
div.slideimage img {
	border: 1px solid black;
	margin: 0 10px 10px;
}
div.slideimage div.slidecaption {
	margin: 0 10px 10px;
}
div.rightshadow {
	position: fixed;
	z-index: 1;
	top: 0;
	bottom: 0;
	right: 0;
	width: 10px;
	background: url(rightfade.png) repeat-y top right;
}
div.bottomshadow {
	position: fixed;
	z-index: 1;
	left: 0;
	bottom: 0;
	right: 0;
	height: 10px;
	background: url(bottomfade.png) repeat-x bottom left;
}

@media print {
	/* printing route guides and galleries */
	html {
		background-color: #fff;
		margin: 0;
		padding: 0; 
	}
	body {
		background: #fff !important;
		margin: 0;
		padding: 0;
		max-width: none;
		border-right: none;
		border-bottom: none;
	}
	h1 {
		color: #000;
		background-color: #fff;
		margin: 0px;
		padding: 3px 3px 0px 3px;
		display: inline;
	}
	h1 + p {
		color: #000;
		margin: 0px;
		border-color: #bbb;
		border-right-width: 1px;
	}
	h2 {
		margin: 20px 10px;
		color: #000;
		border-top-color: #bbb;
		border-bottom-color: #bbb;
		border-left: 1px solid #bbb;
		background-color: #fff;
		padding: 0;
		width: 75%;
		page-break-after: avoid;
	}
	li {
		page-break-inside: avoid;
	}
	a, span.likelink {
		color: #000;
		background: transparent !important;
		border-bottom: 1px solid #bbb !important;
		border-right: none !important;
	}
	ul.top-link, ul.page-link, ul.bot-link, p.slideshowlink {
		display: none;
	}
	body:before {
		content: "www.cavinguk.co.uk";
		font-size: 10px;
		color: #bbb;
		position: absolute;
		top: 0;
		right: 0;
	}

	/* printing slideshows */
	html.showingslides, html.showingslides body, div.slidelist, div.slideimage {
		background: #fff;
	}
	html.showingslides body:before {
		position: static;
		display: block;
		text-align: right;
	}
	div.prvnxt {
		display: none;
	}
	div.slidelist, div.slidecaption {
		position: static !important;
	}
	div.slidescroll {
		border-bottom: none;
		white-space: normal !important;
		overflow: visible !important;
		height: auto !important;
		padding-bottom: 0 !important;
	}
	div.slidescroll a {
		border: none !important;
	}
	div.slidescroll a:after, div.slidescroll label:after {
		content: " ";
	}
	div.slidescroll img {
		margin: 5px 0;
	}
	div.slidescroll a.current img {
		margin: 2px 0;
	}
	div.slideimage {
		position: static !important;
		padding-top: 0;
		margin: 0 !important;
		page-break-inside: avoid;
	}
	div.slideimage img {
		box-sizing: border-box;
		max-width: 100%;
		margin: 0;
	}
	div.slideimage div.slidecaption, div.slideimage span {
		margin: 0;
		float: none !important;
		height: auto !important;
	}
	div.slideimage img {
		float: none !important;
	}
	div.rightshadow, div.bottomshadow {
		display: none;
	}
}