/*** misc styles ***/
a, a:visited {
	color: #88b;
	font-weight: bold;
	text-decoration: none;
}

a:hover {
	color: #99b;
}

.ice2-unit, .ice2-prefix {
	color: #999;
}

.ice2-prefix {
	font-size: 80%;
}

/* remove arrows from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type=number] {
	-moz-appearance: textfield;
}

/*** single line text entry ***/
.ice2-entry {
	border: 1px solid #88b;
	border-radius: 4px;
	height: 38px;
	line-height: 28px;
	padding: 4px 16px;
	margin: 0 16px;
	
	transition: box-shadow 0.1s ease;
}

/*** slider entry ***/
.ice2-entry-slider {
	
}

.ice2-entry-slider .limit {
	width: 3rem;
	text-align: center;
}

.ice2-entry-slider .slider {
	flex-grow: 1;
}

.ice2-entry-slider .drag-input {
	display: flex;
}

.ice2-entry-slider .direct-input {
	text-align: center;
}

.ice2-entry-slider .direct-input .direct {
	width: 20rem;
	margin-top: 16px;
	font-size: 200%;
	text-align: center;
}

/*** form ***/
.ice2-entry-label {
	width: 8rem;
	text-align: right;
}

.ice2-entry-label.wide {
	width: 15rem;
}

.ice2-form-row {
	margin: 16px 0;
	display: flex;
	align-items: baseline;
}

.ice2-form-row > input {
	width: 75%;
}

.ice2-form-row-subtext {
	padding-left: 35%;
	font-size: 65%;
	margin-top: -16px;
	opacity: 0.5;
}

.ice2-entry:focus {
	box-shadow: 0px 0px 4px 0px #88b;
}

/*** Generic buttons ***/
.ice2-bouitton {
	color: #88b;
	border: 1px solid #88b;
	border-radius: 4px;
	height: 38px;
	line-height: 28px;
	display: inline-block;
	padding: 4px 16px;
	text-align: center;
	cursor: pointer;
	user-select: none;
	transition-property: box-shadow, background-position;
	transition-duration: 0.1s, 0.5s;
	transition-timing-function: ease, cubic-bezier(.19,1,.22,1);
	
	/* used by embedded progressbar */
	background-size: 200% 100%;
	background-position: -100% 0%;
}

.ice2-bouitton.hidden {
	opacity: 0;
	pointer-events: none;
}

.ice2-bouitton.removed {
	display: none;
}

/* Collapse the admin button if hidden */
.ice2-bouitton.ctl-adm.hidden {
	display: none;
}

.ice2-bouitton:hover {
	box-shadow: 0px 0px 4px 0px #88b;
}

.ice2-bouitton:active {
	box-shadow: 0px 0px 0px 0px #88b;
}

