/* Trick-or-Treat Doors */

/* The grid in the post editor */
#tot-panel h3 {
	margin-top: 0;
}

.tot-status-test {
	border-left: 3px solid #ff7518;
	padding-left: 6px;
}

.tot-chosen {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-weight: bold;
}

.tot-chosen[hidden] {
	display: none;
}

.tot-street {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.tot-grid {
	display: grid;
	grid-template-columns: repeat(5, 88px);
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tot-house {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 88px;
	padding: 4px 2px 5px;
	border: 2px solid #3a2a50;
	border-radius: 6px;
	background: #1a0f2e;
	color: #f4e8ff;
	font: inherit;
	cursor: pointer;
	transition: transform .1s, border-color .1s;
}

.tot-house img {
	width: 64px;
	height: 64px;
	image-rendering: pixelated;
}

.tot-house:hover:not(:disabled),
.tot-house:focus-visible {
	transform: translateY(-2px);
	border-color: #ff7518;
}

.tot-house.tot-selected {
	border-color: #ffb347;
	box-shadow: 0 0 0 2px #ff7518, 0 0 12px #ff7518;
}

.tot-house:disabled {
	cursor: not-allowed;
}

.tot-house.tot-spent img {
	filter: grayscale(1) brightness(.55);
}

.tot-house.tot-spent {
	background: #2a2a2e;
	border-color: #444;
	color: #999;
}

.tot-num {
	font-weight: bold;
	font-size: 1.1em;
	line-height: 1.4;
}

.tot-candy {
	display: flex;
	gap: 3px;
}

.tot-candy i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

/* Candy still to hand out, and candy already given */
.tot-candy .tot-left {
	background: #ff7518;
	box-shadow: inset -2px -2px 0 #c2410c;
}

.tot-candy .tot-used {
	background: #555;
}

.tot-mine-star {
	position: absolute;
	top: 3px;
	right: 4px;
	color: #ffd34d;
	font-size: 11px;
}

.tot-tracker {
	min-width: 9rem;
}

.tot-tracker h4 {
	margin: 0 0 4px;
}

.tot-tracker ol {
	columns: 2;
	column-gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tot-tracker li {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	padding: 1px 0;
}

.tot-tracker li.tot-spent {
	opacity: .5;
	text-decoration: line-through;
}

@media (max-width: 700px) {
	.tot-street {
		flex-direction: column;
	}

	.tot-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		width: 100%;
	}

	.tot-house {
		width: 100%;
	}

	.tot-house img {
		width: 48px;
		height: 48px;
	}

	.tot-tracker ol {
		columns: 4;
	}
}

/* The fortune under a post: its colour is picked at random when the door is opened */
.tot-fortune {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 4px;
	padding: 6px 10px;
	border: 1px solid var(--tot-colour);
	border-left-width: 4px;
	border-radius: 4px;
	/* Its own dark background, so the random colours read the same in any style */
	background: #111;
	color: #e8e0d0;
}

.tot-fortune p {
	margin: 0;
}

.tot-fortune-house {
	flex: none;
	width: 40px;
	height: 40px;
	image-rendering: pixelated;
	border-radius: 3px;
}

.tot-fortune-text {
	color: var(--tot-colour);
}

.tot-test-tag {
	margin-left: 4px;
	padding: 0 4px;
	border-radius: 3px;
	background: #888;
	color: #fff;
	font-size: .85em;
}

