html, body {
	padding: 0;
	margin: 0;
	height: 100%;
	font-family: sans-serif;
}

#spray-error {
	display: none;
	color: #fff;
	background: rgba(0,0,0,0.8);
	padding: 6px 8px;
	margin: 6px 0;
	border-radius: 4px;
	font-size: 22px;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	text-align: center;
	max-width: 320px;
	padding: 20px 20px 30px 20px;
	line-height: 1em;
	font-weight: bold;
}

.spray-error-instructions {
	font-size: 60%;
	position: relative;
	top: 10px;
	font-weight: normal;
}

#options-container {
	position: absolute;
	width: 250px;
	top: 0;
	right: 0;
	margin: 0;
	padding: 12px;
	background-color: #333;
	color: #fff;
	z-index: 10;
	user-select: none;
	box-sizing: content-box;
}

@media screen and (max-width: 600px) {
	#options-container {
		width: 144px;
		padding: 6px 8px 8px 8px;
	}
	#gw-color-picker .IroColorPicker .IroBox{
		width: 146px!important;
	}
	#options-content #gw-color-picker .IroSlider {
		width: 146px!important;
	}
	#options-content input[type=range] {
		width: 98%!important;
	}
}

#options-hider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	padding: 16px 20px;
	cursor: pointer;
	text-align: right;
	font-size: 18px;
}

#options-hider svg{
	position: relative;
	top: 2px;
	left: 2px;
}

#options-color-swatch {
	width: 24px;
	height: 22px;
	display: inline-block;
	border: 1px solid #777;
	border-radius: 3px;
	background: #000;
	position: relative;
	top: 4px;
	left: 6px;
}

@media screen and (max-width: 600px) {
	#options-hider {
		font-size: 14px;
		padding: 9px 10px 9px 16px;
	}
	#options-hider svg{
		top:3px;
	}
	#options-color-swatch {
		width: 18px;
		height: 16px;
		top: 3px;
		left: 2px;
	}
	#options-content label {
		display: inline-block;
	}
}

#options-content {
	display: none;
}		

#options-content div {
	margin-top: 10px;
	font-size: 16px;
}

#options-content h2{
	font-size: 22px;
	margin: 14px 0 2px 0;
}

#options-content input {
	width: 35px;
}

#options-content input[type=range] {
	width: 90%;
}

#gw-color-picker{
	width: 100%;
	margin-top: 0!important;
}

#options-content #gw-color-picker div {
	margin-top: 0!important;
}

#gw-color-picker .IroColorPicker .IroBox{
	height: 160px!important;
}

#options-content #gw-color-picker .IroSlider{
	margin-top: 12px!important;
}

#options-content input[type=range]:focus{
    outline: none;
}

#options-content label {
	cursor: pointer;
	display: block;
}

#canvas-wrapper {	
	width: 90vw;
    height: 90vh;
    min-width: 90vw;
    min-height: 90vh;
    position: relative;
	overflow: hidden;
	background: #ccc;
    left: 50%;
    margin-left: -45vw !important;
    margin-top: 5vh;
    padding: 0;	
}

#gw-controls{
	position:absolute;
	top:0;
	left:0;
	margin: 0;
	padding: 12px;
	background-color: #333;
	color: #fff;
	z-index: 1;
	user-select: none;
	box-sizing: content-box;
	width: auto;
	height: 32px;
	color: #fff;
}

#gw-recenter, #gw-undo, #gw-redo, #gw-help, #gw-snapshot, #gw-fullscreen{
	width: 28px;
	height: 28px;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor:pointer;
	background: none;
	z-index:5;
	padding: 0;
}

@media screen and (max-width: 600px) {
	#gw-controls{
		padding:8px 10px 10px 8px;
		height:22px
	}
	#gw-recenter, #gw-undo, #gw-redo, #gw-help, #gw-snapshot, #gw-fullscreen{
		width:22px;
		height:22px;
		margin:-1px;
	}
	#gw-recenter svg, #gw-undo svg, #gw-redo svg, #gw-help svg, #gw-snapshot svg, #gw-fullscreen svg{
		width:12px;
		height:12px;
		margin:-10px 0 4px 0;
	}
}

