


			/* Fonts */



@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i&subset=latin-ext");
@import url("https://fonts.googleapis.com/css?family=Oleo+Script:700&subset=latin-ext");

spellcast {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	color: #333;
}

.fun {
	font-family: "Oleo Script", cursive;
	font-weight: 700;
}

/* fix few colors that are too bright for this theme */
.text .bright {
	text-shadow: 1px 1px 1px #333;
}



			/* Layout */



.scene-image {
	position: absolute;
	z-index: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;

	background-image: url("../../backgrounds/default.jpg");
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;

	/*cursor: pointer;*/

	opacity: 1;
	transition: opacity 2s ;
}

main {
	opacity: 1;
	transition: opacity 0.5s;
}

#main-buffer {
	position: relative;
	height: 100vh;
	width: 50%;
	z-index: 1;
	padding-top: 1em;	/* it seems to bug with 0 */
	padding-bottom: 1em;
	margin: 0;
	margin-left: 0%;
	box-sizing: border-box;
	overflow: hidden;
	/*background-color: rgba(220,220,200,0.6);*/
	background-color: rgba(232, 225, 215, 0.7);
	opacity: 1;
	box-shadow: 0px 0px 10px 1px #000;
	transition: opacity 0.5s , margin 0.3s;
}

spellcast[data-image-position="left"] #main-buffer {
	margin-left: 50%;
}

#main-buffer .buffer-wrapper {
	height: calc( 100% - 2em );
	width: 100%;
	overflow-y: scroll;
	padding-right: 20px;
	margin-bottom: 2em;
}

#main-buffer.chat-hidden {
	padding-bottom: 0px;
}

#main-buffer.chat-hidden .buffer-wrapper {
	height: 100%;
}

#main-buffer .buffer-wrapper:hover {
	padding-right: 0;
}

#alt-buffer {
	position: fixed;
	z-index: 1;
	padding: 0;
	
	/*
		top % are based upon container size, translate % are based upon the object size:
		used in conjunction it centers vertically
	*/
	top: 50%;
	transform: translateY(-50%);
	
	right: 7.5%;
	width: 35%;
	opacity: 1;
	transition: opacity 0.5s , right 0.3s;
}

#alt-buffer .buffer-wrapper {
	padding-top: 0.5em;
	padding-bottom: 0.5em;
	
	/*background-color: rgba(220,220,200,0.6);*/
	background-color: rgba(232, 225, 215, 0.7);
	box-shadow: 0px 0px 10px 1px #000;
	
	max-height: 80vh;
	overflow: auto;
	box-sizing: border-box;
}

#button-close-alt {
	position: relative;
	z-index: 1;
	margin-left: auto;
	margin-right: 0;
	height: 1.5em;
	width: 1.5em;
	top: 0.75em;
	left: 0.75em;
	background-image: url("../../icons/close.svg");
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	cursor: pointer ;
}

#button-close-alt.disabled {
	display: none;
}

#button-close-alt:not(.disabled):hover {
	filter: contrast( 150% ) brightness( 150% ) ;
}

#alt-buffer.inactive {
	opacity: 0 !important;
	pointer-events: none !important;
}

spellcast[data-image-position="left"] #alt-buffer {
	right: 57.5%;
}

/* Hide widgets that will be probably inactive */
#alt-buffer .chat , #alt-buffer .history-wrapper {
	display: none;
}

.history-wrapper {
	margin: 0 1.5em 1.5em 1.5em;
	overflow: hidden;
}

.history-wrapper {
	margin: 0 1.5em 1.5em 1.5em;
	overflow: hidden;
}

.buffer .messages.active {
	margin: 1.5em;
}

#alt-buffer .messages.active {
	margin-top: 0;
}

.buffer .choices {
	margin: 1.5em;
}

.buffer .chat {
	position: absolute;
	bottom: 0;
	width: 100%;
	z-index: 2;
	padding: 0.2em 1em;
	box-sizing: border-box;
	background-color: rgba(200,200,220,0.6);
	opacity: 1;
	transition: opacity 0.5s;
}

.buffer .chat-form {
}

.buffer .chat-input {
	width: 85%;
}

#lobby {
	position: fixed;
	box-sizing: border-box;
	z-index: 1;
	width: 2em;
	top: 0;
	right: 0;
	max-height: 25%;
	padding: 0.1em;
	
	overflow: hidden;
	background-color: rgba(232, 225, 215, 0.7);
	opacity: 1;
	box-shadow: 0px 0px 10px 1px #000;
	transition: opacity 0.5s;
	text-align: center;
}

