/* 
article styles
Colorado Encyclopedia 
Greg Vogl 2017-02-06
*/

/* local links in articles should be bold */
article.node-encyclopedia-article .group-body a[href^="/"]:not([href$=".xml"]),
article.node-encyclopedia-article .group-body a:not([href^="http"]):not([href^="#"]):not([href$=".xml"]),
article.node-encyclopedia-article .group-body a[href*="coloradoencyclopedia.org"] { font-weight: bold; }

/* article fields */
.node-encyclopedia-article .field-type-entityreference { margin-top: 1em; }
.node-encyclopedia-article .field-name-field-author .field-items { font-size: 1.4em; font-weight: bold; }
.node-encyclopedia-article .field-name-field-author { margin-bottom: 1em; }

.node-encyclopedia-article .field-name-field-author .field-item { display: inline; }
.node-encyclopedia-article .field-name-field-author .field-item:after { content: ','; margin-right: 0.2em; }
.node-encyclopedia-article .field-name-field-author .field-item:last-child:after { content: ''; }

/* related articles */
#block-views-related-articles-block { margin-bottom: 1em; }
#block-views-related-articles-block h2 { font-size: 1.7em; }
.view-related-articles .view-content { min-height: 160px; max-height: 460px; overflow-x: hidden; }
.view-related-articles .views-row { display: inline-block; width: 130px; }
.view-related-articles .views-field-encyclopedia-image { display: inline-block; height: 100px; vertical-align: bottom; }
.view-related-articles .views-field-title { display: inline-block; height: 50px; vertical-align: top; line-height: 1.2em; font-size: 0.85em; }

/* table of contents */
#toc { border: 1px solid #cde; padding: 10px; background-color: white; border-radius: 5px; }
#toc h2 { margin-top: 0; }
#toc ul, #toc li { list-style: none none; margin: 0; padding: 2px 0; line-height: 1.3em; }
#toc li.indent { margin-left: 10px; }
#toc li.indent2 { margin-left: 20px; }

/* responsive voice page reader */
#rv { float: right; }
#read-page { border: 1px solid #cde; border-radius: 5px; background-color: white; cursor: pointer; }

