/*-----------------------------------------------------
	reset
-----------------------------------------------------*/

html, body, div, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, acronym, address, code, del, dfn, img,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tr, th, td {
	margin: 0;
	padding: 0;
}

/*-----------------------------------------------------
	Base
-----------------------------------------------------*/

html,body {
	min-height: 100%;
}


body {
	cursor: url(../images/ui/cursor_arrow.png), pointer;
	font-family: "Cagliostro", Arial, Helvetica, sans-serif;
	font-size: 13px;
	line-height: 1.3em;
	color: #333;
	background-color: #333;
	-webkit-text-size-adjust: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
}

/*-----------------------------------------------------
	forms
-----------------------------------------------------*/

input, select, textarea, button {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: #333;
}

/*-----------------------------------------------------
	paragraphs
-----------------------------------------------------*/

h1 {
	font-size: 1.4em;
	font-weight: bold;
}

h2,h3,h4,h5,h6 {
	font-size: 1.4em;
	font-weight: normal;
}


p,h1,h2,h3,h4,h5,h6,ul,ol,blockquote,code {
	margin-bottom: 1.4em;
}

em {
	font-style: italic;
}

strong {
	font-weight: bold;
}

img {display: block;}

/*-----------------------------------------------------
	list
-----------------------------------------------------*/

ul {
	list-style-position: outside;
	list-style-image: none;
	list-style-type: disc;
	margin-left: 20px;
}

ol {
	list-style-position: outside;
	list-style-type: decimal;
	margin-left: 20px;
}

ul ul {
	list-style-type: circle;
	margin-left: 20px;
	margin-top: 5px;
}

ol ol {
	list-style-type: lower-alpha;
	margin-left: 20px;
	margin-top: 5px;
}

li {
	padding-left: 5px;
}



/*-----------------------------------------------------
	links, focus and selection
-----------------------------------------------------*/

a {
	color: #208AB3;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

:focus {
	/*outline: 0px;*/
}

::selection {
	background: #87a50e;
	color: #fff;
}

::-moz-selection {
	background: #87a50e;
	color: #fff;
}

::-webkit-selection {
	background: #87a50e;
	color: #fff;
}

/*-----------------------------------------------------
	Clearing floats without extra markup
	http://perishablepress.com/press/2009/12/06/new-clearfix-hack/
-----------------------------------------------------*/

.clearfix:after, .columns:after, .formElementRow:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
}

/*-----------------------------------------------------
	columns grid
-----------------------------------------------------*/

.column					{ float: left; }
.columns-2 .column		{ width: 50%; }
.columns-3 .column		{ width: 34%; }
.columns-3 .firstCol	{ width: 33%; }
.columns-3 .lastCol		{ width: 33%; }
.columns-3 .span-2		{ width: 67%; }
.columns-4 .column		{ width: 25%; }
.columns-4 .span-2		{ width: 50%; }
.columns-4 .span-3		{ width: 75%; }
.columns-5 .column		{ width: 20%; }

.columnsMarginBottom 	{ margin-bottom: 3.2em }

.column .columnContent {
	padding: 10px 24px;
}

.firstCol .columnContent {
	padding-left: 0px;
}

.lastCol .columnContent {
	padding-right: 0px;
}

/*-----------------------------------------------------
	game Container
-----------------------------------------------------*/

#gameContainer {
	width: 640px;
	height: 480px;
	padding: 8px;
	position: absolute;
	left: 50%;
	margin-left: -328px;
	top: 50%;
	margin-top: -260px;
	background-color: #fff;
	-moz-box-shadow: 	1px 1px 10px 0px rgba(0,0,0,0.8);
	-webkit-box-shadow: 1px 1px 10px 0px rgba(0,0,0,0.8);
	box-shadow: 		1px 1px 10px 0px rgba(0,0,0,0.8);
}

a.socialIcon {
	display: block;
	position: absolute;
	bottom: -28px;
	right: 0;
	width: 28px;
	height: 28px;
	background-image: url(../images/social_icons.png);
	background-repeat: no-repeat;
	background-color: #000;
	background-color: rgba(0,0,0);
	background-color: rgba(0,0,0,0.3);
	outline: 0 none;
}

a.socialIcon:hover {
	background-color: #000;
	background-color: rgba(0,0,0);
	background-color: rgba(0,0,0,0.6);
	text-decoration: none;
}

a.socialIconF {
	right: 43px;
	background-position: 4px 3px;
}