/*#lobby.empty { display: none; }*/

spellcast[data-image-position="left"] #lobby {
	left: 0;
	right: auto;
}

#panel {
	position: fixed;
	box-sizing: border-box;
	z-index: 1;
	width: 2.35em;
	top: 25%;
	right: 0;
	max-height: 65%;
	padding: 0 0.15em;
	
	overflow: hidden;
	background-color: rgba(232, 225, 215, 0.7);
	opacity: 1;
	box-shadow: 0px 0px 10px 1px #000;
	transition: opacity 0.5s;
	text-align: center;
}

#panel.empty { display: none; }

spellcast[data-image-position="left"] #panel {
	left: 0;
	right: auto;
}

#status {
	position: fixed;
	box-sizing: border-box;
	z-index: 1;
	height: 2.4em;
	max-width: 50%;
	bottom: 0;
	right: 0;
	padding: 0.1em;
	font-size: 0.6em;
	
	overflow: hidden;
	background-color: rgba(232, 225, 215, 0.7);
	opacity: 1;
	box-shadow: 0px 0px 10px 1px #000;
	transition: opacity 0.5s;
}

#status.empty {
	display: none;
}

spellcast[data-image-position="left"] #status {
	left: 0;
	right: auto;
}

/* Make the scene-image fully visible */
spellcast.gfx-toggled main , spellcast.gfx-toggled #lobby , spellcast.gfx-toggled #panel , spellcast.gfx-toggled #status {
	opacity: 0;
	pointer-events: none;
}



			/* Paragraph, span, text message... */



.history {
	opacity: 0.5;
	background-color: rgba( 255 , 255 , 255 , 0.2 );
	max-height: 20vh;
	overflow-y: scroll;
	width: 100%;
	padding-right: 20px;
}

/* Make the scrollbar visible again */
.history:hover { padding-right: 0; }

segment , inter-segment {
	display: block;
	margin-top: 1em;
}

p {
	margin: 0.2em 0em;
}

p.text {
	min-height: 1em;
}

spellcast.continue .messages.active segment:last-child p.text.continue:last-child:after {
	content: "▼";
	display: block;
	float: right;
	margin-left: 1em;
	animation: blink-animation 2s linear infinite;
	
}

p.chosen {
	margin: 0.2em 0em 0.2em 1em;
	color: #29b0b0;
	font-weight: 700;
}

p.chosen:before {
	content: "> ";
}



			/* Chat / Input */



input[type=text].text-input {
	display: inline;
	width: 50%;
}



			/* Choices and buttons */



.choices group {
	display: flex;
	flex-flow: column;
}

.choices group {
	display: flex;
	flex-flow: column;
}

.choices[data-choice-style="list"] group , .choices[data-choice-style="smallList"] group {
	flex-flow: column;
}

.choices[data-choice-style="inline"] group , .choices[data-choice-style="smallInline"] group {
	flex-flow: row wrap;
	justify-content: space-around;
}

.choices[data-choice-style="smallList"] .choice , .choices[data-choice-style="smallInline"] .choice {
	font-size: 0.9em;
	padding: 3px 10px;
	margin: 4px 10px;
}

.choices[data-choice-style="table"] {
	display: table;
	border-collapse: separate;
	border-spacing: 1em 0.6em;
}

.choices[data-choice-style="table"] group {
	display: table-row;
}

.choices[data-choice-style="table"] group .choice {
	display: table-cell;
	text-align: center;
	vertical-align: middle;
}

.choices.columns-2[data-choice-style="table"] group .choice { width: 50%; }
.choices.columns-3[data-choice-style="table"] group .choice { width: 33%; }
.choices.columns-4[data-choice-style="table"] group .choice { width: 25%; }
.choices.columns-5[data-choice-style="table"] group .choice { width: 20%; }

.choice .image {
	max-height: 2em;
	vertical-align: middle;
}

.choice.has-image .label {
	margin-left: 0.6em;
}

.choice {
	display: block;
	position: relative;
	/*text-align: left;*/
	text-align: center;
	border: none;
	outline: none;
	background-color: #aaa ;
	padding: 6px 10px;
	margin: 8px 10px;
	cursor: pointer ;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
	border-radius: 10px ;
	box-shadow: 0 4px #3c3c3c;
	top: 0px;
}

.choice:hover {
	background-color: #f77 ;
	box-shadow: 0 2px #3c3c3c;
	top: 2px;
}

.choice:active {
	box-shadow: 0 0 #3c3c3c;
	top: 6px;
}