.ice2-bouitton.primary {
	color: #fff;
	font-weight: bold;
	background-color: #88b;
	box-shadow: 0px 0px 8px 0px #88b;
	transition-duration: 0.25s, 0.5s;
	
	/* embedded progressbar */
	background-image: linear-gradient( 90deg, #44b, #44b 50%, #88b 50%, #88b 100% );
}

.ice2-bouitton.primary:hover {
	box-shadow: 0px 0px 16px 0px #88b;
}

.ice2-bouitton.primary:active {
	box-shadow: 0px 0px 4px 0px #88b;
}

.ice2-bouitton.bad.primary {
	border-color: #a44;
	background-color: #a44;
	box-shadow: 0px 0px 8px 0px #a44;
	
	/* embedded progressbar */
	background-image: linear-gradient( 90deg, #900, #900 50%, #a44 50%, #a44 100% );
}

.ice2-bouitton.primary.inprogress {
	background-position: -175% 0%;
	pointer-events: none;
}

.ice2-bouitton.primary.done {
	background-position: -200% 0%;
	pointer-events: none;
}

/* 5s countdown */
.ice2-bouitton.countdown {
	background-image: linear-gradient( 90deg, #eef, #eef 50%, #fff 50%, #fff 100% );
	transition-duration: 0.1s, 5s;
	transition-timing-function: ease, linear;
	background-position: -200% 0%;
}

.ice2-bouitton.bad.primary:hover {
	box-shadow: 0px 0px 16px 0px #a44;
}

.ice2-bouitton.bad.primary:active {
	box-shadow: 0px 0px 4px 0px #a44;
}

.ice2-bouitton.disabled {
	color: #bbb;
	border-color: #eee;
	cursor: not-allowed;
	pointer-events: none;
}

.ice2-bouitton.disabled:not(.no-bars) {
	background-color: #eee; /* gradient fallback */
	background-image: repeating-linear-gradient(
		-45deg,
		#fff,
		#fff 16px,
		#eee 16px,
		#eee 32px
	);
}

/* fix icon offset */
.ice2-bouitton > i {
	margin-top: 6px;
}

/*** button group ***/
.ice2-bouitton-group {
	display: flex;
	/*margin-top: 16px;
	margin-bottom: 16px;*/
}

.ice2-bouitton-group > * {
	flex: 1 1 0; /* grow, shrink, basis */
	text-align: center;
	margin-right: 16px;
}

.ice2-bouitton-group > *:last-child {
	margin-right: 0;
}

.ice2-bouitton-group.ice2-lone-bouitton {
	margin: 0 128px;
}

/*** button with label ***/
.ice2-btn-with-label {
	margin: 16px 0;
	display: flex;
}

.ice2-btn-with-label .ice2-bouitton {
	width: 8rem;
	flex-shrink: 0;
	margin-right: 16px;
}

.ice2-btn-with-label .ice2-label p:first-child {
	margin-top: 0;
}

/*** notebook ***/
.ice2-notebook {
	overflow-y: auto;
}

.disabled {
	pointer-events: none;
}

.ice2-notebook-switcher.hidden {
	display: none;
}

.ice2-notebook-switcher .ice2-bouitton {
	border-radius: 4px 4px 0 0;
	border-bottom: none;
	border-color: #ddf;
}

.ice2-notebook-switcher .ice2-bouitton.primary {
	box-shadow: none;
	position: relative;
	top: 1px;
	background-color: #fff;
	background-image: none;
	color: #88b;
	border-color: #88b;
}

.ice2-notebook-stack {
	padding: 16px;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
	border-top: 1px solid #88b;
}

.ice2-notebook-stack.no-tab-bar {
	border-top: none;
}

.ice2-notebook-page {
	min-height: 100px;
	grid-area: 1 / 1 / 1 / 1;
	opacity: 0;
	z-index: 1;
	line-height: 150%;
	transition: all 0.5s;
}

.ice2-notebook-page.visible {
	opacity: 1;
	z-index: 2;
}

.ice2-notebook-page p {
	text-align: justify;
}

.ice2-entry-smallint {
	display: flex;
	align-items: center;
	margin: 16px 0;
}

.ice2-entry-smallint.disabled {
	opacity: 0;
	cursor: not-allowed;
	pointer-events: none;
}

.ice2-entry-smallint .label {
	flex-grow: 1;
}

.ice2-entry-smallint-input {
	display: flex;
}

.ice2-entry-smallint-input > .ice2-bouitton {
	font-size: 200%;
	width: 42px;
	line-height: 24px;
	padding: 4px 0;
}

.ice2-entry-smallint-input > .ice2-entry {
	text-align: center;
	font-size: 125%;
	width: 8rem;
	background: none;
	padding-right: 2.5rem;
}

.ice2-entry-smallint-input > .ice2-unit {
	width: 3.5rem;
	margin-left: -3.5rem;
	font-size: 125%;
	padding: 4px 0;
	line-height: 28px;
	color: #88b;
}

.ice2-entry-smallint-input > .entry-wrapper {
	
}

.ice2-plan-row {
	display: flex;
	margin: 4px 0;
}

.ice2-plan-row .label.highlighted {
	font-weight: bold;
}

.ice2-plan-row .plan-cell {
	width: 86px;
	padding: 4px;
}

.ice2-plan-row .plan-cell.good {
	color: #181;
}

.ice2-plan-row .plan-cell.bad {
	color: #811;
}

.ice2-plan-row .plan-type {
	font-size: 80%;
	line-height: normal;
	line-height: 14px;
}

.ice2-plan-row .plan-time {
	font-size: 70%;
	margin-top: 0;
	line-height: 14px;
}

.ice2-plan-row .schedule {
	display: inline-flex;
	gap: 4px;
	flex-grow: 1;
	padding: 0 16px;
	position: relative;
}

.ice2-plan-table {
	position: relative;
}

.ice2-plan-table .editor {
	background: white;
	box-shadow: 0px 0px 32px gray;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 360px;
	padding: 8px;
	border-radius: 8px;
	z-index: 10;
	pointer-events: auto;
	
	opacity: 1.0;
	transition-property: opacity;
	transition-duration: 0.2s;
}

.ice2-plan-table .editor.hidden {
	opacity: 0.0;
	pointer-events: none;
}

.ice2-plan-table .editor input, .ice2-plan-table .editor select {
	width: 6rem;
	line-height: 32px;
	border-radius: 4px;
	border: 1px solid #88b;
	height: 38px;
	
	transition-property: border, box-shadow;
	transition-duration: 0.4s;
}

.ice2-plan-table .editor input:focus {
	outline: none;
	box-shadow: 0px 0px 4px #88b;
}

.ice2-plan-table .editor input.bad {
	color: #f00;
	border: 1px solid #f00;
	box-shadow: 0px 0px 12px rgba(255, 0, 0, 0.3);
}

.ice2-plan-table .editor .inputs, .ice2-plan-table .editor .labels {
	display: flex;
	justify-content: space-between;
}

.ice2-plan-table .editor .inputs .mode {
	width: 96px;
}

.ice2-plan-table .editor .inputs .manpwr {
	width: 48px;
	text-align: center;
	margin: 0 24px;
}

.ice2-plan-table .editor .inputs .hon, .ice2-plan-table .editor .inputs .hoff {
	width: 64px;
	text-align: center;
	height: 38px;
}

.ice2-plan-table .editor .labels > div {
	display: inline-block;
	text-align: center;
	font-size: 80%;
	color: #888;
}

.ice2-plan-table .editor .labels .mode {
	width: 96px;
}

.ice2-plan-table .editor .labels .manpwr {
	width: 64px;
	margin: 0 16px;
}

.ice2-plan-table .editor .labels .hon, .ice2-plan-table .editor .labels .hoff {
	width: 64px;
}

.ice2-plan-table .editor .manpwr {
	opacity: 0.0;
	transition-property: opacity;
	transition-duration: 0.2s;
	pointer-events: none;
}

.ice2-plan-table .editor .manpwr.visible {
	opacity: 1.0;
	pointer-events: auto;
}

.ice2-plan-table .editor .desc {
	color: #222;
	font-style: italic;
	text-align: center;
	padding: 8px 16px 16px 16px;
	height: 5rem;
	transition-property: color;
	transition-duration: 0.2s;
}

.ice2-plan-table .editor .desc.bad {
	color: #822;
}

.ice2-plan-row > .label {
	width: 60px;
	text-align: right;
	line-height: 38px;
}

.ice2-warning {
	padding-left: 64px;
	color: #900;
	background: no-repeat left/48px url("/img/warning.png");
	min-height: 48px;
}

.ice2-warning.optional {
	opacity: 0.0;
	transition-property: opacity;
	transition-duration: 0.2s;
}

.ice2-warning.optional.visible {
	opacity: 1.0;
}

li.hidden {
	display: none;
}

.message {
	position: fixed;
	top: 32px;
	left: 50%;
	transform: translate(-50%, 0%);
	
	/*width: 40rem;*/
	padding: 16px 32px;
	/*line-height: 48px;*/
	text-align: center;
	
	background-color: rgb(255, 255, 255, 0.6);
	box-shadow: 0px 0px 16px #88b;
	border-radius: 8px;
	pointer-events: none;
	opacity: 0;
	border: 1px solid #88b;
	transition: opacity 1s;
}

.message.visible {
	opacity: 1;
	transition: opacity 0.2s;
}

.ice2-notes .note {
	margin-bottom: 16px;
	padding:  4px 8px;
}

.ice2-notes .heading {
	display: flex;
	gap: 16px;
}

.ice2-notes .heading.hidden {
	display: none;
}

.ice2-notes .time {
	color: #888;
}

.ice2-notes .author {
	color: #444;
}

.ice2-notes .text {
	color: #222;
}

.ice2-admin-block {
	margin: 16px 0px;
}

.ice2-admin-block-label {
	
}

.ice2-admin-entry {
	width: 100%;
	resize: vertical;
	
	border: 1px solid #88b;
	border-radius: 4px;
	padding: 8px 16px;
	
	font-size: 16px;
}

textarea.ice2-admin-entry {
	height: 6rem;
	resize: vertical;
	padding: 16px;
}
