/*
 * Jimmy Cerra
 * 15 Oct. 2021
 * MIT License
 * 
 * Copyright 2021 James Francis Cerra
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

:root {
	/* Colors */
	/* active icon, alert overlay, hover over icon, inactive icon */
	--active-border-color: hsl(207deg 75% 40% / 50%);
	--active-color: hsl(207deg 100% 60% / 33%);
	--alert-border-color: transparent;
	--alert-color: var(--active-color); /* also try 33deg */
	--hover-border-color: hsl(207deg 75% 40% / 20%);
	--hover-color: hsl(207deg 100% 60% / 20%);
	--inactive-color: transparent;
	--inactive-border-color: transparent;

	/* Sizes */
	--border: 1px;
	--curve: .5rem;
	--icon: 2.3em; /* Apple toolbar guideline: 24 to 28 pt */
	
	/* Derived sizes */
	--alert-curves: var(--curve) var(--curve) 0 0;
	--icon-borders: var(--border);
	--icon-curves: var(--curve);
	--icon-open-borders: var(--border);
	--icon-open-curves: var(--curve) var(--curve) 0 0;
	--more: calc(var(--icon) / 2);
	--more-borders: 0 var(--border);
	--more-curves: 0;

	color-scheme: dark light;
	touch-action: none;
}

/* For main layout, both are flex to account for margins. */
body,
html,
main {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Drawing pad goes in here. */
main {
	flex: 1;
}

/* The actual svg element being drawn to. */
main > svg {
	background: var(--hover-color) !important;
    border-radius: var(--curve);
	flex: 1; /* Fix for ios Safari not stretching svg element size. */
	height: 100%;
	width: 100%;
}