/* common stuff */
body {
	background-color: #d8dbd7;
	color: black;
	font-family: sans-serif;
	margin: 1ex 1ex 0 1ex;
}

a {
	text-decoration: none;
}

a:link {
	color: #2030A2;
}

a:visited, a:active, a:hover {
	color: #202062;
}

a:active, a:hover {
	text-decoration: underline;
}

img, tt, form, pre {
	border: 0;
}

del {
	text-decoration: line-through;
}

caption {
	caption-side:top;
	margin: 1ex 0;
	text-align: left;
}

thead {
	color: white;
	background-color: #426477;
}

tbody tr:nth-child(EVEN) { /* alternate color for odd rows */
	background-color: #e9ede8;
}

input, button {
	border: 1px solid #bbb #755;
	border-radius: 0.75ex;
	-moz-border-radius: 0.75ex;
	background-image: -webkit-gradient(
		linear, left top, left bottom,
	    color-stop(0.70, #ffffff),
		color-stop(1, #e6e6e6)
	);
	background-image: -moz-linear-gradient(
		center top,
		#ffffff 70%,
		#e0e0e0 100%
	);
}

input.submit:hover, input.submit:active, button:hover, button:active {
	color: #444444;
	background-image: -webkit-gradient(
		linear, left bottom, left top,
	    color-stop(0.70, #fdfdfd),
		color-stop(1, #e0e0e0)
	);
	background-image: -moz-linear-gradient(
		center bottom,
		#fdfdfd 70%,
		#e0e0e0 100%
	);
}

label {
}

.pre { /* the diff content */
	white-space: pre-wrap;
	font-family: monospace;
	margin: 0;
}

#page { }

.error { /* error messages */
	color: #a52a2a;
}

.active {
	font-weight: bold;
	color: #e08c00;
}

/* ############### start of header ############## */
#whole_header { 
	background-color: white;
}

/* *** banner/deco above navbar *** */
#header { 
	display: inline-block;
	width: 100%;
	background-image: -webkit-gradient(
		linear, left bottom, left top,
	    color-stop(0.70, #ffffff),
		color-stop(1, #e6e6e6)
	);
	background-image: -moz-linear-gradient(
		center bottom,
		#fdfdfd 70%,
		#e0e0e0 100%
	);
}

#MastheadLogo {
	width: 167px;
	height: 43px;
	float: right;
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	background-position: -81px 0;
	margin: 0;
}

#pagetitle { /* short verbal summary/description of the shown content */
}

#filename { /* "Cross Reference: ..." */
	font-size: x-large;
	font-weight: bold;
	margin-right: 1em;
}

#Masthead { /* breadcrumb */
	clear: left;
	background-color: #426477;
	border: 1px solid #bbb;
}

#Masthead tt { /* slashes in the xref: line */
	color: #eee;
}

#Masthead a {
	color: white;
}

#sbar, #bar { /* full search and default navbar */
	border-bottom: 1px solid #bba;
	border-top: 1px solid #bba;
	background-color: #e9ede8;
	margin: 0;
	padding: 1ex 0;
	clear: both;
}

/* *** full search navbar *** */
#qtbl, #ptbl {
	display: inline-block;
	vertical-align: top;
} 

#qtbl tr {
	background: none; /* remove alternating colors */
}

#ptbl > p {
	text-align: center;
	white-space: nowrap;
	margin: 0.5ex 1ex;
}

#qtbl td:first-child {
    width: 10ex;
    text-align: right;
}

#qtbl td:nth-child(2) {
	width: 45ex;
}

#qtbl input.q {
	width: 100%;
}

#ptbl {
	margin-left: 2em;
}

#ptbl button {
	font-size: small;
}	

#ptbl button:first-of-type {
	margin-left: 1em;
}

#ptbl select {
	width: 100%;
}

#ptbl option {
	padding: 0 1ex;
}

#sbox {
	padding: 1ex 0;
	background-color: #D8DBD7;
}

#sbox > p:last-of-type {
	white-space: nowrap;
	/* 11ex = width(#qtbl td:first-child) + margin-left(body) */
	margin: 1ex 0 0.5ex 11ex;
}

#sbox > p:last-of-type > :nth-child(n+2) {
	margin-left: 1ex;
}

