/* controls */

#controls {
    position: relative;
    z-index: 1;
}

#background-controls li {
    list-style-type: none;
    display: inline;
    font-family: "Bungeee Regular";
    font-size: 1em;
}

#background-controls input {
    display: none;
}

#background-controls input + label {
    display: inline-block;
    padding: 0.25em;
}

#background-controls input:checked + label {
    background-color: white;
}

form > fieldset {
	background-color: #E9E9E9;
	padding: 1em .5em;
	margin-top: 0;
}
form > fieldset + fieldset {
	border-top: 1px solid #CCC;
}

/* preview box */

#preview {
    position: relative;
    display: block;
    background-color: transparent;
    z-index: 0;
}

#preview .background.layer {
    display: none;
}

select {
	display: inline-block;
	margin-top: 0;
}
input[type=text] {
	padding: .25em .5em;
	margin-top: 0;
/* 	margin-bottom: .33em; */
	vertical-align: baseline;
}
#preview.vertical {
    padding-right: 5%;
    max-height: 100%;
    overflow: hidden;
    width: auto;
}

#svg, #png {
    display: inline-block;
    border: 1px solid black;
}

#code {
    display: block;
	line-height: 1.2;
    padding: 1em;
    border: 1px solid black;
    white-space: pre-wrap;
    overflow: auto;
    background-color: rgba(255,255,255, 0.8);
}

#code code {
    display: block;
}

#preview .layer {
    /* cute little fade in/out when layers are toggled */
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.swatch {
	font-size: 1.5em;
	line-height: 1;
	vertical-align: middle;
	margin-top: .25em;
	margin-bottom: .25em;
}


.swatch-small {
	font-size: .5em;
}
.colors span,
.swatch {
	text-align: center;
	width: .75em;
	height: .75em;
	margin-top: 0;
	outline: 1px solid #CCC;
	display: inline-block;
}

#palettes > li {
    display: inline-block;
    margin-right: .2em !important;
}

.palette {
	font-size: 1.8em;
	position: relative;
	display: inline-block;
	width: auto;
	height: auto;
	padding: .1em;
	margin-top: 0;
	vertical-align: middle;
	text-align: center;
    background: transparent !important;
}
#palettes input {
    display: none;
}
#palettes input + label {
    display: inline-block;
}
.active, #palettes input:checked + label {
	outline: 3px solid #000;
}
input {
	vertical-align: middle;
}
.none, .color-picker-container .sp-clear {
	background-color: #FFF !important;
	color: rgba(255,255,255,0) !important;
    background: 
       linear-gradient(to top left,
           rgba(255,0,0,0) 0%,
           rgba(255,0,0,0) calc(50% - 2px),
           rgba(255,0,0,1) 50%,
           rgba(255,0,0,0) calc(50% + 2px),
           rgba(255,0,0,0) 100%);
}


/* don't use vertical rotated hack */
.no-vertical-text #preview.vertical {
    -ms-writing-mode: lr-tb;
    -webkit-writing-mode: horizontal-tb;
    -moz-writing-mode: horizontal-tb;
    writing-mode: horizontal-tb;
    /* and rotate the whole thing clockwise */
    /* note this will break document flow unless you absolutely position it */
    -moz-transform: none;
    -ms-transform: none;
    -webkit-transform: none;
    transform: none;
    height: 100%;
}

.no-vertical-text #preview.vertical img {
    height: 100%;
    max-height: 95vh;
    width: auto !important;
}