/**
 * @name midnight (vencord)
 * @description a dark, customizable discord theme. based on https://github.com/nanoqoi/vencord-theme.
 * @author refact0r
 * @version 2.1.1
 * @invite nz87hXyvcy
 * @website https://github.com/refact0r/midnight-discord
 * @source https://github.com/refact0r/midnight-discord/blob/master/themes/midnight-vencord.theme.css
 * @authorId 508863359777505290
 * @authorLink https://www.refact0r.dev
*/

/* import theme modules */
@import url('https://refact0r.github.io/midnight-discord/build/midnight.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

body {
    /* font, change to '' for default discord font */
    --font: 'Adwaita Sans Medium 11'; /* change to '' for default discord font */
    --code-font: ''; /* change to '' for default discord font */
    font-weight: 400 /* normal text font weight. DOES NOT AFFECT BOLD TEXT */;

    /* sizes */
    --gap: 4px; /* spacing between panels */
    --divider-thickness: 2px; /* thickness of unread messages divider and highlighted message borders */
    --border-thickness: 0px; /* thickness of borders around main panels. DOES NOT AFFECT OTHER BORDERS */

    /* 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 */
    --border-hover-transition: 0.2s ease; /* transition for borders when hovered */

    /* 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: on; /* off: default window controls, on: custom window controls */
    --window-control-size: 14px; /* size of custom window controls */

    /* dms button options */
    --custom-dms-icon: custom; /* off: use default discord icon, hide: remove icon entirely, custom: use custom icon */
    --dms-icon-svg-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 27' width='24' height='24'%3E%3Cpath fill='currentColor' d='M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1'%3E%3C/path%3E%3C/svg%3E"); /* 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: off; /* 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(''); /* 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  */

    /* chatbar options */
    --custom-chatbar: seperated; /* off: default chatbar, aligned: chatbar aligned with the user panel, separated: chatbar separated from chat */
    --chatbar-height: 56px; /* height of the chatbar (52px by default, 47px recommended for aligned, 56px recommended for separated) */
    --chatbar-padding: 8px; /* padding of the chatbar. only applies in aligned mode. */

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

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

    /* text colors */
    --text-0: var(--bg-4); /* text on colored elements */
    --text-1: {{colors.primary.default.hex}}; /* bright text on colored elements */
    --text-2: {{colors.primary.default.hex}}; /* headings and important text */
    --text-3: {{colors.on_surface.default.hex}}; /* normal text */
    --text-4: {{colors.on_surface_variant.default.hex}}; /* icon buttons and channels */
    --text-5: {{colors.outline.default.hex}}; /* muted channels/chats and timestamps */

    /* background and dark colors */
    --bg-1: {{colors.surface_container_low.default.hex}}; /* dark buttons when clicked */
    --bg-2: {{colors.surface_container_low.default.hex}}; /* dark buttons */
    --bg-3: {{colors.surface_container.default.hex}}; /* spacing, secondary elements */
    --bg-4: {{colors.surface_container_lowest.default.hex}}; /* main background color */
    --hover: hsla(20, 3%, 40%, 0.1); /* channels and buttons when hovered */
    --active: hsla(20, 3%, 40%, 0.2); /* channels and buttons when clicked or selected */
    --active-2: hsla(20, 3%, 40%, 0.3); /* extra state for transparent buttons */
    --message-hover: hsla(0, 0%, 0%, 0.1); /* messages when hovered */

    /* accent colors */
    --accent-1: var(--blue-1); /* links and other accent text */
    --accent-2: var(--blue-2); /* small accent elements */
    --accent-3: var(--blue-3); /* accent buttons */
    --accent-4: var(--blue-4); /* accent buttons when hovered */
    --accent-5: var(--blue-5); /* accent buttons when clicked */
    --accent-new: var(--accent-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(--yellow-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(--active); /* border color of panels when hovered */
    --button-border: hsl(0, 0%, 100%, 0.1); /* neutral border color of buttons */

    /* base colors */
    --red-1: {{colors.error.default.hex}};
    --red-2: {{colors.error.default.hex}};
    --red-3: {{colors.error.default.hex}};
    --red-4: {{colors.error.default.hex}};
    --red-5: {{colors.error.default.hex}};

    --green-1: {{colors.primary.default.hex}};
    --green-2: {{colors.primary.default.hex}};
    --green-3: {{colors.primary.default.hex}};
    --green-4: {{colors.primary.default.hex}};
    --green-5: {{colors.primary.default.hex}};

    --blue-1: {{colors.primary.default.hex}};
    --blue-2: {{colors.primary_fixed.default.hex}};
    --blue-3: {{colors.primary_fixed_dim.default.hex}};
    --blue-4: {{colors.primary.default.hex}};
    --blue-5: {{colors.on_primary_fixed.default.hex}};

    --yellow-1: {{colors.tertiary.default.hex}};
    --yellow-2: {{colors.tertiary_fixed.default.hex}};
    --yellow-3: {{colors.tertiary_fixed_dim.default.hex}};
    --yellow-4: {{colors.tertiary.default.hex}};
    --yellow-5: {{colors.on_tertiary_fixed.default.hex}};

    --purple-1: {{colors.primary.default.hex}};
    --purple-2: {{colors.primary_fixed.default.hex}};
    --purple-3: {{colors.primary_fixed_dim.default.hex}};
    --purple-4: {{colors.primary.default.hex}};
    --purple-5: {{colors.on_primary_fixed.default.hex}};
}