/* *** default navbar *** */
#bar {
	padding: 0.2em 0.5em;
}

#bar ul { /* every list item is displayed as a "menu" item */
	display: inline-block;
	list-style: none outside none;
	margin: 0;
	padding: 0;
	/* white-space: nowrap; */ /* hmm, sometimes good, sometimes not ;-) */
}

#bar li { /* menu item */
	display: inline-block;
	/* distance between label end and the icon of the next item */
	margin-right: 1ex;
}

#home, #history, #download { /* menu item icons */
	display: inline-block;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	margin-right: 0.25ex; /* distance between the icon and the label */
}

#home { /* h.gif */
	background-position: 0 0;
}

#history { /* l.gif */
	background-position: -18px 0;
}

#download { /* w.gif */
	background-position: -36px 0;
}

#line, #defbox, #bar .annotate { /* no icon available yet */
	width: 1px;
	height: 15px;
}

#line::before, #defbox::before, #bar .annotate::before {
	content: "|";
	padding-right: 0.25ex; /* distance between the icon and the label */
	color: black;
	font-size: large;
	font-weight: normal;
}

#search { /* q.gif */
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	background-position: -505px 2px;
	padding-left: 19px;
	min-height: 20px; /* 18px img + 2px padding */
}

#annotate.c, #history.c { /* indicate annotation/history available */
	color: #666;
}

input.q { /* text input fields */
	background-color: #fdfdfd;
	background-image: none;
}

input.submit { /* start search button */
	font-weight: bold;
	padding: 0.25ex;
}

button.help {
	padding: 0.25ex;
}

#sortfield {
	display: inline-block;
	margin-left: 6ex;
}

#sortfield label {
	margin-right: 1ex;
}
#sortfield label:after {
	content: ": ";
}

#sortby li:nth-child(n+2) :first-child::before {
	content: "|";
	padding: 0 1ex 0 0;
	color: black;
	font-size: large;
	font-weight: normal;
}
/* ############### end of header ############## */


/* ############### start of content ############## */
#content {
	position: fixed;
	left: 0;
	right: 0;
	overflow: auto;
	padding: 1ex; /* should be the same as body's margin */
}


/* *** help page *** */
#help dfn { /* definitions */
	text-decoration: underline;
}

#help .fields, #help .example {
	margin-left: 3em;
}

#help dt {
	font-weight: bold;
}


/* *** more page ***/
#more {
	line-height: 1.25em;
	background-color: white;
}

#more b { /* highlight matches */ 
	background-color: #ffff99;
}


/* *** history page *** */
table#revisions {
	/* width: 100%; */ /* table with the history info for a file */
	/* border-collapse: collapse; */ /* looks better with a small divider */
}

#revisions a.h	{ /* modified file list content */
	font-size: small;
	margin-left: 2em;
}

#revisions .filelist { /* "Show modified files" */
	display: inline;
	color: #ffdd80;
}

#revisions .filelist-hidden { /* "Hide modified files" */
	display: none;
}

#revisions tbody td:first-child {
	/* rev number - git/mercurial revs numbers look bad with prop. fonts */
	font-family: monospace;
	text-align: right;
}

#revisions tbody td:nth-child(2), #revisions tbody td:nth-child(3) {
	/* Compare and Date column */
	text-align: center;
}

#revisions tbody td:nth-child(4) { /* author column */
	padding: 0 1ex;
	text-align: center;
}

.rssbadge { /* RSS/XML Feed on history page */
	text-align: right;
	margin: 1ex 0;
}


/* *** diff page *** */
#diffbar { /* diff navbar: contains the tabs to select diff format */
	margin-top: 1.5ex;
	border-bottom: 1px solid #999;
	white-space: nowrap;
}

#diffbar .d, #difftable .d {
	/* "Deleted" heading + highlight of deleted text in diff lines */
	background-color: #ffcc40;
}

#diffbar .a, #difftable .a {
	/* "Added" heading + highlight of added text in diff lines */
	background-color: #8bd98b;
}

#diffbar .legend, #diffbar .tabs, #diffbar .ctype {
	display: inline-block;
}

#diffbar .legend {
	/* bottom must be the same as .tabs span(padding-bottom) */
	margin: 0 3ex 0.75ex 1ex;
}

