:root {
	--cell-border: #fd971f;
}

#memorySection {
	display: flex;
	flex-direction: column;
}

#memorySection h2 {
	text-align: center;
	color: var(--cell-border);
}

#memoryContainer {
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 3rem;
	position: relative;
	overflow: hidden;
	font-family: NotoSansMono, sans-serif;
}

@media (width < 640px) {
	#memoryContainer {
		justify-content: space-between;
	}
}

#memoryContainer h3 {
	color: var(--cell-border);
	text-align: center;
	font-family: inherit;
}

.memory-section {
	width: 40%;
	max-width: 15rem;
	overflow-y: auto;
	padding: 0 1px;
}

.memory-section::-webkit-scrollbar {
	display: none;
}

.stack-frame {
	position: relative;
	display: flex;
	flex-direction: row;
}

/*.stack-frame h3 {*/
/*	color: var(--highlight-color);*/
/*	position: absolute;*/
/*	left: -5rem;*/
/*	margin: 0;*/
/*	font-size: 1rem;*/
/*}*/

/*Vertical writing*/
.stack-frame hr {
	background-color: var(--cell-border);
	border: none;
	height: 1px;
	position: absolute;
	width: 98%;
	top: -1px;
	margin: 0;
	left: 0;
}
.stack-frame .frame-name {
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
	display: inline;
	white-space: nowrap;
	padding: 0.5rem 0;
	box-sizing: border-box;
	width: 1.7rem;
}
.stack-frame .frame-name h4 {
	overflow-y: hidden;
	text-overflow: ellipsis;
	color: #fd971f;
	margin: 0;
	font-size: 1rem;
	writing-mode: vertical-lr; /* sideways-lr does not work well with text-overflow: ellipsis */
	transform: rotate(180deg);
	align-self: flex-start;
	text-align: end;
	height: 100%;
}


.cells-container {
	flex-grow: 1;
	margin-left: 1.7rem;
}

.memory-cell {
	font-family: inherit;
	letter-spacing: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: 1px solid var(--cell-border);
	border-radius: 5px;
	color: var(--title-color);
	width: 100%;
	max-width: 15rem;
	height: 5rem;
	position: relative;
	transition: box-shadow 0.2s ease-out;
	background-color: var(--background-color);
}

.memory-cell:hover:not(.lixo),
.memory-cell:focus-visible:not(.lixo) {
	z-index: 2;
	box-shadow: 0 0 18px 1px var(--cell-border);
	cursor: pointer;
}

.memory-cell .address {
	position: absolute;
	top: -1px;
	left: -1px;
	font-size: 0.6rem;
	border: 1px solid var(--cell-border);
	border-radius: 5px 0 5px 0;
	padding: 0.15rem 0.2rem;
}

.memory-cell .name,
.memory-cell .type {
	position: absolute;
	bottom: 0.25rem;
	font-size: 0.8rem;
}

.memory-cell .name {
	right: 0.4rem;
	font-size: 0.9rem;
}

.memory-cell .type {
	left: 0.4rem;
}

.memory-cell .content {

}
.memory-cell.pointer .type {
	color: var(--highlight-color);
}

.memory-cell.lixo {
	opacity: 0.2;
}
