/**************************************************************
 * Description:	This file contains rules common to all elements in the
 * 				TextViewer, regardless of the View selected.
 *
 *************************************************************/

#searchbox {
	margin-bottom:1em;
}
#searchbox a {
	margin-left: 15px;
}

/* move the content in a bit to make room for LNs (not quite right yet)  */
.content {
    margin-left: 2em;
    padding: 0px;
    width: 100%;
}
.content {
    overflow: hidden;
} /* make sure floating divs don't escape the content div */
.status {
    font-size: small;
    color: #888888; /* should be grey */
    float: right; margin-right:20px;
    clear: right;
}
.status.editor, .status.author {
    color:black;
}

.invisible {
	visibility:hidden;
}

/* line numbers */
.milestone {
	font-family:Times, serif;
	font-size:8px; line-height:18px;
	text-decoration:none;
	font-variant: normal;
	font-style: normal;
	position:absolute;
    right: 691px;
    padding: 0 7px; /* overlap slightly with the line to make mousing easier */
    color: gray;
	text-align:left;
}

/* alignment */
.right {
    text-align: right
}
.right.moveup {
	margin-top:-18px; /* reflow to previous line (psuedo-float) */
}
.center {
    text-align: center;
}
.justify {
    text-align: justify;
}
.indented {
	/* actual indent set inline by xslt */
}
.space {
    /* remove space taken up by placeholder chars */
    display:inline-block;
    width:0px;
    height:1px; /* make sure it's never taller than the line */
    overflow:hidden;
	/* actual space set inline by xslt */
}

/* Drop-caps */
.dropcap {
    /* actual drop amount set inline by xslt */
    float: left; line-height:100%;
}

#text-body {
	 /* break away from menus */
	margin-top:2em;
	/* normalize font-size and line-height so hanging-words can be accurately positioned */
	font-size:16px; /* line-height:18px; // use #innerContent line-height */
	position:relative;
	padding: 0 25px;
	width: 669px; /* this is the natural width from the container, but it is needed for print view to keep LNs in the right spot */
}
#text-body #innerContent {
    max-width: 32em;
}
#innerContent img {
    max-width: 669px; /* fit large images within content area */
}


/* shrink-wrap non-modern texts so that right floats don't travel too far */
/* removed to allow headers to fill full width -- any errors resulting? */
/*#text-body { display:table; }
#text-body.M, #text-body.FM { display:block; }
*/

/******************************/
/**       ISE Markup         **/
/******************************/
.blackletter {
	/* what font should we use? just using bold for now.. */
	font-weight:bolder;
}
.blackletter i {
	/* "italic" in blackletter is just "roman" */
	font-weight:normal;
}
.roman {
	font-weight:normal;
}

/*** compensatory formatting (implicit to tags) ***/
.speaker {
    display: inline;
    font-style: italic;
    padding-right: .5em;
    padding-left: .8em;
}
/* only change size/margin of titles found in text body */
#text-body .title {
    font-size: 18px; line-height:20px;
    margin-bottom: 10px;
    font-style: italic;
}
.foreign {
    font-style: italic;
}
.dedication {
    margin: 5px;
}
.line {
    margin: 0px;
    padding: 0px;
}
.sig {
    text-align: center;
    font-weight: bold;
    clear: both;
}
.titlehead {
	font-size:24px; line-height:27px;
}
.sceneleader {
    font-size:18px; line-height:20px;
}
.catchword {
    text-align: right;
    clear: both;
}
.runningtitle {
    font-size: large;
    display: inline;
}
.sd {
    clear: right;
}
.sd.uncertain, .sd.optional {
    color:gray;
}
.pagenum {
    display: inline;
    font-weight: bold;
    font-size: large;
}
.lig {
    letter-spacing: -0.07em;
    margin-right: 0.07em;
}
.marginalia {
	width:12em;
	margin:.5em 1em;
	font-family:sans-serif; font-size:90%;
}
.marginalia.left {
	float:left; margin-left:0; clear:left;
}
.marginalia.right {
	float:right; margin-right:0; text-align:left; clear:right;
}
.hangingword {
	text-align:right;
	float:right; /* must float so wierd things don't happen to adjacent margins */
}
.hangingword.next {
	margin-top:1.3em;
}
/* .hangingword.prev's margin set inline, since it depends on the number of <br>s */

/* SPLIT-LINE TABLES */
.layout-group { border-collapse:collapse; }
.layout-leftpad { text-align: right; }
.layout-sp .milestone { margin-top: 6px; } /* compensate for .5em margin on SP trapped by table cell */

/*** Specifically for Modern works ***/
/* format the speaker consistently, but only change the indentation for
 actual speeches (not for dramatis personae) */
#text-body[data-is-modern] .speaker {
    font-style: normal;
    text-transform: uppercase;
	font-size: 85%;
	margin-left: -20px;
	display:block;
	margin-top:.5em;
	padding:0;
}
#text-body[data-is-modern] .line {
	padding-left:20px;
}
#text-body[data-is-modern] table.line {
    /* padding doesn't work on a table */
    margin-left: 20px;
    padding-left: 0;
}
#text-body[data-is-modern] .line .line {
    /* if lines ever get accidentally nested (eg. iembeds), don't double-indent */
    padding-left:0;
    margin-left:0;
}
#text-body[data-is-modern] .sd {
    font-style: italic;
}

/* Stage directions NOT inside of a speech */
#text-body[data-is-modern] div.sd {
	margin:.4em 0;
}
#text-body[data-is-modern] .line > div.sd,
#text-body[data-is-modern] .layout-interrupt td > div.sd {
	margin-left:-20px;
}

#text-body[data-is-modern] .exit {
    text-align: right;
    display: block;
	max-width:32em;
}
#text-body[data-is-modern] span.exit {
	/* FIXME: possible to use floats instead? */
	position:absolute; width:32em; left:0; margin-top:-1em; z-index:-1;
}
#text-body[data-is-modern] .layoutgroup .exit {
	position:static; width:32em; left:0;
}
#text-body[data-is-modern] span.exit.midline {
	position:static; width:auto; display:inline;
}


/*******************/
/* Intro/Supp page */
#introsupplist {
	list-style-type:disc;
}
#introsupplist dl, #introsupplist dd, #introsupplist dt {
	display:inline;
	margin:0; padding:0;
}
#introsupplist dt {
	margin-right:.5em;
}
#introsupplist dd {
	margin-left:.2em;
}
#introsupplist dd:first-of-type::before {
	content: "by ";
}
#introsupplist dd::before {
	content: ", ";
}


/* override base.css highlighting of anchor links */
a.milestone:hover,
.milestone:visited:hover {
	background-color: transparent;
}

.iembedContainer.embeddedTextLines,
.iembedContainer.embeddedTextNoLines {
	margin:0;
}
.iembedContainer.embeddedTextLines .iembedContent,
.iembedContainer.embeddedTextNoLines .iembedContent {
    position: static; /* don't change milestone positioning parent */
}
.iembedContainer.embeddedTextNoLines,
.iembedContainer.embeddedTextNoLines .iembedContent {
    display: inline;
}

/*******************
 *  New navigation 
 *******************/
#document-navigation, #document-navigation-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}
#document-navigation > a, #document-navigation-bottom > a {
    margin: 1em;
}
#document-navigation .dropDownNav {
    margin: 0 1em;
}
#jump { /* only applicable when JS is off */
    margin-left: 1em;
}

/* variant style overrides  */
span[data-variant-wit]:not([data-variant-wit='Ed']):not(.sd){
    text-transform: none;
    font-style: none;
    font-size:16px;
}