.choice:after {
	content: "";
	position: absolute;
	z-index: -1;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}


.choice.role {
	background-color: #dabff3;
	box-shadow: 0 4px #b07ee0;
}

.choice.role:hover {
	background-color: #e7dcf2;
	box-shadow: 0 2px #b07ee0;
}

.choice.role:active {
	box-shadow: 0 0 #b07ee0;
}

.choice.next {
	background-color: #b0ec79 ;
	box-shadow: 0 4px #3cab3c;
}

.choice.next:hover {
	background-color: #d1f3b2 ;
	box-shadow: 0 2px #3cab3c;
}

.choice.next:active {
	box-shadow: 0 0 #3cab3c;
}

p.unassigned-users {
	flex-basis: 100%;
	color: #555753;
	font-style: italic;
}

span.unassigned-users {
	color: #555753;
	font-style: italic;
}

p.waiting-roles {
	flex-basis: 100%;
	color: #555753;
}

span.waiting-roles {
	color: #555753;
	font-style: italic;
}



			/* Indicators */



indicator-list {	
	display: table;
	border-collapse: separate;
	border-spacing: 5px;
}

indicator {
	display: table-row;
}

.status indicator-list {
	display: table-row;
}

.status indicator {
	display: table-cell;
}

indicator label , indicator widget {
	display: table-cell;
}

indicator label img {
	height: 1.2em;
	vertical-align: middle;
}

indicator widget.hbar {
	width: 10em;
	vertical-align: middle;
}

.status indicator widget.hbar {
	width: 2em;
}

indicator widget.hbar outer-bar {
	display: block;
	height: 1em;
	border: solid 1px #555;
}

indicator widget.hbar inner-bar {
	display: block;
	height: 100%;
	background-color: #ee5;
}

indicator widget.vbar {
	width: 1em;
	vertical-align: middle;
}

indicator widget.vbar outer-bar {
	display: block;
	position: relative;
	height: 1em;
	border: solid 1px #555;
}

indicator widget.vbar inner-bar {
	display: block;
	position: absolute;
	bottom: 0;
	width: 100%;
	background-color: #ee5;
}



			/* Lobby */



#lobby .client-status {
	display: inline-block;
	height: 1.5em;
	width: 1.5em;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	background-image: url("../../icons/plugging.svg");
}

#lobby .client-status[data-status="connected"] { background-image: url("../../icons/plugged.svg"); }
#lobby .client-status[data-status="connecting"] { background-image: url("../../icons/plugging.svg"); }
#lobby .client-status[data-status="closed"] { background-image: url("../../icons/unplugged.svg"); }
#lobby .client-status[data-status="unreachable"] { background-image: url("../../icons/unreachable.svg"); }



			/* Panel */



#panel .button {
	display: block;
	width: 2em;
	height: 2em;
	line-height: 2em;
	margin: 0.15em 0;
	
	/* the panel bg color */
	background-color: rgba(212, 205, 195);
	
	cursor: pointer;
}

#panel .button .image {
	width: 100%;
	vertical-align: middle;
}

#panel .button.disabled {
	cursor: auto;
}

#panel .button:not(.disabled):hover {
	background-color: rgba(242, 235, 225);
}

#panel .button:not(.disabled):hover .image {
	position: relative;
	width: 110%;
	top: -5%;
	left: -5%;
}



			/* Hint */



#hint {
	display: block;
	position: fixed;
	bottom: 6vh;
	z-index: 100;
	left: 50%;
	transform: translateX(-50%);
	
	padding: 0.1em 0.5em;
	text-align: center;
	
	font-size: 1em;
	color: #eee;
	font-weight: 700;
	text-shadow: 0 0 1px #555;
	
	background-color: rgba( 0,0,0,0.5 );
	
	opacity: 1;
	transition: opacity 0.5s;
	pointer-events: none;
}

#hint.empty {
	opacity: 0;
}

#hint.passive {
	font-size: 1.25em;
	color: #bce;
}

#hint.active {
	font-size: 1.6em;
	color: #fea;
}



			/* Icons */



.icon.svg .primary {
	fill: #333;
	stroke: #fff;
}

.icon.svg .inv-primary {
	fill: #fff;
	stroke: #333;
}

.disabled .icon.svg .primary {
	fill: #777;
	stroke: #bbb;
}

.disabled .icon.svg .inv-primary {
	fill: #bbb;
	stroke: #777;
}



			/* Cards */