/* article images slider */
.region-help { border: 0; margin: 0; padding: 0; }
.node-type-encyclopedia-article .flexslider { text-align: center; }
.node-type-encyclopedia-article .flexslider { border: 0; box-shadow: none; }
.node-type-encyclopedia-article .flexslider img { max-height: 360px; width: auto; margin: 0 auto; }
.node-type-encyclopedia-article .field-group-htab .flexslider { font-size: 0.7em; }
.node-type-encyclopedia-article:not(.page-node-edit) .flexslider { font-size: 0.6em; }
.node-type-encyclopedia-article #content .field-group-htab .flexslider h2 { font-size: 1.1em; font-weight: normal; }
.node-type-encyclopedia-article .flexslider .flex-caption { display: none; }
.field-name-field-encyclopedia-image img, .views-field-field-encyclopedia-image img { border: 1px solid #ccc; }

/* WorldCat links in article references and additional information */
a.worldcat { color: #333 !important; }
a.worldcat:hover { padding-right: 20px; background: url(/sites/all/themes/rbce/worldcat.gif) center right no-repeat; }

/* hide fields for non-logged-in users */
/*.not-logged-in .field-name-field-article-geo,*/
.not-logged-in .field-name-field-person,
.not-logged-in .field-name-field-place,
.not-logged-in .field-name-field-event,
.not-logged-in .field-name-field-thing,
.not-logged-in .field-name-field-theme,
.not-logged-in .field-name-field-article-category,
.not-logged-in .field-name-field-keyword, 
.not-logged-in .field-name-field-article-county 
{ display: none; }

/* article edit fields */
#encyclopedia-article-node-form #edit-field-author,
#encyclopedia-article-node-form #edit-field-grade-level,
#encyclopedia-article-node-form #edit-field-theme,
#encyclopedia-article-node-form #edit-field-article-category,
#encyclopedia-article-node-form #edit-field-person,
#encyclopedia-article-node-form #edit-field-place,
#encyclopedia-article-node-form #edit-field-event,
#encyclopedia-article-node-form #edit-field-thing
 { display: inline-block; }

/* leveled article tabs */
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs { border-width: 0; }
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs ul.horizontal-tabs-list { background-color: white; border-width: 0; } 
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs ul.horizontal-tabs-list li { font-size: 0.6em; border-width: 0; background: white; float: right; } 
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs ul.horizontal-tabs-list li a strong { font-weight: normal; }
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs ul.horizontal-tabs-list li.selected a strong { font-weight: bold; }
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs fieldset.field-group-htab { margin: 0; padding: 0; border-width: 0; }
body.node-type-encyclopedia-article:not(.page-node-edit) div.horizontal-tabs fieldset.field-group-htab .fieldset-wrapper { margin: 0; padding: 0; }

/* hide leveled images, references and additional information for now */
#edit-field-article-image-4th-grade, #edit-field-article-image-8th-grade, #edit-field-article-image-10th-grade, 
#edit-field-references-4th-grade, #edit-field-references-8th-grade, #edit-field-references-10th-grade,
#edit-field-additional-information-4th, #edit-field-additional-information-8th, #edit-field-additional-information-10t 
{ display: none !important; }

/* teacher resources tab */
.teacher-resources #rv, .teacher-resources #toc, .teacher-resources .group-metadata, .teacher-resources #block-views-related-articles-block { display: none; }
.teacher-resources #flexslider-1 { margin-bottom: 10px; float: right; max-width: 400px; }
.teacher-resources .group-teacher-resources { top: 0; }
.teacher-resources .group-teacher-resources .flexslider { margin-bottom: 0; }
.field-name-field-teacher-resources { min-width: 300px; }

/* hide comments entirely for now */
#comments { display: none; }

body[class*="page-articles-edit"] select[id*="field-article-image"],
body[class*="page-images-list-edit"] input[id*="field-location"],
body[class*="page-images-list-edit"] input[id*="field-image-source"]
{
    width: 20em;
}
#edit-field-keyword-target-id {
    width: 5em;
}

/* body image captions */
.field-name-body .caption, .field-name-field-4th-grade .caption, .field-name-field-8th-grade .caption, .field-name-field-10th-grade .caption { display: inline-block; text-align: center; }
.field-name-body .caption p, .field-name-field-4th-grade .caption p, .field-name-field-8th-grade .caption p, .field-name-field-10th-grade .caption p { margin: 0; padding: 0; font-size: 0.9em; }

/* poets */
.node-poet { font-size: 1.15em; }
.node-poet span.mailto { display: none; }
body[class*="page-title-poems-by"] ul, body[class*="page-title-poems-by"] li,
.node-poet ul, .node-poet li { list-style: none none; padding: 0; }
.node-poet .field-name-field-poet { display: none; }

/* columnists */
/*
body.node-type-encyclopedia-article:not(.page-node-edit) h3[hidden] {
	display: block;
	visibility:hidden;
	margin-top: -2em;
}
*/
body.node-type-columnist:not(.page-node-edit) .field-name-body h4 { font-weight: bold; }

/* two-column callout box for 19th amendment */
@media only screen and (min-width: 900px) {
.callout-box {
	float: right;
	width: 50%;
	margin-top: -1em;
	padding: 0 15px;
	border: 1px solid #cde;
	border-radius: 5px;
}
}

@media only screen and (min-width: 1301px) {
#toc { font-size: 0.75em; position: fixed; top: 135px; right: 50%; margin-right: 430px; z-index: 10; max-width: 14em; }
.node-poet #toc { font-size: 0.8em; }
#toc.scrolled { top: 0; }
}
@media only screen and (max-width: 1300px) {
.node-type-encyclopedia-article .flexslider { max-width: 600px; display: inline-block; }
#toc { font-size: 0.7em; display: inline-block; float: left; margin-right: 15px; max-width: 190px; }
}
