/*--------------------------------------------
 * EasyWebshop Layout designer
 * 
 * Copyright (c) 2014 by Jan Van Liedekerke
--------------------------------------------*/

@font-face {
	font-family: 'Open Sans';
	src: local('Open Sans'), local('OpenSans'),
		url('/scripts/font/Open Sans.woff2') format('woff2'),
		url('/scripts/font/Open Sans.woff') format('woff');
}

@font-face {
	font-family: 'Urania';
	src: local('Urania'), local('Urania'),
		url('/scripts/font/Urania-Regular.otf') format('opentype');
}

/* Variables */
html {
	--bgcolor:		#333;		/* App background */
	--fgcolor:		#aaa;		/* Used for text and SVG images */
	--hovercolor:		#f60;
	--menuhovercolor:	#444;

	--borderwidth:		3px;
	--bordercolor:		#555;
	--borderhovercolor:	#ccc;
	--borderactivecolor:	#f90;

	--margin:		10px;		/* Consistent troughout application */
	--padding:		10px;
	--border-radius:	8px;
}

html, body		{ margin: 0; padding: 0; height: 100%; }
body			{ font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 1em; overflow: hidden; }
a			{ color: var(--hovercolor); text-decoration: none; }
a img			{ border:none; outline:none; }
.center			{ text-align: center; }

div.info		{ width: 100%; font-size: 1.2em; margin-bottom: 12px; color: #5fc331; font-weight: bold; }
div.info svg		{ vertical-align: middle; margin-right: 8px; width: 20px; height: 20px; }
div.info span		{ width: 100%; vertical-align: middle; }
/*--------------------------------
 	Main objects
-------------------------------*/

#ddiv	{
	height: 100%; background-repeat: no-repeat; background-position: center 20px; 
	text-align: center; transition: opacity 0.2s ease-in;
}
#ddiv > iframe		{ border: 0; margin: 0; width: 100%; height: 100%; }



#dapp	{
	position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 1000px; max-width: 100vw; height: 60px;
	background: var(--bgcolor); color: var(--fgcolor);
	border-radius: var(--border-radius) var(--border-radius) 0 0; box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.75);
	transition: opacity 1s, height 1s; z-index: 401;
}

nav			{ display: flex; justify-content: space-evenly; }
nav > strong		{ font-family: Urania, Open Sans, Helvetica, Arial, sans-serif; font-size: 24px; padding: 18px var(--padding) 0 var(--padding); cursor: pointer; }
nav svg			{ width: 100%; height: 36px; padding: 12px; fill: var(--fgcolor); transition: background 0.4s; outline: none; }
nav svg path		{ fill: var(--fgcolor); }
nav > strong:hover,
nav > strong.active,
nav svg:hover,
nav svg.active		{ background: var(--menuhovercolor); cursor: pointer; }
nav > strong		{ border-radius: var(--border-radius) 0 0 0; }
nav > svg:last-child	{ border-radius: 0 var(--border-radius) 0 0; }

.ewtxt span		{ color: #f60 }		/* text: easy */
.ewtxt			{ color: #ddd; }	/* text: webshop */

#dapp > div > div	{ padding: var(--padding); overflow-y: auto; max-height: calc(85vh - 160px); }
#cssform		{ display: none; }

/*--------------------------------
 	Page navigation
-------------------------------*/
h1			{ font-size: 1.4em; }
.subnav			{ margin: 0; padding: var(--padding) 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--padding); justify-content: space-between; }
.subnav li		{
	padding: var(--padding); flex: 1 1 calc(25% - 30px);
	border-radius: var(--border-radius); cursor: pointer; transition: background 0.4s; outline: none; white-space: nowrap;
}
.subnav li > svg	{ width: 36px; height: 36px; margin-right: var(--padding); fill: var(--fgcolor); vertical-align: middle; }
.subnav li > span	{ display: inline-block; vertical-align: middle; white-space: normal; }
.subnav li:hover	{ background: var(--menuhovercolor); }
.subnav li.hidden	{ visibility: hidden; }
.subnav.bottom		{ justify-content: flex-end } /* bottom navigation */
.subnav.bottom li	{ flex: 0 2 auto; }

.subsubnav		{ list-style: none; padding: 0; }
.subsubnav li 		{ font-size: 1.2em; outline: none; }
.subsubnav li > span	{ display: inline-block; padding: var(--padding);border-radius: var(--border-radius); cursor: pointer; transition: background 0.4s; }
.subsubnav li > span:hover { background: var(--menuhovercolor); }

/*--------------------------------
 	Notififcation window
-------------------------------*/
#dnotif_wrapper		{ display: none; position: fixed; top: 20px; width: 100%; text-align: center; }
#dnotif	{
	display: inline-block; padding: 5px 50px 5px 30px;
	border-radius: 8px; box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.75);
	background: #333; color: #EEE; font-size: 1.4em; white-space: nowrap;
	opacity: 0; transition: opacity 1s;
}