.g-entity-location-showing {
	width: 30vw;
	height: 60vh;
	top: 20vh;
	right: 10vw;
}

.g-entity-location-showing .g-entity-slot {
	width: 40vh;
	height: 60vh;
}

.g-entity-location-showing .g-entity-slot:last-child {
	min-width: 40vh;
}

.g-entity-location-hand {
	width: 30vw;
	height: 30vh;
	bottom: 0;
	right: 10vw;
}

.g-entity-location-hand .g-entity-slot {
	width: 20vh;
	height: 30vh;
}

.g-entity-location-hand .g-entity-slot:last-child {
	min-width: 20vh;
}

/* This is the true size, that will be scaled using CSS transform to fit the slot */
.card-wrapper {
	width: 50vmin;
	height: 75vmin;
	pointer-events: auto;
}

.card {
	border-radius: 5px;
	border: solid 1px #777;
}

.card .front , .card .back {
	top: 10px;
	left: 10px;
	width: calc( 100% - 20px ) ;
	height: calc( 100% - 20px ) ;
}

.card .card-image {
	order: 1;
}

.card .content-title {
	order: 2;
	font-size: 1.3em;
	font-weight: 700;
}

.card .content-description {
	order: 3;
}

.g-entity-wrapper[pose="face-down"] .card {
	transform: rotateY(-180deg) rotateZ(0deg);
	transition: all 1s;
}

.g-entity-wrapper[pose="spin-face-up"] .card {
	transform: rotateY(360deg) rotateZ(0deg);
	transition: all 2s;
}

.g-entity-wrapper[pose="wheel-face-up"] .card {
	transform: rotateY(0deg) rotateZ(360deg);
	transition: all 2s;
}



			/* Dialog box */



.dialog-wrapper {
	display: table-cell;
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	/*bottom: 0;*/
	height: 100vh;
	left: 0;
	background: rgba(0,0,0,0.6);
	z-index: 99999;
	opacity: 1;
	transition: opacity 400ms ease-in-out, height 400ms step-start;
}

.dialog-wrapper.empty {
	height: 0vh;
	opacity: 0;
	transition: opacity 400ms ease-in-out, height 400ms step-end;
}

.dialog-wrapper.slow {
	transition: opacity 1500ms ease-in-out, height 1500ms step-start;
}

.dialog-wrapper.empty.slow {
	transition: opacity 1500ms ease-in-out, height 1500ms step-end;
}

.dialog {
	display: flex;
	width: 40%;
	position: relative;
	margin: 10% auto;
	padding: 1em;
	background: #f0efe9;
	
	/* Chrome requires that, even if it doesn't make sense */
	border-style: solid;
	
	/* This part is specific to the border image used */
	border-image-source: url("../../boxes/geometric-gold.svg");
	/* 168 SVG units inward for both horizontal and vertical*/
	border-image-slice: 168;
	/* Repeat an integer number of time, rescale when needed */
	border-image-repeat: round;
	/* Make it so the image is larger than the border box, half of the tiles are outside of it */
	border-image-outset: 1em;
	border-image-width: 4em;
	/* Avoid trouble when the height is too low, and thus create distorsion */
	min-height: 9em;
}

.dialog .message {
	margin: auto;
	font-size: 1.5em;
}

.dialog.big .message {
	margin: auto;
	font-size: 3em;
}

/* /!\ What to do with that? */
.wait {
	background-color: #75507b;
	margin: 2em 20%;
	border-radius: 10px;
	padding: 10px 20px;
	text-align: center;
	text-shadow: 1px 1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff, -1px -1px 1px #fff;
}



			/* Misc */



.hidden {
	opacity: 0 !important;
	pointer-events: none !important;
}

.disabled img {
	-webkit-filter: grayscale(100%) contrast(30%) opacity(50%);
	-moz-filter: grayscale(100%) contrast(30%) opacity(50%);
	-ms-filter: grayscale(100%) contrast(30%) opacity(50%);
	-o-filter: grayscale(100%) contrast(30%) opacity(50%);
	filter: grayscale(100%) contrast(30%) opacity(50%);
	/*opacity: 0.5;*/
}

@keyframes blink-animation {
  50% {
    opacity: 0;
  }
}

@keyframes pulse-animation {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0.4;
	}
}

.pulse-animation {
	animation-name: pulse-animation;
	animation-duration: 1s;
	animation-timing-function: ease-in-out;
	animation-delay: 0ms;
	animation-direction: alternate;
	animation-iteration-count: infinite;
	animation-fill-mode: none;
	animation-play-state: running;
}

