
/* Variables */
:root {
	--bkgd: cornflowerblue;/*lavender;*/
	--fade: white;
	--library-lines: rgb(232, 232, 232);

	--navy: rgb(34,0,127);
	--pink: rgb(255,96,125);
	--mint: rgb(127,255,181);
	--softblue: rgb(152,152,253);
	--cyanish: rgb(83,230,255);
	--blue: rgb(61,5,227);
	--column-offset: 60px;
	--card-width: 230px;

	--person: rgb(255, 131, 153);
	--place: pink; /*rgb(255, 200, 200);*/
}

/* Colors */
body {			background-color: var(--bkgd); }
.diary-page { 	background: white; /* papayawhip, seashell, or snow when on white, or floralwhite or cornsilk on lavendar*/ 
				border-color: var(--bkgd); }
.half-page-left { background: white; }
.diary-phrase.highlight { background: #ceceff; }
.dragGhost { 
	border-color: gold !;
	border-width: thick;
	/*background: #ceceff !important; 
	cursor: grabbing !important;*/
} /* transition: none;} */
.dragging { 
	border-color: gold !;
	border-width: thick;
	cursor: grabbing;
	/*background: #ceceff !important; 
	cursor: grabbing !important;*/
} /* transition: none;} */
.trashGhost {
	display: none !important;
}

.phrase 				{ background: rgba(180,180,255,1); }

.phrase.person 			{ background: var(--person); }
.phrase.place 			{ background: var(--place); }
.new-button				{ background: transparent; }

.phrase.connectors		{ background: darkturquoise; } 
.phrase.modifiers		{ background: turquoise; }

.phrase.mind			{ background: hsl(229, 91%, 73%); }
.phrase.body 	 		{ background: hsl(223, 100%, 83%); }
.phrase.social 			{ background: lightskyblue; }
.phrase.recreation 		{ background: hsl(195, 100%, 79%); }
.phrase.expression 		{ background: hsl(195, 100%, 65%); }
.phrase.work			{ background: hsl(219, 91%, 75%); } 
.phrase.chores 			{ background: cornflowerblue; }
.phrase.major-life-events { background: hsl(247, 68%, 55%);
							color: white; }
.phrase.external		{ background: hsl(248, 67%, 33%);
						  color: white; }

/*
.phrase:hover 			{ background: rgba(180,180,255,.5); }
.phrase.movement:hover 	{ background: rgba(127,255,212,.5); }
.phrase.social:hover 	{ background: rgba(255,105,180,.5); }
*/

/* Fonts */
body { 
	font-family: 'PT Sans'; 
	font-weight: lighter;
	font-size: 14px;
	margin: 0px;
}

/* Structure */

#main-container {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center; /* horizontal center */
	height: 100vh;
	width: 100vw;
}

.half-page {
	flex: 1; /* Size relative to the divs to the left and right */ 
	display: flex;
    flex-direction: column;
	/*max-width: 30vw;
	height: 50vh;*/
	height: 100vh;
	/*border-style: solid;
	border-width: 1px;*/
}

/* Diagonal stacked paper effect */
/* Via css-tricks.com/books/volume-i/create-shuffled-stack-papers */

.diary-page {
  /* Need position to allow stacking of pseudo-elements */
  position: relative;
}
/* All three diary pages */
.diary-page, .diary-page::before, .diary-page::after {
 	/* Borders to distinguish sheets from one another */
	border-style: solid;
	border-width: 1px;
	border-color: var(--bkgd);
}
/* Second and third diary sheets */
.diary-page::before, .diary-page::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: white;
}
/* Second sheet */
.diary-page::before {
	top: 7px;
	left: 7px;
	z-index: -1;
}
/* Third sheet */
.diary-page::after {
	top: 14px;
	left: 14px;
	z-index: -2;
}