#gw-recenter:disabled, #gw-undo:disabled, #gw-redo:disabled, #gw-help:disabled, #gw-snapshot:disabled, #gw-fullscreen:disabled{
	opacity: 0.3;
}

#gw-recenter svg, #gw-undo svg, #gw-redo svg, #gw-help svg, #gw-snapshot svg, #gw-fullscreen svg{
	stroke:#fff;
	stroke-width:1px;
    position: relative;
    top: 2px;
}

#gw-help svg{
	width:24px;
	height:24px;
	margin: -4px;
}

#canvas {
	position: absolute;
	top: 0;
	left: 0;
	cursor: crosshair;
	background: url('../img/brick.jpg');
}

#canvas, #canvas-wrapper {
	touch-action: none;
}

#canvas-wrapper{
	position: relative;
}

#gw-loading-overlay{
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.35);
	z-index: 20;
	pointer-events: none;
}

#gw-loading-overlay.is-hidden{
	display: none;
}

.gw-spinner{
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255,255,255,0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gwspin 0.8s linear infinite;
}

@keyframes gwspin{
	from{transform: rotate(0deg);}
	to{transform: rotate(360deg);}
}

/* Picture-in-Picture */
#gw-minimap{
    position: absolute;
    right: 0px;
    top: 62px;
    border: 5px solid #333;
    z-index: 25;
    pointer-events: none;
    background: url('../img/brick.jpg');
	background-size: 200px;
    width: 274px;
    max-width: 40dvw;
	opacity:0;
	transition:opacity .15s;
}

#gw-minimap.gw-minimap-moving{
	opacity:1;
}

#gw-minimap.gw-minimap-visible{
	opacity:1;
	pointer-events: auto;
}

#gw-mini-close{
	display: none;
	position: absolute;
    top: 72px;
    right: 11px;
	width: 32px;
	height: 32px;
	padding: 0 3px 4px 3px;
	font-size: 22px;
	line-height: 0;
	text-align: center;
	border: 0;
	border-radius: 50%;
	background: #000;
	color: #fff;
	opacity: .75;
	cursor: pointer;
	z-index: 9;
}

#gw-mini-close:hover{
	opacity:1;
}

@media screen and (max-width: 600px) {
	#gw-minimap{
		top:38px;
	}	
	#gw-mini-close{
		top:48px;
	}
}

/* Help Modal */
#gw-help-modal{
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

#gw-help-modal.is-open{
	display: block;
}

#gw-help-modal .gw-help-overlay{
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.6);
}

#gw-help-modal .gw-help-dialog{
	position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80dvw;
	max-width: 960px;
    max-height: calc(100dvh - 200px);
    overflow: auto;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    min-height: 50dvh;
    color: #fff;
    text-align: center;
}

#gw-help-modal #gw-help-close{
	position: absolute;
	right: 10px;
	top: 10px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

#gw-help-modal .gw-help-body{
	font-size: 16px;
	line-height: 1.4em;
}

/* Snapshot Modal */
#snap-modal{
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
	display:none;
	z-index:99999;
}

#snap-modal h2{
	color:#fff;
	font-size: 20px;
	padding: 10px 0 0 0;
	font-weight: 500;
}

#snap-modal.is-open{
	display:block;
}

#snap-modal .snap-overlay{
	position:absolute;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background:rgba(0,0,0,0.6);
}

#snap-modal .snap-dialog{
	position:absolute;
	top:50%;
	left:50%;
	transform:translate(-50%,-50%);
	background:#111;
	border-radius:8px;
	box-shadow:0 12px 32px rgba(0,0,0,0.5);
	max-width:90vw;
	max-height:90vh;
	overflow:hidden;
}

#snap-modal .snap-body{
	padding: 8px 20px 0 20px;
	background:#222;
}

#snap-modal #snap-preview{
	display:block;
	max-width:86vw;
	max-height:64vh;
	height:auto;
	width:auto;
}

#snap-modal .snap-actions{
	display:flex;
	justify-content:flex-end;
	gap:8px;
	padding: 20px;
	background: #222;
}

