/* The plex's styles that do not depend on the brain. PlexControl writes the rest itself (the field's size and
   background, and the size of the indicator icons), because they come from the brain's settings. The pages of the
   apps link this file, and so does the page that plays a featured brain's miniature plex in Community
   (plex-preview/index.html), so that both draw the plex alike. */

.plex {
	display: grid;
	grid-template-columns: 25% 25% 25% 25%;
	grid-template-rows: calc(45% - 8rem) 8rem 55%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	position: relative;
	background-size: cover;
}

.tht {
	margin-left: auto;
	margin-right: auto;
	width: fit-content;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 0;
	max-width: 100%;
}

/* The scene-node store and canvas is the field, and the hover card in the field is drawn on the canvas (the hover pass
   of sceneRenderer). The .tht rules below style the remaining real .tht elements: the rows of the accessory lists and
   their hover overlay clones (.hovered-tht). */
/* A thought that is going away keeps to one line while its font size animates. */
.tht.old .thought-control div {
	white-space: nowrap !important;
	overflow-wrap: normal !important;
	text-wrap: nowrap !important;
}

.tht.multiline-wrap {
	white-space: normal;
	text-overflow: unset;
}

.tht.multiline-wrap .thought-control {
	overflow: visible;
}

.tht.multiline-wrap .thought-control div {
	white-space: normal !important;
	overflow-wrap: anywhere !important;
	text-wrap: balance !important;
}

.related-thought {
	opacity: 0.5;
	font-size: 50%;
	margin-top: -2px;
	margin-bottom: -2px;
}

.related-thought img {
	max-width: 0.5rem;
	max-height: 0.5rem;
}

/* The small related thoughts of the Normal +1 layout hide their indicator icons. */
.related-thought .indicator-icon {
	display: none;
}

/* A narrow screen, such as a phone held upright, uses a condensed font. */
@media screen and (max-width: 420px) {
	.narrow-text-when-narrow {
		font-family: 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', 'Helvetica Condensed', 'Futura Condensed';
	}
}

.narrow-text {
	font-family: 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', 'Helvetica Condensed', 'Futura Condensed';
}

.indicator-icon {
	position: relative;
	border-top-left-radius: 0.25rem;
	border-bottom-right-radius: 0.25rem;
	border: 1px solid transparent;
	transition: transform 0.25s ease;
}

/* The hover effects apply only where the primary pointer can hover, so that a tap on a phone or a tablet leaves no
   hover behind. */
@media (hover: hover) {
	.indicator-icons > .indicator-icon:hover {
		transform: scale(1.75);
		z-index: 5;
	}
}

.indicator-with-label .indicator-label {
	cursor: pointer;
}

/* A tag's label: its icon and label are spaced, and the whole group is a pill whose top left and bottom right corners
   are rounded in proportion to the font size. */
.indicator-with-label {
	gap: 0.25em;
	padding: 0.1em 0.45em;
	border-radius: 1em 0 1em 0;
}

@keyframes activeThoughtBounce {
	0% { transform: scale(1.0); }
	33% { transform: scale(1.8); }
	100% { transform: scale(1.0); }
}

@keyframes gateHighlightPulse {
	0%, 100% { transform: scale(1); opacity: 0.8; }
	50% { transform: scale(1.5); opacity: 0.3; }
}

@keyframes dragHintTargetPulse {
	0%, 100% { opacity: 0.8; }
	50% { opacity: 0.4; }
}

@keyframes dragHintDash {
	to { stroke-dashoffset: -14; }
}