#diffbar .legend span, #diffbar .ctype span {
	padding: 0.2ex 1ex; /* bottom must be less than margin-bottom(.legend) */
}

#diffbar .tabs span {
	padding: 0.75ex 1ex;
	margin-left: 1ex;
	border: 1px solid #999; /* should be the same as for #diffbar above */
	border-radius: 0.75ex 0.75ex 0 00;
	-moz-border-radius: 0.75ex 0.75ex 0 00;
	background-color: #f5f5dc; /* navbar like */
}

#diffbar .tabs span.active, #diffbar .ctype span.active {
	background-color: #426477; /* same as for table th */
}

#diffbar .tabs span.active {
	border-bottom-style: dashed;
}

#diffbar .ctype {
	margin-left: 3ex; /* see margin-left .legend */
}

#diffbar .ctype span {
	border: 1px solid #755; /* same as for input */
	border-radius: 0.75ex;
	-moz-border-radius: 0.75ex;
	background-color: #f5f5dc; /* navbar like */
	margin-left: 1ex;
}

#difftable {
	font-size: small;
}

#difftable table { /* left side == prev. rev; right side "current" rev */
	table-layout: fixed;
	border-collapse: collapse;
}

#difftable table th { /* usually both rev. have changes: eq. space for both */
	padding-top: 1ex;
	width: 50%;
}

#difftable th:last-child, #difftable td:last-child {
	border-left: 1px solid black;
}

#difftable .plain td {
	padding: 2px;
}

#difftable .image td {
	padding: 5px;
}

#difftable .k { /* border between the context and real diff lines */
	border-bottom: 1px dashed #ccc;
}


/* *** list aka xref stuff *** */

/* directory listing */
table#dirlist { /* the "Name" column */
	font-family: monospace;
	border-style: none;
	border-collapse: collapse;
}

#dirlist .r, #dirlist .p {
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	width: 15px;
	height: 15px;
	padding: 0;
	vertical-align: middle;
	margin: 0 1ex 0 1em;
}

#dirlist .r { /* directory name, d.gif */
	background-position: -54px 0;
}

#dirlist .p { /* file name, p.gif */
	background-position: -69px 0;
}

#dirlist td:nth-child(n+2) { /* all but the first column */
	padding-right: 1em;
}

#dirlist tbody td:nth-child(4) {
	text-align: right; /* CSS3 may allow " " (single space char) */
}


/* file display */
#src {
	background: white;
}

#src pre {
	margin: 0;
}

#src .l-hide, #src .hl-hide, .blame-hidden { /* hidden line number/annotation block */
	display: none
}

#src .l, #src .hl, .blame .r, .blame .a,
#results .l, #more .l,
#difftable i, del.d { /* line number/annotation block */
	display: inline-block;
	width: 6ex;
	text-align: right;
	padding: 0 1ex;
	margin-right: .5ex;
	background-color: #e9ede8;
	border-right: 1px solid #ddd;
	color: #888;
}

#src .hl { /* highlighted line number */
	color: #000;
}

.blame .r { /* revision number "column" (annotation) */
	text-align: right;
}

.blame .a { /* author name "column" (annotation) */
	text-align: center;
}

/* source code highlighting - see org/opengrok/analysis/$lang/*Xref.lex */
#src .n		{ /* numbers/label */	color: #a52a2a; } 
#src .s		{ /* strings */			color: green; } 
#src .c		{ /* comment */			color: #666; }
#src .b		{ /* heading/title/bold */	color: #000; font-weight: bold; }
#src .k		{ /* block display */ 	color: #000; font-family: monospace; }
#src a.d	{ /* symbol definition */	color: #909; font-weight: bold; }