a.socialIconT {
	right: 10px;
	background-position: -36px 2px;
}

/*-----------------------------------------------------
	systemRequirements info
-----------------------------------------------------*/

#systemRequirements {
	display: block;
	width: 640px;
	height: 480px;
	position: relative;
	overflow: hidden;
	z-index: 100;
	background: #000 url(../images/locations/lonely_tree/background.jpg) no-repeat scroll 0 0;
}

#systemRequirements .infoBox {
	display: block;
	position: absolute;
	bottom: 20px;
	left: 20px;
	width: 340px;
	color: #fff;
	padding: 20px;
	background-color: #000;
	background-color: rgb(0,0,0);
	background-color: rgba(0,0,0,0.5);
}

#systemRequirements .infoBox p {
	padding-left: 12px;
	border-left: 3px solid #c00;
}

#systemRequirements .infoBox h1 {
	font-size: 18px;
	margin-bottom: 20px;
	line-height: 1.2em;
}

.js #systemRequirements {
	display: none;
}



/*-----------------------------------------------------
	game global
-----------------------------------------------------*/

#game {
	 /* Limit copy and paste to only elements we want */
	-moz-user-select:-moz-none;
	-webkit-user-select:none;
	-ms-user-select:none;
	user-select:none;

	/*-webkit-transform-style: preserve-3d;*/

	width: 640px;
	height: 480px;
	position: relative;
	background-color: #000;
	overflow: hidden;
}

#viewContainer {
	width: 640px;
	height: 480px;
	position: relative;
}

/*
@media only screen and (orientation:portrait) {
	#wrongOrientation {
		z-index: 9999;
		position: absolute;
		top: 100px;
		left: 50px;
		background-color: red;
		display: block;
	}
}
*/

/*-----------------------------------------------------
	game modal
-----------------------------------------------------*/

#gameModal {
	z-index: 9999;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	/*border: 5px solid rgba(0,0,0,0.25);*/
}

/*-----------------------------------------------------
	common
-----------------------------------------------------*/

.fullScreenUI {
	z-index: 100;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
}

.modal {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.5);
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
}

.closeUI {
	background: transparent url(../images/ui/ui_close_button.png) no-repeat scroll 0 0;
	position: absolute;
	top: 0px;
	left: 590px;
	width: 50px;
	height: 50px;
	z-index: 50;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

.closeUI:active {
	background-position: 0 -100px;
}

.closeFloatingUI {
	position: absolute;
	z-index: 50;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
	background: transparent url(../images/ui/popup_close.png) no-repeat scroll 50% 2px;
	width: 44px;
	height: 44px;
}

.closeFloatingUI:active {
	background-position: 50% -98px;
}

/*-----------------------------------------------------
	leafs borders
-----------------------------------------------------*/

.borderTop,
.borderBottom {
	position: absolute;
	left: -7px;
	right: -7px;
	height: 14px;
	background: transparent url(../images/ui/frame_h.png) 0 0 no-repeat;
	z-index: 5;
}

#location_riddle .borderTop,
#location_riddle .borderBottom {
	background-image: url(../images/ui/frame_dark_h.png);
}

.borderTop {
	top: -7px;
}
.borderBottom {
	bottom: -7px;
}

.borderRight,
.borderLeft {
	position: absolute;
	top: -7px;
	bottom: -7px;
	width: 14px;
	background: transparent url(../images/ui/frame_v.png) 0 0 no-repeat;
	z-index: 5;
}

#location_riddle .borderRight,
#location_riddle .borderLeft {
	background-image: url(../images/ui/frame_dark_v.png);
	background-repeat: repeat-y;
}


.borderRight {
	right: -7px;
}
.borderLeft {
	left: -7px;
}


/*-----------------------------------------------------
	popup view layout
-----------------------------------------------------*/

#popup {
	z-index: 99;
}

#popupContainer {
	position: relative;
	margin: 55px auto 0;
	width: 500px;
	height: 375px;
}

#popup.popupSlim #popupContainer {
	width: 245px;
}

#popup .popup {
	width: 500px;
	height: 375px;
}

#popup.popupSlim .popup {
	width: 245px;
}

#popup .closeUI {
	left: 545px;
    top: 33px;
}

#popup.popupSlim .closeUI {
	left: 420px;
}

/*-----------------------------------------------------
	state window
-----------------------------------------------------*/

#stateWindow {
	z-index: 99;
}

