#tierList {
    margin-bottom: 2rem;
}

#tierListMaker {
	margin: 1rem 0 0;
}
#tierListMaker:not(:has(.tier)) {
    min-height: 716px;
    background-color: var(--ui-bg-color);
}
#tierListMaker .brawlers-list {
	gap: 0;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
	grid-template-rows: repeat(auto-fill, minmax(56px, 1fr));
    margin: 0;
    padding: 0.375rem;
}
#tierListMaker .item {
    padding: 0.25rem;
}
#tierListMaker .brawler div {
	padding-top: 80%;
}
.na-rank {
	position: sticky;
	bottom: -1px;
	max-height: 20vh;
	padding-right: 2.5rem;
	overflow: auto;
	grid-template-columns: 1fr;
}

#openTierListMaker {
    margin-top: 1rem;
}

#tierListMaker .brawler div, #tierListMaker .brawler img, #tierListMaker .brawler span {
    user-select: none;
    pointer-events: none;
}

.draggable {
    touch-action: none;
	cursor: grab!important;
}
.dragging {
	position: absolute;
	z-index: 1;
	width: 60px;
	cursor: grabbing!important;
}
body:has(.dragging) {
	user-select: none;
}

#tierListForm label {
	display: block;
	margin-bottom: 0.5rem;
}
#tierListForm input[type=text], #tierListForm textarea {
	margin-bottom: 1.5rem;
	padding: 7px;
	width: 100%;
	font-weight: 500;
	color: var(--heading-color);
	border: none;
	outline: none;
	border-radius: 0.25rem;
	background: var(--ui-bg-color);
}
#tierListForm textarea {
	resize: vertical;
}
#tierListForm input[type=text]::placeholder, #tierListForm textarea::placeholder {
	color: #7f7d8f;
}

#loadingText {
	display: none;
}
#tierListLogo {
	position: absolute;
	right: 0.75rem;
	bottom: 1rem;
}
#tierListForm button, #tierListImageForm button {
	margin-bottom: 1rem;
}
#saveTierList {
	width: 194px;
}
#saveTierList:disabled {
    cursor: default;
    filter: saturate(0);
}

#resetButton {
    display: flex;
    align-items: center;
    margin: 1px 0 0 auto;
    padding: 0.125rem 0.5rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--font-color);
    border: 1px solid var(--global-nav-color);
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    background-color: var(--ui-bg-color);
}
#resetButton svg {
	margin-left: 0.25rem;
	fill: var(--font-color);
}

#tierListMakerSection:has(#tierListMaker[hidden]) #resetButton, #tierListMakerSection:has(#tierListMaker[hidden]) #saveTierList, #openTierListMaker[hidden] {
    display: none;
}

@media (min-width: 768px) {
	#tierListMaker .brawlers-list {
		grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
		grid-template-rows: repeat(auto-fill, minmax(64px, 1fr));
        padding: 0.5rem;
	}
}
@media (pointer:fine) {
	.na-rank {
		position: unset;
		max-height: none;
		padding-right: 0;
	}
}


/* WINDOWS */
.window-container {
	display: none;
	justify-content: center;
	align-items: center;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 200;
	width: 100%;
	height: 100%;
	background-color: rgb(0 0 0 / 25%);
}
.window {
	position: relative;
	display: flex;
	flex-direction: column;
	z-index: 5;
	width: 100%;
	max-width: 450px;
	max-height: 500px;
	margin: 1rem;
	overflow: hidden;
    background-color: var(--ui-bg-color);
}
.window-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0.75rem;
	background-color: #363c50;
}
.window-title > span {
	color: var(--heading-color);
	font-weight: 600;
	font-size: 1rem;
	text-transform: uppercase;
}
.window-title > button {
	width: 28px;
	height: 28px;
	padding: 5px;
	cursor: pointer;
	border: none;
	border-radius: 0.375rem;
	background: #4c5470;
}
.window-title > button > svg {
	pointer-events: none;
	fill: none;
	stroke: var(--secondary-heading-color);
	stroke-miterlimit: 10;
	stroke-width: 4px;
	transform: rotate(45deg);
}
.window-content-container {
    padding: 1rem;
	overflow-y: auto;
	overflow-x: hidden;
    color: var(--ui-font-color);
}


/* HIDDEN TIER LIST */
#tierListImageContainer canvas {
	width: 100%!important;
	height: auto!important;
	margin-bottom: 1rem;
	box-shadow: 0 1px 8px 1px rgb(0 0 0 / 35%);
}
#tierListImageContainer a {
	display: block;
	width: fit-content;
}
#hiddenTierListContainer {
	position: relative;
	overflow: hidden;
}
#hiddenTierList {
	position: absolute;
	bottom: -100%;
	left: 0;
	display: none;
	width: 1080px;
	background-color: var(--bg-color);
}
#hiddenTierList .tier {
	border-radius: 0;
	box-shadow: none;
}
#hiddenTierList .tier {
	grid-template-columns: 55px 1fr;
}
#hiddenTierList a {
	z-index: 1;
}
#hiddenTierList .cards-list {
    padding: 0.625rem 0.625rem 0.75rem 0.625rem;
    gap: 0.375rem 0.375rem;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}

.tier-list-link-container {
	display: grid;
    grid-template-columns: 1fr auto;
    border-radius: 0.375rem;
}
.tier-list-link-container input {
    padding: 0 0.5rem 0 0.75rem;
    font-size: 0.625rem;
    color: var(--heading-color);
    border: none;
    background-color: #1d212f;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}
.tier-list-link-container button {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    border: 1px solid #326ef7;
    background-color: #265fe3;
}
.tier-list-link-container + p {
	margin: 0.25rem 0 1rem;
    font-size: 0.875rem;
}
#tierListLink {
	color: var(--yellow-font-color);
    text-decoration: underline;
}

.tippy-box {
    color: #fff;
    box-shadow: none;
	background-color: var(--global-nav-color);
}
.tippy-box[data-placement^='top'] > .tippy-arrow::before {
    bottom: -8px;
}
.tippy-box[data-placement^='bottom'] > .tippy-arrow::before {
    top: -6px;
}
.tippy-content {
    padding: 0.375rem 0.75rem;
}