/**
 * @name UnShittifySource
 * @author Nak.kiwi
 * @description Fix the blatant design mistakes and disalignments :D
 * @version 0.0.1
 */

/* -----------------  UN-SHITIFY DISCORD ------------------- *//*

By @nak.kiwi (You can call me Nakki, feel free visit wy cozy website at nak.kiwi)

A personal project to fix the blatant design mistakes and disalignments in the Discord app.
If it's unreadable, it's by design, I didn't want you to steal my secret sauce.

This is a discord unoficcial theme, it is not affiliated with Discord in any way.
If you are discord and wish for this to be taken down, please message me at hello@nak.kiwi


*//* ------------------------------------------------------- */

/* ----------------------- OPTIONS ------------------------- *//*

- CIRCLE ICONS:
	- See https://github.com/MaiRiosIPla/unshittify-discord/blob/main/README.md

*//* ------------------------------------------------------- */

/* Imports */
/* Refreshed Seamless Chat Bar by NSPG911 */
@import url("https://nspc911.github.io/themes/vencord/RefreshedSeamlessChatBar.theme.css");

/* SETTINGS */
:root {
	/* Right padding of the top bar */
	--top-bar-padding: 220px;
	/* Icon scale */
	--icon-scale: 1;

	/* NSPG911 Refreshed Seamless Chat Bar */
	/* Custom padding for the chat box */
	--rscb-chat-box-padding: 8px;
	/* Whether you want the chat to not move up and down when someone starts typing */
	--rscb-no-jump-chat: 0;
}

/* User modal */
.visual-refresh .panels_c48ade {
	right: var(--space-xs) !important;
	left: auto;
	bottom: var(--space-xs);
	width: calc(100% - var(--space-xs) * 2 - var(--custom-guild-list-width));
	z-index: 200 !important;
}

/* Remove top row*/
.visual-refresh .base_c48ade {
	grid-template-rows: [top] 0 [titleBarEnd] min-content [noticeEnd] 1fr [end];
}


/* Top bar and dragging functionality */
.trailing_c38106 {
	gap: 2px;

	/* margin-left: calc(var(--custom-guild-list-width) + var(--space-8)); */
	width: max-content;

	z-index: 2000 !important;
	position: absolute;

	background-color: var(--background-tertiary);
	border-radius: var(--radius-sm);
	top: 6px;
	right: var(--space-xs);
	left: unset;
	padding: 0;
	overflow: hidden;
}
.bar_c38106::before {
	content: "";
	position: fixed;
	top:0;
	right:0;
	left: var(--custom-guild-sidebar-width);
	height: 10px;
	width: 200%;
	z-index: -1 !important;
}
.bar_c38106 {
	margin-left: var(--custom-guild-sidebar-width);
	height: 15px;
	min-height: unset !important;
}

/* Hide bar title */
.title__85643,
.title_c38106 {
	display: none !important;
}

/* Make top icons not overlap bar icons*/
.container__9293f {
	padding-right: var(--top-bar-padding) !important;
	overflow: hidden !important;
}


/* Align discord logo and left bar */
.tree_ef3116 {
	margin-top: 1rem;
}

/* Chat input bar */
.channelTextArea_f75fb0   {
	margin-bottom: var(--space-xs);
	.inner__74017 {
		--custom-channel-textarea-text-area-max-height: 56px;
		--custom-channel-textarea-text-area-height: var(
			--custom-channel-textarea-text-area-max-height
		);
	}
}

/* Fix for search bar */
.search__49676 > div {
	display: flex !important;
	flex-shrink: 1 !important;
}
.searchBar__97492 {
	width: auto !important;
	min-width: 100px !important;
}

/* Fix for user modal rescaling */
.actionButtons_e131a9 .button__201d5 {
	padding: unset !important;
}

/* Fix for server bar overflowing */
.itemsContainer_ef3116, .tree_ef3116 {
	height: calc(100% - 1rem);
}
.visual-refresh .guilds_c48ade {
	margin-bottom: 0;
}
/* _____ Server icons scale _____________________________________________________*/

/* FOLDER SCALING */
.wrapper__48112 {
	--guildbar-folder-size: calc(48px / var(--icon-scale));
	--custom-guild-list-width: calc((var(--guildbar-avatar-size) + var(--custom-guild-list-padding)*2)/var(--icon-scale));
	zoom: var(--icon-scale);
}
/* Open folder Icon */
.folder__48112, .folderIconWrapper__48112 {
    height: calc(var(--guildbar-folder-size) * var(--icon-scale));
    width: calc(var(--guildbar-folder-size) * var(--icon-scale));
}
/* Folder BG */
.visual-refresh .expandedFolderBackground__48112 {
    left: calc(var(--custom-guild-list-padding)/var(--icon-scale) - (var(--guildbar-folder-size)* var(--icon-scale) - var(--guildbar-avatar-size)/var(--icon-scale))/2);
	width: calc(var(--guildbar-folder-size) * var(--icon-scale));
}
/* Closed folders inner preview*/
.visual-refresh .closedFolderIconWrapper__48112 {
	zoom: var(--icon-scale);
}
/* DC logo */
.tutorialContainer__1f388 > .listItem__650eb > .listItemWrapper__91816, .tutorialContainer__650eb > .listItem__650eb > .listItemWrapper__91816 {
	zoom: var(--icon-scale);
}
#app-mount > div.appAsidePanelWrapper_a3002d > div.notAppAsidePanel_a3002d > div.app_a3002d > div > div.layers__960e4.layers__160d8 > div > div > div > div.content_c48ade > div.sidebar_c48ade > nav > ul > div.itemsContainer_ef3116 > div > div:nth-child(5) > div.listItemWrapper__91816 > div {
	zoom: var(--icon-scale);
}

/* SERVER SCALING */
.stack_dbd263[aria-label="Servers"] > .listItem__650eb > div:nth-child(2) .wrapper_cc5dd2 {
	zoom: var(--icon-scale);
}
.visual-refresh .listItem__650eb .wrapper_cc5dd2:not(.wrapper__48112) {

}

/* HIDE USERNAMES (FOR DEV SNAPSHOTS) */
/* .username__0a06e, .overflow__82b15 {
	filter: blur(3px);
} */

/* Transitions for dev test */
/* * {
	transition: all 2s ease-in-out !important;
} */