.diary-page {
	display: flex;
    flex-direction: column;
	margin: auto;
    padding: 5%;
    /* Size needs to be defined in terms of viewport (not %), 
    else pseudo elements won't resize correctly on window resize */
    width: 30vw;
    height: 60vh;
}
/* All contents of diary pages should be on top */
.diary-page>* {
    z-index: 2;
}
#clear-diary {
    position: absolute;
    top: .5rem;
    right: .5rem;
    padding: 1rem;
    font-style: italic;
    font-family: serif;
    letter-spacing: .2rem;
    color: var(--fade);
    background: transparent;
}
#diary {
	margin-top: auto;
	margin-bottom: auto;
	overflow: auto;
	height: 100%;
	width: 100%;
	padding:4px;
	/* Arrange each phrase on its own line */
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
}
#date-container {
	width: 100%;
	padding: 4px;
    display: flex;
    flex-direction: column;
}
#dateline {
	background: unset;
	font-size: 1.3rem;
	margin-bottom: 10px;
}
#trash {
    color: var(--fade);
    background: transparent;
    font-size: 1rem;
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    padding: 1rem;
}
.phrase-container,.phrase {
    cursor: -webkit-grab; /* Chrome 1-21, Safari 4+ */
    cursor:    -moz-grab; /* Firefox 1.5-26 */
    cursor:         grab; /* W3C standards syntax, should come last */
	cursor: grab; 
}
.phrase-container,.phrase:active {
    cursor: -webkit-grabbing;
    cursor:    -moz-grabbing;
    cursor:         grabbing;
}

/* A phrase, as it appears in both library and diary */
.phrase {
	padding: 7px 9px;
	margin: 3px;
	border-radius: 8px;
	font-size: small;
	box-shadow: 0 0px 0px 0px rgba(0, 0, 0, 0.2), 0 0px 7px 0 rgba(0, 0, 0, 0.19);
	display: flex;
	align-items: center;
	/*flex-wrap: wrap;*/
	font-family: 'Helvetica';
	font-weight: 100;
}
.selected>.phrase {
	border-bottom-style: double;
}
#diary .phrase {
	font-family: 'learning_curveregular', 'Helvetica';
    font-size: 1.4rem;
    line-height: 1;
}
.phrase p {
	margin: 0 5px;
}
.phrase p:first-child {
	margin-left: 0;
}
.phrase p:last-child {
	margin-right: 0;
}
.inner-slot {
	/*background: inherit;*/
	/*background: #00a6de;*/
	display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    padding: initial;
    margin: 0;
    border-radius: 10px;
}
/* Symbol for when an inner slot is empty */ 
.empty-indicator {
	border-radius: .3rem;
	min-height: .3rem;
	min-width: .3rem;
	font-size: 1rem;
}
.header-icon {
	padding-right: 10px;
}
.fa-child {
	color: var(--person);
}
.fa-map-marker {
	color: var(--place);
}
.phrase.new-button { 
	box-shadow: none;
	font-size: 1.6rem;
	font-weight: lighter;
	padding: 0;
	cursor: pointer;
	font-family: 'Helvetica Neue';
}
.phrase-container-new {
	cursor: pointer;
}

/* Right-pointing arrow after modifiers 
   by setting the backgrounds of three borders to transparent */
/*
.phrase-container-modifier::after{
	content: "";
    display: inline-block;
    position: relative;
	width: 0; 
	height: 0; 
	top: 3px;
	border-bottom: 13px solid transparent;  /* left arrow slant */
	/*border-top: 13px solid transparent;*/ /* right arrow slant */
	/*border-left: 8px solid darkturquoise;*/ /* bottom, add background color here */
	/*font-size: 0;
	line-height: 0;
}
.phrase.modifier {
	margin: 3px 0px 3px 3px;
    border-radius: 8px 0px 0px 8px;
} */

/* Container for a single phrase */
.phrase-container {
	outline: none;
	/*background: transparent;*/
	z-index: 2;
	display: flex;
	/* For fade animation, need relative and top=0 */
	position: relative;
	top: 0px;
}

/* To animate the clear-diary button effect */
.fade {
	position: relative;
	animation: clearDiaryFade;
	animation-duration: .75s;
	animation-timing-function: ease-in-out;
	animation-fill-mode: forwards;
}
/* Delay animation based on child positioning */
.fade:nth-child(4n)   { animation-delay: 0s; }
.fade:nth-child(4n+1) { animation-delay: .05s; }
.fade:nth-child(4n+3) { animation-delay: .1s; }
.fade:nth-child(4n+2) { animation-delay: .2s; }
/* The animation itself */
@keyframes clearDiaryFade {
	to {
		opacity: 0;
		top: 40vh;
	} 
}

/* For diary and library categories - anything that holds a bunch of phrases */
.phrases-container {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
}

/* Phrases Library */