.stateWindowContainer {
	background: #d2edf6 url(../images/ui/window_bg.jpg) repeat-x scroll 0 0;
	position: relative;
	margin: 100px auto 0;
	width: 450px;
	padding: 25px;
	height: 240px;

}

#stateWindow p {
	margin-bottom: 10px;
}

#stateWindow p em {
	font-style: normal;
	color: #AA1917;
}

#stateWindow textarea {
	border: 1px dotted #666;
	background-color: #fff;
	width: 438px;
	height: 135px;
	resize: none;
	padding: 5px 5px;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

#stateWindow #stateImportWindow textarea {
	margin-bottom: 10px;
}

#stateWindow .loadError {
	float: left;
	padding: 2px 0;
	color: #AA1917;
	margin-right: 20px;
	display: none;
}

#stateWindow div.button {
	float: right;
	padding: 2px 5px;
	background-color: #333;
	color: #fff;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

#stateWindow div.button:hover {
	background-color: #555;
}

#stateWindow div.button:active {
	background-color: #333;
}

#stateWindow .closeUI {
	left: 545px;
    top: 75px;
}

/*-----------------------------------------------------
	in-game cutscene view layout
-----------------------------------------------------*/

#cutscene {
	z-index: 99;
}

#cutsceneContainer {
	position: relative;
	width: 100%;
	height: 480px;
}

#cutscene .closeUI {
	display: none;
	top: 0;
	left: 0;
	/*top and left set by js*/
}


/*-----------------------------------------------------
	in-game menu view layout
-----------------------------------------------------*/

#menu {
	z-index: 99;
	opacity: 0;
}

#menuContainer {
	position: relative;
	margin: 75px auto 0;
	width: 243px;
	height: 304px;
	padding: 15px 0 0;
	background: transparent url(../images/ui/paper_menu.jpg) no-repeat scroll 0 0;
}

#menuTitle {
	width: 222px;
	height: 40px;
	margin: 0 auto 10px auto;
	background: transparent url(../images/ui/menu_title.png) no-repeat scroll 0 0;
}

.menuButton {
	font-family: "Spirax", Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.2em;

	width: 206px;
	height: 60px;
	line-height: 54px;
	text-align: center;
	text-shadow: #000 0px -2px 0px;
	margin: 0 auto;
	color: #fff;
	background: transparent url(../images/ui/menu_button.png) no-repeat scroll 0 0;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

.menuButton:active {
	text-indent: 2px;
	line-height: 56px;
	background-position: 1px 1px;
}

.menuButton.disabled {
	opacity: 0.5;
}

.menuButton.disabled:active {
	text-indent: 0px;
	line-height: 54px;
	background-position: 0 0;
}

/*-----------------------------------------------------
	ui
-----------------------------------------------------*/

#uiBgLeft {
	background: transparent url(../images/ui/ui_bg_left.png) no-repeat scroll 0 0;
	position: absolute;
	top: 0px;
	left: 0px;
	width: 82px;
	height: 19px;
	z-index: 51;
}

.uiButton {
	position: absolute;
	z-index: 50;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
	display: none;
}

.uiButton:active {
	background-position: 0 -100px !important;
}

.uiButton.disabled {
	cursor: url(../images/ui/cursor_arrow.png), default;
}

.uiButton.disabled:active {
	cursor: url(../images/ui/cursor_arrow.png), default;
	background-position: 0 0 !important;
}

#uiMenuButton {
	background: transparent url(../images/ui/ui_menu_button.png) no-repeat scroll 0 0;
	top: 8px;
	left: 0px;
	width: 55px;
	height: 48px;
}

#uiEyeButton {
	background: transparent url(../images/ui/ui_eye_button.png) no-repeat scroll 0 0;
	top: 0px;
	left: 46px;
	width: 56px;
	height: 48px;
}

#uiMapButton {
	background: transparent url(../images/ui/ui_map_button.png) no-repeat scroll 0 0;
	top: 0px;
	left: 499px;
	width: 60px;
	height: 50px;
}

#uiRiddleButton {
	background: transparent url(../images/ui/ui_riddle_button.png) no-repeat scroll 0 0;
	top: 0px;
	left: 548px;
	width: 50px;
	height: 50px;
}

#uiInventoryButton {
	background: transparent url(../images/ui/ui_inventory_button.png) no-repeat scroll 0 0;
	top: 0px;
	left: 590px;
	width: 50px;
	height: 50px;
}