#snap-modal .btn{
	background:#444;
	color:#fff;
	border:0;
	padding:6px 10px;
	border-radius:4px;
	cursor:pointer;
}

#snap-modal .btn-primary{
	background:#21B306;
}

#snap-modal #snap-close{
	position:absolute;
	top: 14px;
	right: 16px;
	background:transparent;
	border:0;
	color:#fff;
	font-size: 22px;
	line-height:1;
	cursor:pointer;
	background: rgba(0,0,0,0.6);
	border-radius: 61px;
	width: 32px;
	height: 32px;
	padding: 0 0 3px 0;
}

#gw-notify-modal.is-open{
	display:block;
}

#gw-share-modal.is-open{
	display:block;
}

#gw-share-modal .gw-share-overlay,
#gw-notify-modal .gw-share-overlay{
	position:fixed;
	inset:0;
	background:rgba(0,0,0,0.6);
	z-index:9998;
}

#gw-share-modal .gw-share-dialog,
#gw-notify-modal .gw-share-dialog{
	position:fixed;
	left:50%;
	top:50%;
	transform:translate(-50%,-50%);
	background:#fff;
	z-index:9999;
	width:min(560px,calc(100% - 40px));
	padding:24px;
	border-radius:6px;
}

#gw-share-close,
#gw-notify-close{
	position:absolute;
	right:12px;
	top:10px;
	border:0;
	background:transparent;
	font-size:22px;
	cursor:pointer;
}

.gw-share-body h2{
	font-size: 20px;
	font-weight: bold;
}

.gw-share-row{
	margin:14px 0;
}

.gw-share-row input[type="email"]{
	width: 100%;
    max-width: 100%;
    border: 1px solid #000;
    border-radius: 0;
    padding: 0 10px;
    margin-top: 2px;
    height: 48px;
    line-height: 48px;
}

.gw-share-row .select2-container--default .select2-selection--multiple .select2-selection__choice__display{
	padding-left:6px;
}

.gw-share-row .select2-container--default .select2-selection--multiple .select2-selection__choice__remove, .gw-share-row .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .gw-share-row .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{
	background-color: #111;
	color:#fff;
}

.gw-share-row .select2-container .select2-selection--multiple .select2-selection__rendered{
	margin:0;
}

.gw-share-row .select2-container--default .select2-selection--multiple .select2-selection__choice{
	border-radius: 6px;
    height: 26px;
    line-height: 24px;
    font-size: 16px;
    margin: 7px;
    padding: 0px 2px 2px 20px;
}

.gw-share-row .select2-container--default.select2-container--focus .select2-selection--multiple, .gw-share-row .select2-container--default .select2-selection--multiple{
	height: 52px;
	line-height: 36px;
	border:1px solid #000;
	border-radius: 0;
	padding:0 4px;
	margin-top:2px;
}

.gw-share-row .select2-container--default .select2-search--inline .select2-search__field{
	line-height: 40px;
	height:40px;
}

.gw-share-actions{
	margin-top:18px;
	display:flex;
	gap:14px;
	align-items:center;
}

.gw-share-actions #gw-share-send{
	background-color: #111;
}

/* Fullscreen */
#canvas-wrapper:fullscreen{
	width:100dvw;
	height:100dvh;
	min-width:100dvw;
	min-height:100dvh;
	margin:0;
	border:0;
	background:#000;
}

#canvas-wrapper.gw-fs-fallback{
	position:fixed;
	inset:0;
	width:100dvw;
	height:100dvh;
	min-width:100dvw;
	min-height:100dvh;
	margin:0!important;
	border:0;
	z-index:99999;
	background:#000;
}

#canvas-wrapper #gw-controls .fullscreenicon{
	display:inline;
}
#canvas-wrapper:fullscreen #gw-controls .fullscreenicon, #canvas-wrapper.gw-fs-fallback #gw-controls .fullscreenicon{
	display:none;
}
#canvas-wrapper #gw-controls .exiticon{
	display:none;
}
#canvas-wrapper:fullscreen #gw-controls .exiticon, #canvas-wrapper.gw-fs-fallback #gw-controls .exiticon{
	display:inline;
}
