@import url('./css-baseline.css');
@import url('./input.css');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans:wght@400;600&display=swap');
@import url('./material-icons/material-icons.css');
@import url('/$@xe-development/ui/css/animations.css');
@property --loading-anim-offset { syntax: '<percentage>'; initial-value: 0%; inherits: true; }
@keyframes loading-anim {
	from {
		--loading-anim-offset: 0%;
	}
	to {
		--loading-anim-offset: 180%;
	}
}

* {
	font-family: Open Sans;
	box-sizing: border-box;
}
:host, body {
	color: var(--fg);
}
a {
	color: var(--fg);
	text-decoration: none;
}

::-webkit-scrollbar-track {
	background-color: var(--bg-scrollbar);
}
::-webkit-scrollbar {
	width: 8px;
	background-color: var(--bg-scrollbar);
}
::-webkit-scrollbar-thumb {
	background-color: var(--fg-scrollbar);
	border-radius: 0;
	border:none;
}
::selection {
	background: var(--accent-bg);
}
[board-item] {
	width: 322px;
	position: absolute;
	box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color);
	border-radius: var(--border-radius);
	overflow: hidden;
	contain: strict;
}
[board-item].bg-element {
	z-index: 0;
}

[board-item].remote-transform {
	transition-property: top,left,width,height;
	transition-duration: 500ms;
	transition-timing-function: linear;
}
@keyframes desaturateFadeOut {
	0% {
		filter: saturate(100%) brightness(100%);
		opacity: 1;
	}
	100% {
		filter: saturate(0%) brightness(50%);
		opacity: 0;
	}
}
[board-item].remote-delete {
	animation: desaturateFadeOut 300ms ease-out;
}
@keyframes fadeIn {
	0% { opacity: 0; }
	100% { opacity: 1; }
}
[board-item].remote-create {
	animation:  fadeIn 200ms ease-out forwards;
}
[board-item].remote-update:before {
	content: '';
	position: absolute;
	display: block;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,.1);
	animation:  fadeIn 500ms linear;
	animation-direction: reverse;
}

[contenteditable]:empty:before {
	content: attr(placeholder);
	font-style: italic;
	display: inline-block;
	opacity: .5;
}
[contenteditable]:focus {
	outline: 1px solid var(--accent);
	outline-offset: -1px;
}
[drag-handle] {
	cursor: grab;
}
[data-tooltip]:not(.active):hover:after,
[data-tooltip].active-tooltip:after {
	content: attr(data-tooltip);
	display: inline-block;
	position: absolute;
	height: 100%;
	left: 100%;
	top: 0;
	line-height: 3rem;
	white-space: nowrap;
	background: var(--bg-dark);
	padding: 0 1rem;
	pointer-events: none;
	z-index: 10000;
}
[resize-handle] {
	opacity: 0;
	transition: opacity .2s linear;
	width: 1.5rem;
	height: 1.5rem;
	position: absolute;
	bottom: 0;
	right: 0;
	cursor: se-resize;
	mask-image: url(/css/resize-handle.svg);
	mask-size: 100%;
	backdrop-filter: invert(1);
}
:host(:hover) [resize-handle] {
	opacity: .8;
}

html, body {
	display: flex;
	flex-direction: column;
	font-size: 14px;
	height: 100vh;
	width: 100vw;
	color: var(--fg);
	background: var(--bg);
	user-select: none;
	padding: 0;
	margin: 0;
}
button span {
	vertical-align: middle;
}
button {
	background: var(--bg-input);
	color: var(--fg-menu);
	position: relative;
	white-space: nowrap;
}
button,input[type="submit"],input[type="button"] {
	cursor: pointer;
}
[hidden] {
	display: none !important;
}

.menu {
	display: block;
	background: var(--bg-menu);
}
.menu button {
	aspect-ratio: 1;
	width: 3em;
	height: 3em;
	box-shadow: none;
	border: none;
	cursor: pointer;
	&.active {
		background: var(--bg-menu-active);
		filter: none;
	}
}
.button:hover,.button.active,
button:hover,button.active,button[selected] {
	filter: brightness(1.2);
}
.button:active,
button:active {
	color: var(--accent);
}
[board-item].dragging {
	z-index: 9999;
}
[board-item][selected] {
	outline: 2px solid var(--accent);
	outline-offset: 0;
}

[contenteditable]:hover {
	background: rgba(255,255,255,.1);
}
[contenteditable] {
	pointer-events: var(--app-edit, all) !important;
}

hr {
	margin: 1rem 0;
	border: none;
	height: 1px;
	background: light-dark(rgba(0, 0, 0, .3),rgba(0,0,0,.8));
	box-shadow: 0 1px 0 light-dark(rgba(255, 255, 255, .75),rgba(255,255,255,0.3));
}
hr[title]:before {
	content: attr(title);
	background: var(--bg);
	display: inline-block;
	left: 50%;
	position: absolute;
	transform: translate(-50%, -50%);
	padding: 0 .5rem;
}

.comment {
	margin-top: .5em;
}
.comment img {
	width: 2.6em;
	margin-right: .5em;
	flex: 0;
}
.comment > div {
	display: flex;
	align-items: flex-start;
}
.comment .meta {
	opacity: .7;
	font-size: .8em;
	margin-left: 4em;
}
.comment p {
	background: var(--bg);
	padding: .6em;
	white-space: pre-line;
}

.comment .editbar {
	float: right;
}
.comment .editbar span {
	cursor: pointer;
}