/**
 * @name system24 (rosé pine)
 * @description a tui-like discord theme. based on rosé pine theme (https://rosepinetheme.com).
 * @author refact0r
 * @version 2.0.0
 * @invite nz87hXyvcy
 * @website https://github.com/refact0r/system24
 * @source https://github.com/refact0r/system24/blob/master/theme/system24-rose-pine.theme.css
 * @authorId 508863359777505290
 * @authorLink https://www.refact0r.dev
*/

/* import theme modules */
@import url("https://refact0r.github.io/system24/build/system24.css");

body {
    /* font, change to '' for default discord font */
    --font: "JetBrains Mono"; /* change to '' for default discord font */
    --code-font: "JetBrains Mono"; /* change to '' for default discord font */
    font-weight: 300 /* normal text font weight. DOES NOT AFFECT BOLD TEXT */;

    /* sizes */
    --gap: 12px; /* spacing between panels */
    --divider-thickness: 4px; /* thickness of unread messages divider and highlighted message borders */
    --border-thickness: 2px; /* thickness of borders around main panels. DOES NOT AFFECT OTHER BORDERS */
    --border-hover-transition: 0.2s ease; /* transition for borders when hovered */

    /* animation/transition options */
    --animations: on; /* off: disable animations/transitions, on: enable animations/transitions */
    --list-item-transition: 0.2s ease; /* transition for list items */
    --dms-icon-svg-transition: 0.4s ease; /* transition for the dms icon */

    /* top bar options */
    --top-bar-height: var(
        --gap
    ); /* height of the top bar (discord default is 36px, old discord style is 24px, var(--gap) recommended if button position is set to titlebar) */
    --top-bar-button-position: titlebar; /* off: default position, hide: hide buttons completely, serverlist: move inbox button to server list, titlebar: move inbox button to channel titlebar (will hide title) */
    --top-bar-title-position: off; /* off: default centered position, hide: hide title completely, left: left align title (like old discord) */
    --subtle-top-bar-title: off; /* off: default, on: hide the icon and use subtle text color (like old discord) */

    /* window controls */
    --custom-window-controls: off; /* off: default window controls, on: custom window controls */
    --window-control-size: 14px; /* size of custom window controls */

    /* dms button options */
    --custom-dms-icon: hide; /* off: use default discord icon, hide: remove icon entirely, custom: use custom icon */
    --dms-icon-svg-url: url("https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg"); /* icon svg url. MUST BE A SVG. */
    --dms-icon-svg-size: 90%; /* size of the svg (css mask-size property) */
    --dms-icon-color-before: var(--icon-secondary); /* normal icon color */
    --dms-icon-color-after: var(
        --white
    ); /* icon color when button is hovered/selected */
    --custom-dms-background: image; /* off to disable, image to use a background image (must set url variable below), color to use a custom color/gradient */
    --dms-background-image-url: url("https://raw.githubusercontent.com/rose-pine/rose-pine-theme/main/assets/icon.png"); /* url of the background image */
    --dms-background-image-size: cover; /* size of the background image (css background-size property) */
    --dms-background-color: linear-gradient(
        70deg,
        var(--blue-2),
        var(--purple-2),
        var(--red-2)
    ); /* fixed color/gradient (css background property) */

    /* background image options */
    --background-image: off; /* off: no background image, on: enable background image (must set url variable below) */
    --background-image-url: url(""); /* url of the background image */

    /* transparency/blur options */
    /* NOTE: TO USE TRANSPARENCY/BLUR, YOU MUST HAVE TRANSPARENT BG COLORS. FOR EXAMPLE: --bg-4: hsla(220, 15%, 10%, 0.7); */
    --transparency-tweaks: off; /* off: no changes, on: remove some elements for better transparency */
    --remove-bg-layer: off; /* off: no changes, on: remove the base --bg-3 layer for use with window transparency (WILL OVERRIDE BACKGROUND IMAGE) */
    --panel-blur: off; /* off: no changes, on: blur the background of panels */
    --blur-amount: 12px; /* amount of blur */
    --bg-floating: var(
        --bg-3
    ); /* set this to a more opaque color if floating panels look too transparent. only applies if panel blur is on  */

    /* other options */
    --small-user-panel: on; /* off: default user panel, on: smaller user panel like in old discord */

    /* unrounding options */
    --unrounding: on; /* off: default, on: remove rounded corners from panels */

    /* styling options */
    --custom-spotify-bar: on; /* off: default, on: custom text-like spotify progress bar */
    --ascii-titles: on; /* off: default, on: use ascii font for titles at the start of a channel */
    --ascii-loader: system24; /* off: default, system24: use system24 ascii loader, cats: use cats loader */

    /* panel labels */
    --panel-labels: on; /* off: default, on: add labels to panels */
    --label-color: var(--text-muted); /* color of labels */
    --label-font-weight: 500; /* font weight of labels */
}

