/*******************************************************************************
 *  Styling for the Screenplay format
 *  Copyright (C) 2013 by Kevin Carlson. All rights reserved.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 *  DEALINGS IN THE SOFTWARE.
 ******************************************************************************/

/**
 * NOTES ABOUT THIS STYLESHEET:
 *     - Element widths are determined based on the standard Hollywood
 *           screenplay formatting guidelines, and specified by percentages.
 *           This way, the proper formatting will be preserved when printing to
 *           US Letter paper (8.5 x 11 in), while approximating the correct
 *           formatting on displays of different sizes.
 *     - The Barnes & Noble Nook eReader is incompatible with the
 *           text-transform: uppercase property. Best practice is to capitalize
 *           this text in the HTML source, though the property remains as a fall
 *           back on compatible devices.
 *     - Aldiko Reader for Android insists on adding a text-indent to any
 *           paragraph without a class that explicitly removes the indentation.
 *           That's why 'text-indent: 0;' appears in all classes intended for
 *           text, instead of as a property of the paragraph tag, itself.
 *     - The Nook also ignores CSS rules for adding text before/after elements
 *           of a particular class. For this reason, parentheses are not added
 *           automatically to parenthetical text.
 *     - Note that this stylesheet has not been tested with Amazon's EPub to
 *           MobiPocket conversion utility. It may or may not work. I make no
 *           promises ;-)
 *     - Otherwise, this stylesheet is compatible with the HTML output generated
 *           from the Celtx screenwriting software. For best results, you may
 *           choose to remove the extraneous line breaks added at the end of
 *           each paragraph.
 */

.hollywood {
 	background-color: #fff;
 	color: #000;
 	font-family: "Courier", "Courier New", monospace;
 	font-size: 1.2em;
 	padding: 0;
	width: 1275px;
	height: 1650px;
	outline: 1px dotted gray;
 }

 div {
 	margin: 0;
 	padding-bottom: 1em;
 }

 .margin{
	
	margin-left: 260px;
	margin-right: 260px;
	margin-top: 150px;
 }

.sceneheading {
	page-break-after: avoid;
	text-indent: 0;
	text-transform: uppercase;
	padding-bottom: 1em;
}

.action {
	clear: both;
	text-indent: 0;
	padding-bottom: 1em;
}

.fadein {
	font-weight: bold;
	text-transform: uppercase;
	content: "FADE IN";
	padding-bottom: 1em;
}

.pagetop {
	height:  100px;
}

.character {
	margin-left: 43.2%;
	padding-bottom: 0;
	page-break-after: avoid;
	text-indent: 0;
	text-transform: uppercase;
}

.continued:after {
	content: " (CONT'D)";
}

.parenthetical {
	margin-left: 35.2%;
	margin-right: 40.8%;
	padding-bottom: 0;
	text-indent: 0;
}

.dialog {
	margin-left: 15%;
	margin-right: 15%;
	text-indent: 0;
	padding-bottom: 1em;
}

.titlepage {
    page-break-after: always;
	margin-top: 15%;
	text-indent: 0;
}

.title {
	line-height: 2em;
	text-align: center;
	text-indent: 0;
}

.author {
	line-height: 2em;
	margin-bottom: 10%;
    text-align: center;
    text-indent: 0;
}

.titlepagebottom {
	margin-top: 20%;
}

.titlepagebottom:after {
	content: "."; 
    visibility: hidden; 
    display: block; 
    height: 0; 
    clear: both;
}

.copyright {
	float: left;
	text-indent: 0;
	width: 40%;
}

.contact {
	float: right;
	text-indent: 0;
	width: 40%;
}

.transition {
	text-align: right;
	text-indent: 0;
	text-transform: uppercase;
}

@media print {
	body {
		margin-left: 1.5in;
		margin-right: .75in;

		/***
		 * Setting the top and bottom margins to 0, as web browsers don't apply
		 * this to each page individually (better to let the user specify a
		 * custom top and bottom margin upon printing the document).
		 **/

		margin-bottom: 0;
		margin-top: 0;
	}

	.titlepage {
		margin-top: 2in;
	}

	.author {
		margin-bottom: 1in;
	}

	.titlepagebottom {
		margin-top: 3in;
	}
}