a.xm	{ /* macro */			color: #c66; font-weight: bold; }
a.xa	{ /* argument */		color: #60c; font-weight: bold; }
a.xl	{ /* local */			color: #963; font-weight: bold; }
a.xv	{ /* variable */		color: #c30; font-weight: bold; }
a.xc	{ /* class */			color: #909; font-weight: bold; font-style: italic; }
a.xp	{ /* package */			color: #909; font-weight: bold; font-style: italic; }
a.xi	{ /* interface */		color: #909; font-weight: bold; font-style: italic; }
a.xn	{ /* namespace */		color: #909; font-weight: bold; font-style: italic; }
a.xe	{ /* enum */			color: #909; font-weight: bold; font-style: italic; }
a.xer	{ /* enumerator */		color: #909; font-weight: bold; font-style: italic; }
a.xs	{ /* struct */			color: #909; font-weight: bold; font-style: italic; }
a.xt	{ /* typedef */			color: #909; font-weight: bold; font-style: italic; }
a.xts	{ /* typedefs */		color: #909; font-weight: bold; font-style: italic; }
a.xu	{ /* union */			color: #909; font-weight: bold; font-style: italic; }
a.xfld	{ /* field */			color: #090; font-weight: bold; }
a.xmb	{ /* member */			color: #090; font-weight: bold; }
a.xf	{ /* function */		color: #00f; font-weight: bold; }
a.xmt	{ /* method */			color: #00f; font-weight: bold; }
a.xsr	{ /* subroutine */		color: #00f; font-weight: bold; }

#man table, #man td  { /* #man == troff src */
	background-color: #ddddcc;
	border: 1px;
	padding: 2px;
}

#man p { /* a troff paragraph */
	margin-top: 0.5em;
	margin-bottom: 0;
}

#man div.b { /* man section headings etc. */
	margin-top: 2em;
}

#man div.rs { /* a right-shifted block */
	margin-left: 3em;
	margin-bottom: 1em;
}

/* "Navigate" Popup */
.sym_list_style {
	position: absolute;
	top: 100px;
	left: 100px;
	width: 100px;
	height: 100px;
	overflow: auto;
	z-index: 10;
	border: solid 1px #c0c0c0;
	background-color: rgba(255,255,204,0.75);
	color: #000;
	font-size: 12px;
	font-family: monospace;
	padding: 5px;
}

.sym_list_style_hide {
	display: none;
}

/* search result page */
#results {
	background: white;
	padding: 1ex 0;
}

#results p { /* pagetitle and slider */
	padding: 0.5em;
}

#results table {
	border-collapse: collapse;
	width: 100%;
}

#results .dir { /* directory row above matched files */
	background-color: #cdcecd;
}

#results .dir td { /* directory link */
	padding-left: 1em;
}

#results td.q { /* 1st column: H A D */
	white-space: nowrap;
	font-size: xx-small;
	padding: 3px;
	width: 3em;
}

#results td.f { /* 2nd column: filename */
	width: 3em;
	padding: 3px 0.5em 3px 2em;
}

#results .con { /* 3rd column: line number + matched line contents */
	font-size: small;
}

#results .con .all {
	margin-left: 6ex; /* width(#src .l) + 1ex */ 
}

#results .s, #more .s { /* matched line contents */
	color: #000;
}

#results i { /* match type description (method, interface etc.) */ 
	color: green;
	font-weight: bold;
}

#results .sel { /* slider item for the shown search result page */
	background-color: #a3b8cb;
	border: 1px solid #333366;
	padding: .5em;
	margin: 1px;
}

#results .more { /* slider item for the n-th search result page */
	border: 1px #ccc solid;
	padding: .3em;
	margin: 1px;
}

/* ############### start of footer ############## */
#footer {
	color: #777777;
	font-size: small;
	margin: 0 0 1ex 0;
	border-top: 1px solid #dddddd;
	background-image: -webkit-gradient(
		linear, left top, left bottom,
	    color-stop(0.70, #ffffff),
		color-stop(1, #e6e6e6)
	);
	background-image: -moz-linear-gradient(
		center top,
		#ffffff 70%,
		#e6e6e6 100%
	);
}

#footer p { /* footer text */
	padding: 0;
	margin: 0.2em;
	text-align: center;
}

#fti { /* servedby.png */
	display: inline-block;
	width: 177px;
	height: 37px;
	vertical-align: middle;
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	background-position: -248px 0;
}
#rssi { /* rss.png */
	display: inline-block;
	width: 80px;
	height: 15px;
	vertical-align: middle;
	background-image: url(./img/combined.png);
	background-repeat: no-repeat;
	background-position: -425px 0;
}
/* ############### end of footer ############## */