.uiButton .indicator {
	position: absolute;
	width: 30px;
	height: 30px;
	background: transparent url(../images/ui/star_indicator.png) no-repeat scroll 0 0;
	top: 20px;
	left: -3px;
	display: none;
	color: #300;
	font-size: 12px;
	line-height: 31px;
	text-align: center;
	text-indent: 0;
}

.uiButton .indicator.animRemove {
	display: block;
	-webkit-animation: uiButtonIndicatorRemove 2s ease-in-out 0s 1;
	-moz-animation: uiButtonIndicatorRemove 2s ease-in-out 0s 1;
	animation: uiButtonIndicatorRemove 2s ease-in-out 0s 1;
}

.uiButton .indicator.animAdd {
	display: block;
	-webkit-animation: uiButtonIndicatorAdd 2s ease-in-out 0s 1;
	-moz-animation: uiButtonIndicatorAdd 2s ease-in-out 0s 1;
}

@-moz-keyframes uiButtonIndicatorAdd {
	0% 		{ opacity: 1; -moz-transform: translate(0,20px) scale(1.2);  }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -moz-transform: translate(0,-20px) rotate(180deg); }
}

@-webkit-keyframes uiButtonIndicatorAdd {
	0% 		{ opacity: 1; -webkit-transform: translate(0,20px) scale(1.2);  }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -webkit-transform: translate(0,-20px) rotate(180deg); }
}

@keyframes uiButtonIndicatorAdd {
	0% 		{ opacity: 1; -moz-transform: translate(0,20px) scale(1.2);  }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -moz-transform: translate(0,-20px) rotate(180deg); }
}

@-moz-keyframes uiButtonIndicatorRemove {
	0% 		{ opacity: 1; -moz-transform: translate(0,-20px) }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -moz-transform: translate(0,20px) scale(1.2) rotate(180deg); }
}

@-webkit-keyframes uiButtonIndicatorRemove {
	0% 		{ opacity: 1; -webkit-transform: translate(0,-20px) }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -webkit-transform: translate(0,20px) scale(1.2) rotate(180deg); }
}

@keyframes uiButtonIndicatorRemove {
	0% 		{ opacity: 1; -moz-transform: translate(0,-20px) }
	50% 	{ opacity: 1; }
	100% 	{ opacity: 0; -moz-transform: translate(0,20px) scale(1.2) rotate(180deg); }
}

/*-----------------------------------------------------
	dialogue
-----------------------------------------------------*/

#dialogueText {
	position: absolute;
	bottom: 7px;
	height: 100px; /*155*/
	width: 384px; /*440*/
	right: 7px;
	background: transparent url(../images/ui/dialogue.png) no-repeat scroll 0 0;
	padding: 55px 28px 0px 28px;
	color: #333;
	cursor: url(../images/ui/cursor_arrow.png), default;
}

#dialogue .additionalCloseArea {
	position: absolute;
	width: 440px;
	height: 40px;
	bottom: 125px;
	right: 7px;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

#dialogue .closeUI {
	top: auto;
	left: auto;
	bottom: 100px;
	right: 3px;
	/* we should remove it*/
	display: none;
}

#dialogue .modal {
	background-color: rgba(0,0,0,0.5);
}

#dialogueText .more {
	color: #fff;
	text-decoration: none;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
	background-color: #499ed5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	padding: 0 4px;
}

#dialogueText .more:hover {
	background-color: #1D90D8;
}

#dialogueText .more:active {
	background-color: #333;
}

#dialogueText .more.used {
	background-color: #666;
}

#dialogueText .more.used:hover {
	background-color: #333;
}

#dialogueText .more.used:active {
	background-color: #000;
}

#dialogueText .innerComment {
	display: none;
}

#dialoguePortrait {
	position: absolute;
	bottom: 0;
	left: 10px;
	width: 291px;
	height: 300px;
	width: 334px;
	background-position: 0 0;
	background-repeat: no-repeat;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

#dialoguePortrait.myosotis {
	background-image: url(../images/portraits/myosotis.png);
}

#dialoguePortrait.sailor1 {
	background-image: url(../images/portraits/sailor1.png);
}

#dialoguePortrait.sailor2 {
	background-image: url(../images/portraits/sailor2.png);
}

#dialoguePortrait.sailor3 {
	background-image: url(../images/portraits/sailor3.png);
}

#dialoguePortrait.sailor4 {
	background-image: url(../images/portraits/sailor4.png);
}