#dnotif svg		{ float: left; width: 72px; height: 72px; margin-right: 20px; }
#dnotif svg.warn	{ width: 36px; height: 36px; }
#dnotif span		{ line-height: 72px; }
.dmode_warning		{ margin: 30px 0; font-size: 1.2em; }


/*--------------------------------
 	Forms
-------------------------------*/

input, select, textarea	{ border: 1px solid #999; border-radius: 3px; padding: 3px; }
input:focus,
textarea:focus		{ background: #eee; }
input[type="checkbox"],
input[type="radio"]	{ border: 0;}
input[type="submit"],
input[type="button"]	{ cursor: pointer; float: right; margin: 10px 0 0 0; font-weight: normal;  }

a.glowbutton, input[type="submit"], input[type="button"], button	{
	white-space: nowrap; display: inline-block; min-width: auto; margin: 0 0 10px 0; padding: 0 12px;
	text-decoration: none; text-align: center;
	color: #fff; background: #f80; border: 0; border-radius: 3px;
	line-height: 33px; height: 33px; font-weight: bold; font-family: Open Sans, Helvetica, Arial, sans-serif;
	font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 1em;
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
}

a.glowbutton:hover, input[type="submit"]:hover, button:hover	{
	background: #f90; cursor: pointer;
}
.leftbuttons button	{ margin-right: 10px; }
.centerbuttons a 	{ margin: 20px 10px !important; width: 300px; min-width: none; }

label			{ cursor: pointer; }

.dform			{ text-align: center; }
.dform form		{ display: inline-block; }
/*
.dform	{
	display: inline-block; min-width: 400px; height: 110px; margin: 10px 20px;
	border: 3px solid #666; border-radius: 5px;
	vertical-align: top;
}

.dform form	{
	display: inline-block; margin: 20px 0 0 0; padding: 0;
}

.dform > span	{
	display: block; padding: 2px 0 5px 8px;
	text-align: left; font-weight: bold; font-size: 0.9em;
	color: #EEE; background-color: #666;
}
*/
.dform input[type="text"], .dform input[type="file"] {
	margin: 0 0 0 12px; float: left; width: 230px; height: 27px; line-height: 27px; padding: 3px; border: none; color: #333; background: #fff; border-radius: 3px 0 0 3px;
}

.dform .dselect_upload  {
	float: left; height: 33px; line-height: 33px; display: inline-block; border: none; color: #333; background: #fff; border-radius: 0; font-weight: bold;
}

.dform span.dselect_upload {
	padding: 0 10px;
}

/* Checkboxes */
.dcbx			{ display: inline-block; }
.dcbx input[type="checkbox"]	{ display: none; }
.dcbx			{ position: relative; width: 120px; height: 40px; margin: 0 auto; border-radius: 20px; background: #666; font-weight: bold; }
.dcbx:before		{ content: 'On'; position: absolute; top: 8px; left: 20px; height: 2px; color: #26ca28; font-size: 16px; }
.dcbx:after		{ content: 'Off'; position: absolute; top: 8px; left: 74px; height: 2px; color: #333; font-size: 16px; }
.dcbx label {
	display: block; position: absolute; top: 9px; left: 12px; width: 46px; height: 22px; z-index: 1;
	border-radius: 50px; background: #333;
	transition: all .5s ease; cursor: pointer;
}
.dcbx input[type=checkbox]:checked + label { left: 60px; background: #26ca28; }
a.dcbxbutton		{ vertical-align: top; margin: 3px 0 0 16px; }

/* Select */
.dselect		{ margin-top: -7px; padding: 10px; font-size: 1.4em; color: #EEE; background: #333 !important; }
.tabselect		{ margin: 20px 0; }
.dselect optgroup	{ color: #F90; margin: 5px; }
.dselect option		{ color: #EEE; margin: 5px 10px; }
/*select.tabselect option:hover	{ box-shadow: 0 0 10px 100px #F80 inset; }*/

input[type="color"]	{ display: block; width: 80px; height: 34px; cursor: pointer; }

/* Submit button */
.dform input[type="submit"]	{ width: 140px; min-width: 0; margin-right: 12px; float: right; border-radius: 0 3px 3px 0; }

/*--------------------------------
 	SVG icon navigation
-------------------------------*/
.svgicons 		{ margin: 30px 0 20px 0; padding: 0; }
.svgicons li		{
	display: inline-block; min-width: 130px; width: 130px; height: auto; padding: 8px 4px;
	border-radius: 3px; vertical-align: top; cursor: pointer; color: #999; text-align: center;
	transition: background-color ease-out 0.3s;
}
.svgicons a		{ color: #999; outline: none; }
.svgicons li:hover	{ background-color: #f5f5f5; }
.svgicons svg		{ width: 64px; height: 64px; margin-bottom: 4px; }

.svgicons svg,
.svgicons svg path	{ fill: #999; }
.svgicons li span 	{ display: block; }

.svgicons li:hover a	{ text-decoration: none; }
.svgicons li:hover svg,
.svgicons li:hover svg path { fill: #f90; }
.svgicons li:hover span	{ color: #f90; }

/*--------------------------------
 	Responsive views (desktop only)
-------------------------------*/
#views ul		{ margin: 0 auto; padding: 0; list-style: none; text-align: center; }
#views li		{ display: inline-block; width: 155px; margin: 0 4px; border-radius: 3px; cursor: pointer; transition: background-color 0.8s; }
#views li:hover		{ background-color: #f90; }

#views img		{ transition: opacity 0.8s; }
#views img		{ opacity: 0.7; filter:alpha(opacity=70); }
#views img:hover	{ opacity: 1; filter:alpha(opacity=100); }

/*--------------------------------
 	Templates, Examples, Colors, Fonts, Backgrounds, Buttons, References
-------------------------------*/

#templates,
#examples,
#colors,
#fonts,
#backgrounds,
#buttons,
#references		{ display: flex; flex-wrap: wrap; gap: var(--padding); justify-content: space-between; }
#templates > div,
#examples > div	{
	display: flex; flex-direction: column; flex: 1 1 calc(25% - 7.5px);
	margin-bottom: var(--padding);
	font-weight: bold; color: var(--fgcolor);
	cursor: pointer;
}

#templates img,
#examples img,
#references img		{ width: 100%; height: 100%; opacity: 0.6; transition: opacity 0.4s; border-radius: var(--border-radius); }
#templates > div:hover img,
#examples > div:hover img,
#references > a:hover img { opacity: 1; }

.active_template > img,
.active_example > img	{ border: var(--borderwidth) solid var(--borderactivecolor); opacity: 1; }

/* First icon for personalizing colors and backgrounds */
#colors > div:first-child > div,
#backgrounds > div:nth-child(1),
#backgrounds > div:nth-child(2),
#backgrounds > div:nth-child(3)	{  display: flex; align-items: center; align-content: center; background: none; }
#colors > div svg,
#colors > div svg path,
#backgrounds > div svg,
#backgrounds > div svg path { width: 48px; height: 48px; fill: var(--fgcolor); margin-left: calc(50% - 24px); }

/*--------------------------------
 	Colors
-------------------------------*/

#colors > div {
	display: flex; flex-wrap: wrap; gap: 0; flex: 1 1 calc(25% - 30px);
	min-width: 140px; min-height: 110px;
	white-space: normal; line-height: 0;
	border: var(--borderwidth) solid var(--bordercolor); border-radius: var(--border-radius);
	cursor: pointer; transition: border-color 0.8s;
}
#colors > div:hover		{ border-color: var(--borderhovercolor); }
#colors .active_color		{ border-color: var(--borderactivecolor); }


#colors > div > div		{ flex: 1 1 calc(50%); }
#colors > div > div:nth-child(1){ border-radius: 5px 0 0 0; }
#colors > div > div:nth-child(2){ border-radius: 0 5px 0 0; }
#colors > div > div:nth-child(3){ border-radius: 0 0 0 5px; }
#colors > div > div:nth-child(4){ border-radius: 0 0 5px 0; }

/*--------------------------------
 	Fonts
-------------------------------*/

#fonts > div {
	flex-grow: 1;
	padding: var(--padding);
	font-size: 1.8em; border: var(--borderwidth) solid var(--bordercolor); border-radius: var(--border-radius); line-height: 2.2em; text-align: center;
	cursor: pointer;
	transition: background-color 0.6s, border-color 0.8s;
}

#fonts > div:hover	{ background: var(--menuhovercolor); }
#fonts .active_font	{ border-color: var(--borderactivecolor); }


/*--------------------------------
 	Backgrounds
-------------------------------*/

#backgrounds > div {
	flex: 1 1 calc(25% - 30px);
	min-width: 100px; min-height: 100px;
	border: var(--borderwidth) solid var(--bordercolor); border-radius: var(--border-radius);
	cursor: pointer; transition: border-color 0.8s;
	background: #fff; vertical-align: middle;
}

#backgrounds > div:hover { border-color: var(--borderhovercolor); }
#backgrounds .active_background	{ border-color: var(--borderactivecolor); }

/*--------------------------------
 	Buttons
-------------------------------*/
#buttons a		{ width: 120px; margin: 0; padding: 8px 0; font-weight: 700; text-align: center; text-decoration: none; }

/*--------------------------------
 	References
-------------------------------*/
#references > a {
	display: flex; flex-direction: column; flex: 1 1 calc(25% - 7.5px);
	margin-bottom: var(--padding);
	font-weight: bold; color: var(--fgcolor);
	cursor: pointer;
}



/*--------------------------------
 	Responsive
-------------------------------*/

/* Last items keep left */
div.hidden		{ visibility: hidden; }
a.hidden		{ border: 1px solid var(--bgcolor); visibility: hidden; }

@media all and (max-width: 800px) {
	#templates > div,
	#examples > div		{ flex-basis: calc(33% - 20px); }
}

@media all and (max-width: 600px) {
	.subnav li		{ flex-basis: calc(33% - 20px); }
	#templates > div,
	#examples > div		{ flex-basis: calc(50% - 10px); }
}
@media all and (max-width: 400px) {
	.subnav li		{ flex-basis: calc(50% - 10px); }
	#fonts > div		{ font-size: 1.4em; }
}

/*--------------------------------
 	dbar: logo upload
-------------------------------*/

form.centerbuttons { padding-left: 12px; }
form.centerbuttons div, form.centerbuttons input { margin: 0 12px 0 0; }

.bguploadform svg,
.bguploadform svg path	{ fill: #999; }



.dform .bguploadform 	{ display: flex; margin: 20px 10px 0 10px; align-items: center; gap: 30px; }
.bguploadform svg	{ width: 48px; height: 48px; cursor: pointer; }
.bguploadform svg:hover,
.bguploadform svg:hover path	{ fill: #ccc; }
.bguploadform a.glowbutton { margin: 0; }

/*--------------------------------
 	dbar: code form
-------------------------------*/
.dcode			{ margin: 0 auto; padding: 0 var(--padding); text-align: left; font-size: 0.8em; }
.dcode textarea		{ width: 99%; height: 50vh; margin-bottom: var(--padding); }
.dcode input[type="submit"]	{ margin: 3px 0 0 0; }
#codepost		{ float: right; color: #0C0; font-size: 1.4em; font-weight: bold; line-height: 24px; margin: 5px 13px 0 0; }
#codepost img		{ float: left; margin: 3px 8px 0 0; }

.dset			{ display: inline-block; height: 150px; margin: 0 auto; overflow-y: auto; }
.dset > div		{ display: inline-flex; width: 320px; margin: 10px; border: 5px solid #666; border-radius: 12px; white-space: nowrap; }
.dset > div > span,
.dset > div > label	{ flex-grow: 2; padding: 0 8px; line-height: 34px; text-align: left; }
.dset > div:hover	{ background: var(--menuhovercolor);  }
.dset input[type="color"] { margin: 0; border-radius: 0 7px 7px 0; }

/*--------------------------------
 	dbar: drag & drop
-------------------------------*
.dscroll		{  margin: 0 auto; max-height: 280px; max-width: 600px; overflow: scroll; }

/*--------------------------------
 	Effects
-------------------------------*/

.fadein			{ animation: fadein 0.4s ease-in; }
.fadeout		{ animation: fadeout 0.4s ease-out; }
@keyframes fadein	{ from { opacity: 0; } to { opacity: 1; }}
@keyframes fadeout	{ from { opacity: 1; } to { opacity: 0; }}

/*--------------------------------
	New form CSS - because ew.css is not included
-------------------------------*/
.cp			{ display: inline-block; margin: 0 0 0 4px; vertical-align: middle; }
.cp svg			{ width: 20px; height: 20px; margin: 0 0 3px 0; animation: fadein .2s ease-in forwards; }
.cpwarn 		{ display: inline; vertical-align: top; font-size: 0.8em; color: #F60; font-weight: bold; }

/*--------------------------------
 	File manager
-------------------------------*/

div.ewloader		{ margin: 50px 0; padding: 0; text-align: center; animation: fadein 0.4s ease-in; }  /* AJAX loader */
.ewloader svg,
.ewloader svg path	{ fill: #f90; width: 80px; height: 30px; }

/*--------------------------------
 	Image editor
-------------------------------*/
.imb_edit		{
	display: inline-block; padding: 5px 15px; margin: 5px 0; cursor: pointer;
	color: #fff; background: #f80; border-radius: 3px; line-height: 24px; font-size: 0.9em; font-weight: bold;
}
.imb_edit:hover		{ background: #f90; }
.imb_edit img		{ float: left; margin-right: 5px; }

/*--------------------------------
 	Debug console
-------------------------------*/

#dpost {
	display: none;
	position: absolute; top: 10px; right: 20px; width: 500px; height: 200px;
	border: 1px solid #f60; font-weight: bold; font-family: monospace;
	background: #000; color: #f60; padding: 4px; text-align: left; line-height: normal;
	opacity: 0.9; white-space: pre-wrap; overflow-y: auto; 
}