/* Menu */
.library-menu {
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: center;
    width: 100%;
    font-family: Helvetica;
}
.library-menu-item {
	padding: 1.1rem;
	padding-bottom: .6rem;
    padding-top: 2rem;
    margin: 0 .2rem;
    border-bottom-right-radius: .4rem;
    border-bottom-left-radius: .4rem;
    background: #e8e8e8;
    color: black;
    text-transform: uppercase;
    font-size: smaller;
    letter-spacing: .1rem;
    font-weight: bolder;
}
.library-menu-item:hover {
    background: grey;
    color: white;
}
.library-menu-item.active {
    background: black;
    color: white;
}
.library-submenu {
	display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: center;
    width: 100%;
    padding-bottom: 1rem;
}
.library-submenu-item {
	padding: 1rem;
	/* font stuff in .category-name */
}
.search-box {
	margin: auto;
	background: lavender;
    padding: 5px 10px;
	border-radius: 1rem;
	margin-bottom: 2rem;
    cursor: text;
}
.search-input {
	background: transparent;
	width: 15rem;
    font-size: small;
}
.fa-search {
    cursor: pointer;
    font-size: smaller;
    color: gray;
}
input {
	border: 0;
    outline: 0;
}


/* Container that holds all categories */
.categories-container {
	display: flex;
	flex-flow: row wrap;
	overflow: auto;
	height: 80%;
	margin: auto 4vw;
    border-top: grey;
    border-top-width: 1px;
    border-top-style: solid;
}
.category {
	/* flex-basis: default size of an element before the remaining space is distributed */
	flex-basis: 100%;
	line-height: 0;
	overflow: auto;
	padding: 10px 4px;
}
.category h2 {
    margin-left: .2rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    width: 100%;
}
.category:first-child {
	padding-top: 0;
}
.category-name {
	font-size: smaller;
    font-weight: lighter;
    letter-spacing: .1rem;
    font-family: sans-serif;
    font-style: italic;
}

/* Library categories size/layout adjustment for medium+ screens */
@media all and (min-width: 900px) {
	/* Two small categories share a row */
	.category.small-category { 
		flex: 1; /* instead of 100% flex-basis, equally share one row */
		min-width: 40%;
		border-bottom: var(--library-lines);
	    border-bottom-width: 1px;
	    border-bottom-style: solid;
	    padding-bottom: 15px;
	}
	.small-category:nth-child(odd) { 
		border-right: var(--library-lines);
	    border-right-width: 1px;
	    border-right-style: solid;
	    padding-right: 15px;
	}
	.small-category:nth-child(even) { 
	    padding-left: 15px;
	}
	/* First and second categories (top row) */
	.category:nth-child(-n+2) {
		padding-top: 0;
	}
}

/* Large screens */
@media all and (min-width: 800px) {
  /* Invert order of first sidebar and main
   * And tell the main element to take twice as much width as the other two sidebars 
   */
/*.main { flex: 2 0px; }
  .aside-1 { order: 1; }
  .main    { order: 2; }
  .aside-2 { order: 3; }
  .footer  { order: 4; }*/
}

/* Force the scrollbar to appear, even on macOS */
/* Via http://jsfiddle.net/jeremy/Eh7xT/342/ */
.container::-webkit-scrollbar {
    -webkit-appearance: none;
}
.container::-webkit-scrollbar:vertical {
    width: 11px;
}
.container::-webkit-scrollbar:horizontal {
    height: 11px;
}
.container::-webkit-scrollbar-thumb {
    border-radius: 8px;
    border: 2px solid white; /* should match background, can't be transparent */
    background-color: rgba(0, 0, 0, .5);
}

/* TODO dont use opacity for hover effect */
button {
	border: none;
	outline: none; /* Prevent weird blue highlight for buttons */
	/*opacity: 1;*/
    font-weight: 100;
    cursor: pointer;
}
button:not(.phrase):hover {
	opacity: .5;
}
.phrase-container {
	border: none;
	opacity: 1;
}
.phrase-container:hover {
	opacity: .5;
}

/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on October 16, 2019 */

@font-face {
    font-family: 'learning_curveregular';
    src: url('lib/learning_curve_regular_ot_tt-webfont.woff2') format('woff2'),
         url('lib/learning_curve_regular_ot_tt-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'learning_curvebold';
    src: url('lib/learning_curve_bold_ot_tt-webfont.woff2') format('woff2'),
         url('lib/learning_curve_bold_ot_tt-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