#dialoguePortrait.sailor5 {
	background-image: url(../images/portraits/sailor5.png);
}

#dialoguePortrait.sailor6 {
	background-image: url(../images/portraits/sailor6.png);
}

#dialoguePortrait.cloudCollector1 {
	background-image: url(../images/portraits/collector1.png);
}

#dialoguePortrait.cloudCollector2 {
	background-image: url(../images/portraits/collector2.png);
}

#dialoguePortrait.cloudCollector3 {
	background-image: url(../images/portraits/collector3.png);
}

#dialoguePortrait.captain {
	background-image: url(../images/portraits/captain.png);
}

#dialoguePortrait.wiseman {
	background-image: url(../images/portraits/wiseman.png);
}

/*-----------------------------------------------------
	action menu
-----------------------------------------------------*/

#actionMenuContent {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100px;
}

#actionMenuContent div {
	background: transparent url(../images/ui/action_menu.png) no-repeat scroll 0 0;
	color: #333;
	height: 29px;
	text-align: center;
	line-height: 29px;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
	white-space: nowrap;
	display: none;
}

#actionMenuContent div:active {
	background-position: 0 -100px;
}

#actionMenu .modal {
	/*background-color: rgba(0,0,0,0.1);*/
	background-color: transparent;
}

/*-----------------------------------------------------
	trophyNote
-----------------------------------------------------*/

#trophyNote {
	z-index: 100;
	position: absolute;
	bottom: 30px;
	left: -170px;
	width: 170px;
	height: 80px;
	background: transparent url(../images/ui/trophy_note.png) no-repeat scroll 0 0;
	-moz-transition: all 2s ease-in-out 0s;
	-webkit-transition: all 2s ease-in-out 0s;
	-o-transition: all 2s ease-in-out 0s;
	-ms-transition: all 2s ease-in-out 0s;
	transition: all 2s ease-in-out 0s;
}

#trophyNote.active {
	-moz-transform: translate(170px,0);
	-webkit-transform: translate(170px,0);
	-o-transform: translate(170px,0);
	-ms-transform: translate(170px,0);
	transform: translate(170px,0);
}

#trophyNote div {
	background: transparent url(../images/ui/trophy_crown.png) no-repeat scroll 8px 18px;
	font-size: 14px;
	font-style: italic;
	padding: 20px 20px 20px 54px;
}

/*-----------------------------------------------------
	loader
-----------------------------------------------------*/

#loaderIndicator {
	position: absolute;
	bottom: 0;
	top: 0;
	left: 0;
	width: 0;
	background-color: #000;
	opacity: 0.25;
	-webkit-transition: width .25s linear;
	-o-transition: width .25s linear;
	-moz-transition: width .25s linear;
	transition: width .25s linear;
}

#loader .modal {
	background-color: transparent;
	cursor: url(../images/ui/cursor_arrow.png), default;
}

#loaderInfo {
	position: absolute;
	bottom: 10px;
	left: 10px;
	color: #fff;
	font-style: italic;
}


/*-----------------------------------------------------
	mainMenu view
-----------------------------------------------------*/

#view_main_menu {
	background: transparent url(../images/cutscenes/introduction/title.jpg) no-repeat scroll 0px 0px;
	position: relative;
	width: 640px;
	height: 480px;
}

#view_main_menu #menuContainer {
	position: absolute;
	top: 36px;
	left: 34px;
	height: 312px;
	margin: 0;
}

#view_main_menu #menuNewGameButtonSubmenu {
	display: none;
	position: absolute;
	top: 20px;
	left: 265px;
	width: 295px;
	padding: 15px;
	background-color: rgba(0,0,0,0.8);
	color: #fff;
}

#view_main_menu .submenuButton,
#stateWindow .loadButton {
	float: right;
	padding: 2px 5px;
	background-color: #aa1917;
	color: #fff;
	cursor: url(../images/ui/cursor_arrow_pointer.png), pointer;
}

#view_main_menu .submenuButton:hover,
#stateWindow .loadButton:hover {
	background-color: #cb1d1b;
}

#view_main_menu .submenuButton:active,
#stateWindow .loadButton:active {
	background-color: #aa1917;
}

#menuNewGameButtonSubmenu .tail {
	border-bottom: 20px solid transparent;
	border-right: 40px solid rgba(0, 0, 0, 0.8);
	border-top: 20px solid transparent;
	height: 0;
	left: -40px;
	position: absolute;
	top: 0;
	width: 0;
	z-index: 5;
}
