* {
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

:root {
	--light-grey: #bbb;
	--accent-color: #8888ff;
	--row-a-color: #add;
	--row-a-active-color: #bee;
	--row-b-color: #eee;
	--row-b-active-color: white;
	--default-text-color: #333;
}

body {
    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
    background-color: #EDE8E7;
    font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 14pt;
    height: 100vh;
    margin: 0px;
    padding: 0px;
    /* Padding to avoid the "unsafe" areas behind notches in the screen */
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    width:100%;
	color: var(--default-text-color);
}

/* Portrait layout (default) */

.branding, .nav-button, .add-button, .add-project, .project-row {
	cursor: pointer;
}

.loading {
	font-size: 32pt;
	width: 100%;
	height: 100%;
	position: fixed;
	background-color: black;
	color: white;
	display: flex;
	flex-direction: column;
	justify-content: center;
	z-index: 2;
}

.app {
    width: 100%;
    height: 100%;
    text-align: center;
}

.branding {
	height: 10%;
	display: flex;
	align-items: center;
	padding: 0 20px;
	justify-content: space-between;
	background-color: var(--accent-color);
	color: white;
	text-transform: uppercase;
}

.branding img {
	width: 30px;
	display: inline;
}

.main-wrapper {
	height: 90%;
}

.app-header {
	text-transform: uppercase;
}

.content {
	margin-top: 10px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.footer {
	width: 100%;
	height: 50%;
	display: flex;
	flex-direction: column;
}


.panel {
    width: 100%;
    min-height: 100%;
	padding: 20px;
	box-sizing: border-box;
}

.project-list-page {
	
}

.project-list-wrapper {
	border-radius: 10px;
	overflow: hidden;
}

.floating-add-project {
	position: fixed;
	bottom: 10px;
	right: 10px;
}

.project-row.template-row {
	display: none;
}

.project-row {
	display: flex;
	width: 100%;
}

.project-row:nth-child(odd) {
	background-color: var(--row-a-color);
}

.project-row:nth-child(odd):active {
	background-color: var(--row-a-active-color);
}

.project-row:nth-child(even) {
	background-color: var(--row-b-color);
}

.project-row:nth-child(even):active {
	background-color: var(--row-b-active-color);
}

.project-col {
	flex-grow: 1;
	flex-basis: 0;
	padding: 20px;
	font-size: 14pt;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.project-stitch {
	font-weight: bold;
	text-align: right;
}



.project-page {
	display: flex;
	flex-direction: column;
}

.button-row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.nav-button {
	text-align: center;
	padding: 10px;
	border-radius: 7px;
}

.back-arrow {
	background-color: var(--light-grey);
}
.back-arrow:active {
	background-color: white;
}

.delete-button {
	background-color: #dd3333;
	color: white;	
}
.delete-button:active {
	background-color: pink;
}

.update-prop-input {
	font-size: 30pt;
	font-weight: bold;
	color: grey;
	background-color: transparent;
	border: 3px dashed white;
	width: 100%;
	box-sizing: border-box;
	border-radius: 7px;
	padding: 4px;
}

#project-name-input {
	text-align: center;
}

.content-paragraph {
	margin: 0.4em 0;
}

.counter-wrapper {
	font-size: 30pt;
	display: flex;
	margin-bottom: 0.4em;
}

.col-left, .col-right {
	flex-grow: 1;
	flex-basis: 0;
	text-transform: uppercase;
}

.col-left {
	text-align: right;
	margin-right: 10px;
}

.col-right {
	text-align: left;
}

.add-button {
	color: white;
	text-decoration: none;
    padding: 10px;
	font-size: 24pt;
	border: none;
	text-transform: uppercase;
}

.add-button#add-stitch {
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	flex-grow: 1;
	background-color: var(--accent-color);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.add-button#add-row {
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
	color: black;
	background-color: white;
}

.add-button:active {
	background-color: grey;
}




input#new-project-name {
	width: calc(100% - 80px);
	height: 70px;
}

.add-project-form {
	display: flex;
}

.add-project {
	background-color: var(--accent-color);
	padding: 20px;
	border-radius: 100px;
	color: white;
	display: block;
	width: 25px;
	height: 25px;
}

.add-project img {
	display: block;
	width: 25px;
	height: 25px;
}

.form-add-project {
	margin-left: 10px;
}

/* Landscape layout (with min-width) */
@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
	body {
		padding: 0;
	}
	
	.panel { 
		padding: 40px;
	}
}

h1 {
    font-size:24px;
    font-weight:normal;
    margin:0px;
    overflow:visible;
    padding:0px;
    text-align:center;
}

.hidden {
	display: none;
}

.shadow {
	box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}


@media screen and (prefers-color-scheme: dark) {
    body {
        background-image: linear-gradient(to bottom, #585858 0%, #1B1B1B 51%);
    }
}