/* color options */
:root {
    --colors: on; /* off: discord default colors, on: midnight custom colors */

    /* text colors */
    --text-0: var(--bg-3); /* text on colored elements */
    --text-1: hsl(245deg, 50%, 95%); /* other normally white text */
    --text-2: hsl(245deg, 50%, 91%); /* headings and important text */
    --text-3: hsl(246deg, 30%, 80%); /* normal text */
    --text-4: hsl(248deg, 15%, 61%); /* icon buttons and channels */
    --text-5: hsl(249deg, 12%, 47%); /* muted channels/chats and timestamps */

    /* background and dark colors */
    --bg-1: hsl(248deg, 25%, 24%); /* dark buttons when clicked */
    --bg-2: hsl(248deg, 25%, 18%); /* dark buttons */
    --bg-3: hsl(247deg, 23%, 15%); /* spacing, secondary elements */
    --bg-4: hsl(249deg, 22%, 12%); /* main background color */
    --hover: hsla(250, 20%, 40%, 0.1); /* channels and buttons when hovered */
    --active: hsla(
        250,
        20%,
        40%,
        0.2
    ); /* channels and buttons when clicked or selected */
    --active-2: hsla(
        250,
        20%,
        40%,
        0.3
    ); /* extra state for transparent buttons */
    --message-hover: hsla(250, 0%, 0%, 0.1); /* messages when hovered */

    /* accent colors */
    --accent-1: hsl(2, 65%, 88%); /* links and other accent text */
    --accent-2: #ebbcba; /* small accent elements */
    --accent-3: #ebbcba; /* accent buttons */
    --accent-4: hsl(2, 55%, 78%); /* accent buttons when hovered */
    --accent-5: hsl(2, 55%, 73%); /* accent buttons when clicked */
    --accent-new: var(
        --red-2
    ); /* stuff that's normally red like mute/deafen buttons */
    --mention: linear-gradient(
        to right,
        color-mix(in hsl, var(--accent-2), transparent 90%) 40%,
        transparent
    ); /* background of messages that mention you */
    --mention-hover: linear-gradient(
        to right,
        color-mix(in hsl, var(--accent-2), transparent 95%) 40%,
        transparent
    ); /* background of messages that mention you when hovered */
    --reply: linear-gradient(
        to right,
        color-mix(in hsl, var(--text-3), transparent 90%) 40%,
        transparent
    ); /* background of messages that reply to you */
    --reply-hover: linear-gradient(
        to right,
        color-mix(in hsl, var(--text-3), transparent 95%) 40%,
        transparent
    ); /* background of messages that reply to you when hovered */

    /* status indicator colors */
    --online: var(--green-2); /* change to #43a25a for default */
    --dnd: var(--red-2); /* change to #d83a42 for default */
    --idle: var(--yellow-2); /* change to #ca9654 for default */
    --streaming: var(--purple-2); /* change to #593695 for default */
    --offline: var(--text-4); /* change to #83838b for default offline color */

    /* border colors */
    --border-light: var(--hover); /* general light border color */
    --border: var(--active); /* general normal border color */
    --border-hover: var(--accent-2); /* border color of panels when hovered */
    --button-border: hsl(
        250,
        0%,
        100%,
        0.1
    ); /* neutral border color of buttons */

    /* base colors */
    --red-1: hsl(343, 76%, 73%);
    --red-2: #eb6f92;
    --red-3: #eb6f92;
    --red-4: hsl(343, 76%, 63%);
    --red-5: hsl(343, 76%, 58%);

    --green-1: hsl(197, 49%, 43%);
    --green-2: #31748f;
    --green-3: #31748f;
    --green-4: hsl(197, 49%, 34%);
    --green-5: hsl(197, 49%, 30%);

    --blue-1: hsl(189, 48%, 78%);
    --blue-2: #9ccfd8;
    --blue-3: #9ccfd8;
    --blue-4: hsl(189, 43%, 68%);
    --blue-5: hsl(189, 43%, 63%);

    --yellow-1: hsl(35, 88%, 77%);
    --yellow-2: #f6c177;
    --yellow-3: #f6c177;
    --yellow-4: hsl(35, 88%, 67%);
    --yellow-5: hsl(35, 88%, 62%);

    --purple-1: hsl(267, 57%, 83%);
    --purple-2: #c4a7e7;
    --purple-3: #c4a7e7;
    --purple-4: hsl(267, 57%, 73%);
    --purple-5: hsl(267, 57%, 68%);
}

/* ===custom mods=== */
/* font style */
* {
    font-size: 14px !important;
    line-height: 1.4;
}
*:not(div[id*="message-content"] *) {
    font-weight: 400;
}
div[id*="message-content"] h1::before {
    content: "# ";
}
div[id*="message-content"] h2::before {
    content: "## ";
}
div[id*="message-content"] h3::before {
    content: "### ";
}
div[id*="message-content"] small::before {
    content: "-# ";
}

/* pane header */
[class^="sidebar_"] > [class^="container_"]::after,
.container_fc4f04::after,
[class^="chatContent_"] > [class^="messagesWrapper_"]::after,
[class^="panels_"]::after,
[class^="form_"] [class^="channelTextArea_"]::after,
.guilds_a4d4d9::after,
[class^="membersWrap_"]::after,
[class^="privateChannels_"]::after,
.container_a6d69a::after,
[class^="userPanelOuter_"]::after,
[class^="searchResultsWrap_"]::after,
.scroller_fb4810::after,
[class^="peopleColumn_"]::after,
[class^="nowPlayingColumn_"]::after {
    text-transform: capitalize;
}

/* server icon resize */
nav[class*="guilds"] div[class*="blobContainer"],
div[class*="closedFolderIconWrapper"] div[class*="icon"] {
    scale: 0.6;
}

/* button icon resize */
section[class*="title"] svg,
div[class*="upperContainer"] svg,
div[class*="channelBottomBarArea"] :is(svg, div[class*="spriteContainer"]),
nav[class*="container"] svg,
nav[class*="privateChannels"] svg {
    scale: 0.7;
}

/* fix annoyance */
aside[class*="container"] div[class*="scroller"] {
    border-left: none;
}

/* remove winbuttons */
[class*="winButtons_"] {
    display: none;
}
.toolbar__9293f {
    padding-right: calc(32px + var(--space-xs)) !important;
}
