// -- 🚥 WINDOWS BUTTONS PART --
.titleBar_a934d8 {
  z-index: 1001;
}

.winButton_a934d8 {
  &:not(:last-child) {
    & > svg {
      display: none;
    }
    &::after {
      content: "";
      border-radius: 50px;
      pointer-events: fill;
    }
  }
  &:hover {
    background-color: var(--background-tertiary);
  }
}

.winButtonClose_a934d8 {
  margin-right: 5px;

  &::after {
    padding: 6px;
    background-image: url("https://i.imgur.com/WAbJScJ.png");
    background-size: 100%;
  }

  &:hover::after {
    background-image: url("https://i.imgur.com/ipwGE9a.png");
    background-size: 100%;
  }
}

.winButtonMinMax_a934d8 {
  &:nth-child(3)::after {
    background-color: #faa61a;
    padding: 5px;
  }

  &:nth-child(3):hover::after {
    background-color: #faa81ae5;
  }
  &:last-child {
    color: #43b581;

    &:hover {
      color: #43b582e3;
    }
    rect {
      height: 3px;
      rx: 2px;
    }
  }
}

:root {
  // Custom status modal
  .select_f6639d,
  .popout_f6639d {
    border: none;
  }
  .select_f6639d.open_f6639d,
  .popout_f6639d {
    background-color: var(--background-secondary-alt);
  }
  .footer_f9a4c9 {
    background: var(--background-tertiary);
  }

  // Profile
  .accountProfilePopoutWrapper_b2ca13 .submenuPaddingContainer_d90b3d {
    margin-left: -5px;
  }

  // -- Better menus --

  // Menu
  .menu_d90b3d {
    border-radius: 5px;
    overflow: hidden;

    .scroller_d90b3d {
      padding: 0;

      .separator_d90b3d {
        display: none;
      }
    }
  }

  // Submenu
  .submenuPaddingContainer_d90b3d {
    padding: 0;
  }

  // Label
  .item_d90b3d {
    margin: 0;
    padding: 10px 15px;
    border-radius: 0;
    transition: 150ms;

    &.colorDefault_d90b3d {
      &:hover,
      &.focused_d90b3d,
      &:active:not(.hideInteraction-2jPGL_) {
        background-color: #5c6eb12a;
      }
    }
    &.colorDanger_d90b3d {
      color: #fd5959;

      &:hover,
      &.focused_d90b3d,
      &:active:not(.hideInteraction-2jPGL_) {
        background-color: #f047471a;
      }
    }
  }

  // Fix for user menu tooltip (thx Metro420yt)
  [class*="disabledPointerEvents"][style*="left: -"] {
    left: 0 !important;
  }

  // Loading screen
  .container_e40c16 > .content_e40c16 {
    position: relative;

    .ready_e40c16 {
      display: none;

      & + .text_e40c16 {
        top: 82px;
      }
    }

    &::before {
      content: "";
      position: absolute;
      bottom: 20px;
      left: calc(50% - 100px);
      width: 200px;
      height: 200px;
      background: url("https://comfy-themes.github.io/Discord/assets/bonfire.gif")
      center/80% no-repeat;
    }
  }

  // Coloured status when playing
  .pointerEvents_c51b4e {
    &[fill="#23a55a"] {
      fill: var(--online);
    }
    &[fill="#f0b232"] {
      fill: var(--iddle);
    }
    &[fill="#f23f43"] {
      fill: var(--dnd);
    }
    &[fill="#80848e"] {
      fill: var(--offline);
    }
    &[fill="#593695"] {
      fill: var(--streaming);
    }
  }

  // Joining message
  .contentWrapper_ed5743 {
    background: var(--background-secondary);
  }

  // Deleting Discord watermark
  .wordmark_a934d8 svg {
    display: var(--discord-logo);
  }

  // Watch stream popout
  .body-2khErn {
    background: var(--background-tertiary);
  }

  // Deleting message confirmation
  .message_ddcc45 {
    background: var(--background-primary);
  }

  // Keyboard shortcuts
  .keyboardShortcutsModal_ad95dc {
    background: var(--background-primary);

    .keybindShortcut-3zF1P9 span {
      border-radius: 1px;
    }
  }

  // Popups
  .root_f9a4c9,
  .footer_f9a4c9,
  .modal_c97cbd {
    box-shadow: none;
  }

  // Cross
  .default_a467ac,
  .default_a467ac:hover {
    background-color: var(--background-tertiary);
  }

  // >:( fuck borders
  .messageGroupWrapper_ac90a2,
  .inputDefault-3FGxgL,
  .container-30qY7E,
  .cardPrimary_cb7a0e,
  .cardPrimaryOutline-1ofwVz,
  .codeRedemptionRedirect_cb70f4,
  .previewOverlay-2reuWf,
  .markup_f8f345 code {
    border: none;
  }

  // -- Status masks --
  .pointerEvents_c51b4e {
    mask: none;
    pointer-events: none;

    &[width="8"]:not([mask="url(#svg-mask-status-online-mobile)"]),
    &[width="10"]:not([mask="url(#svg-mask-status-online-mobile)"]),
    &[width="12"]:not([mask="url(#svg-mask-status-online-mobile)"]),
    &[width="16"]:not([mask="url(#svg-mask-status-online-mobile)"]) {
      rx: var(--status-radius);
    }

    &[width="25"],
    &[mask="url(#svg-mask-status-online-mobile)"] {
      rx: 5px;
    }
  }

  .mask_c51b4e,
  .userInfo_b69b77 {
    overflow: visible;
  }

  // Fixing weird Discord behavior
  .cursorDefault--wfhy5,
  .mask_c51b4e > svg {
    overflow: visible;
  }
  div:not(.avatarWrapper_b2ca13) .mask_c51b4e > svg > mask > rect:first-child {
    y: 8;
    rx: var(--status-radius);
  }
  .mask_c51b4e > svg > mask > rect[width="10"]:first-child {
    x: 8.5;
    width: 14px;
    height: 11px;
  }
  .avatarWrapper_b2ca13 .wrapper_c51b4e > .mask_c51b4e > svg > rect {
    mask: none;
    x: 17;
    y: 15;
    width: 10px;
    height: 10px;
    rx: var(--status-radius);
  }

  .mask_c51b4e > svg {
    & > rect {
      height: 40px;
    }
    & > mask {
      & > rect:nth-child(2),
      & > circle,
      & > polygon {
        display: none;
      }
    }
  }

  // All masks in DM, user and member part
  .channel_c91bad .pointerEvents_c51b4e,
  .members_cbd271 .pointerEvents_c51b4e,
  .avatarWrapper_b2ca13 .pointerEvents_c51b4e,
  .peopleListItem_d51464 .pointerEvents_c51b4e,
  .nowPlayingColumn_c2739c .pointerEvents_c51b4e {
    height: 12px;
    y: 24;
    stroke-width: 2.5px;
  }

  // All masks except mobile and typing masks in DM, user and member part
  .channel_c91bad
  .pointerEvents_c51b4e[width="10"]:not(
      [mask="url(#svg-mask-status-online-mobile)"]
    ),
  .members_cbd271
  .pointerEvents_c51b4e[width="10"]:not(
      [mask="url(#svg-mask-status-online-mobile)"]
    ),
  .avatarWrapper_b2ca13 .pointerEvents_c51b4e,
  .peopleListItem_d51464
  .pointerEvents_c51b4e[width="10"]:not(
      [mask="url(#svg-mask-status-online-mobile)"]
    ),
  .nowPlayingColumn_c2739c
  .pointerEvents_c51b4e[width="10"]:not(
      [mask="url(#svg-mask-status-online-mobile)"]
    ) {
    width: 12px;
    x: 24;
  }

  // All mobile masks in DM and member part
  .channel_c91bad
  .pointerEvents_c51b4e[mask="url(#svg-mask-status-online-mobile)"],
  .members_cbd271
  .pointerEvents_c51b4e[mask="url(#svg-mask-status-online-mobile)"],
  .peopleListItem_d51464
  .pointerEvents_c51b4e[mask="url(#svg-mask-status-online-mobile)"],
  .nowPlayingColumn_c2739c
  .pointerEvents_c51b4e[mask="url(#svg-mask-status-online-mobile)"],
  .menu_d90b3d
  .pointerEvents_c51b4e[mask="url(#svg-mask-status-online-mobile)"] {
    width: 12px;
    height: 16px;
    x: 24;
    y: 20;
  }

  // Mask in the status picker
  #account-avatar .pointerEvents_c51b4e {
    width: 18px;
    height: 18px;
    x: 68;
    y: 68;
    stroke-width: 3.5px;
    rx: calc(1px + var(--status-radius));
  }

  // Mutuals status
  .listAvatar-1NlAhb .pointerEvents_c51b4e {
    x: 30;
    y: 30;
    stroke-width: 2.5px;
  }

  // Status in menu
  .menu_d90b3d
  .pointerEvents_c51b4e:not([mask="url(#svg-mask-status-online-mobile)"]) {
    width: 10px;
    height: 10px;
    stroke-width: 2.5px;
  }

  // Adding stroke color
  .menu_d90b3d .pointerEvents_c51b4e {
    stroke: var(--background-tertiary);
  }
  .channel_c91bad .pointerEvents_c51b4e,
  .members_cbd271 .pointerEvents_c51b4e,
  .listAvatar-1NlAhb .pointerEvents_c51b4e,
  .nowPlayingColumn_c2739c .pointerEvents_c51b4e {
    stroke: var(--background-secondary-alt);
  }
  .avatarWrapper_b2ca13[aria-expanded] .pointerEvents_c51b4e,
  .peopleListItem_d51464 .pointerEvents_c51b4e {
    stroke: var(--background-primary);
  }

  // Typing dots
  .wrapper_c51b4e .dots_ce0450 {
    overflow: visible;

    g {
      transform: translateY(2.5px);
    }
  }

  // Avatars radius
  .wrapper_c51b4e foreignObject,
  .callAvatarMask_db83a2 foreignObject,
  .avatarContainer_d03bba foreignObject,
  .avatarMasked__0b3c8 {
    mask: none;
    -webkit-mask: none;
  }

  .wrapper_c51b4e,
  .avatar_c51b4e,
  .profile_d6fbe8 .avatarUploaderInner-yEhTv5,
  .voiceAvatar_db83a2,
  .avatar_f9f2ca,
  .border_db83a2,
  .avatar_d80634,
  .clickableAvatar_d03bba,
  .emptyUser_d03bba,
  .avatar_d03bba,
  .wrapper_db83a2.ringingIncoming_db83a2::after,
  .wrapper_db83a2.ringingOutgoing_db83a2::after,
  .replyAvatar_f9f2ca,
  .avatarSpeaking_c51b4e,
  .avatar-2EVtgZ,
  .avatarContainerMasked_d03bba,
  .appAvatar-2_lufo,
  .embedAuthorIcon_b0068a {
    border-radius: var(--avatar-radius);
  }

  // Server radius
  .wrapper_c5f96a foreignObject {
    mask: none;
    -webkit-mask: none;
  }
  .wrapperSimple_c5f96a {
    overflow: visible;
  }

  .wrapperSimple_c5f96a,
  .wrapper_c5f96a foreignObject,
  .folderIconWrapper_bc7085,
  .expandedFolderBackground_bc7085,
  .flexChild_dc333f .avatarUploaderInner_f0a9ff {
    border-radius: var(--server-radius);
  }

  .iconInactive_a64689 {
    border-radius: calc(var(--server-radius) - 4px);
  }

  .wrapper_c5f96a {
    foreignObject {
      transition: border-radius 200ms;
    }
    &:hover foreignObject {
      border-radius: calc(var(--server-radius) - 3px);
    }
  }

  // Buttons
  .container-2nx-BQ,
  .input-2XRLou {
    border-radius: 5px;
  }
  .slider-32CRPX rect {
    rx: 5px;
  }

  // Volume bar
  .mini_c7a159 {
    height: 25px;
  }
  :not(.themedPopout-1TrfdI) > .slider_c7a159:not(.mini_c7a159) {
    height: 50px;
  }
  .themedPopout-1TrfdI > .slider_c7a159 {
    height: 15px;
    margin: 0;

    .bar_c7a159 {
      top: 0 !important;
    }
  }
  .bar_c7a159 {
    height: 15px !important;
    background-color: var(--background-secondary);
  }
  .slider_c7a159 .grabber_c7a159 {
    background-color: transparent;
    box-shadow: none;
    border: none;
  }
  .barFill_c7a159 {
    border-radius: 0 3px 3px 0;
  }

  // Bigger stream preview popout
  .streamPreview_adbea6 {
    width: 370px;
    background-color: var(--background-secondary);

    .previewContainer_adbea6 {
      height: 211px;

      .emptyPreviewImage-3LUxKH {
        margin-bottom: 18px;
      }
    }

    .button_dd4f85 {
      border: none;
      background-color: #e9edff;
      color: var(--background-tertiary);
      transition: background-color 0.15s;

      &:hover {
        background-color: #fff;
      }
    }
  }

  // Fix enable community issue
  .container-1rn8Cv > img {
    z-index: unset;
  }

  // Token thing
  .contentWarningPopout_fa823b {
    background-color: var(--background-primary);
    box-shadow: none;
  }

  // No scrollbars
  .layerContainer-2v_Sit {
    *::-webkit-scrollbar {
      display: none;
    }

    .scroller-3nFW5p {
      padding-left: 0;

      & > .content_eed6a8,
      .buttons_d0696b,
      .messagesPopout_ac90a2 {
        padding-right: 10px !important;
      }
    }
  }

  // Revert some Discord internal changes
  --brand-experiment: #7289da;
  --brand-experiment-560: #5b70be;

  .lookFilled-yCfaCM.colorGrey-2iAG-B,
  .lookFilled-yCfaCM.colorBrandNew-2-gGsS {
    background-color: var(--brand-experiment);

    &:hover {
      background-color: var(--brand-experiment-560);
    }
  }

  .gameVerifiedIcon-3t4jtr .flowerStar_c91f7d > path {
    fill: var(--brand-experiment);
  }

  .wrapper__8436d:hover .childWrapper_a6ce15 {
    background-color: var(--background-accent);
  }

  .homeIcon__560eb > path {
    d: path(
                    "M 20.6644 20 C 20.6644 20 19.8014 18.9762 19.0822 18.0714 C 22.2226 17.1905 23.4212 15.2381 23.4212 15.2381 C 22.4384 15.881 21.5034 16.3334 20.6644 16.6429 C 19.4658 17.1429 18.3151 17.4762 17.1884 17.6667 C 14.887 18.0953 12.7774 17.9762 10.9795 17.6429 C 9.61301 17.381 8.43836 17 7.45548 16.6191 C 6.90411 16.4048 6.30479 16.1429 5.70548 15.8096 C 5.63356 15.7619 5.56164 15.7381 5.48973 15.6905 C 5.44178 15.6667 5.41781 15.6429 5.39384 15.6191 C 4.96233 15.381 4.7226 15.2143 4.7226 15.2143 C 4.7226 15.2143 5.87329 17.1191 8.91781 18.0238 C 8.19863 18.9286 7.31164 20 7.31164 20 C 2.0137 19.8333 0 16.381 0 16.381 C 0 8.7144 3.45205 2.50017 3.45205 2.50017 C 6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861 L 10.4281 0.285909 C 6.11301 1.52399 4.12329 3.40493 4.12329 3.40493 C 4.12329 3.40493 4.65068 3.11921 5.53767 2.71446 C 8.10274 1.59542 10.1404 1.2859 10.9795 1.21447 C 11.1233 1.19066 11.2432 1.16685 11.387 1.16685 C 12.8493 0.976379 14.5034 0.92876 16.2295 1.11923 C 18.5068 1.38114 20.9521 2.0478 23.4452 3.40493 C 23.4452 3.40493 21.5514 1.61923 17.476 0.381146 L 17.8116 0.000197861 C 17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017 C 24.5479 2.50017 28 8.7144 28 16.381 C 28 16.381 25.9623 19.8333 20.6644 20 Z M 9.51712 8.88106 C 8.15068 8.88106 7.07192 10.0715 7.07192 11.5239 C 7.07192 12.9763 8.17466 14.1667 9.51712 14.1667 C 10.8836 14.1667 11.9623 12.9763 11.9623 11.5239 C 11.9863 10.0715 10.8836 8.88106 9.51712 8.88106 Z M 18.2671 8.88106 C 16.9007 8.88106 15.8219 10.0715 15.8219 11.5239 C 15.8219 12.9763 16.9247 14.1667 18.2671 14.1667 C 19.6336 14.1667 20.7123 12.9763 20.7123 11.5239 C 20.7123 10.0715 19.6336 8.88106 18.2671 8.88106 Z"
    );
  }

  // Guild popout
  .guildPopout-G6M0fK {
    background-color: var(--background-secondary);

    .iconMask-1lJhcS {
      background-color: transparent;
    }
  }

  // Forums
  .container_a6d69a {
    background-color: var(--background-primary);

    .mainCard_a6d69a {
      background-color: var(--background-secondary);
    }
  }

  // BetterDiscord
  .bd-sidebar-header {
    padding-right: 10px;
  }

  .bd-addon-list.bd-grid-view {
    grid-template-columns: 1fr 1fr;
  }

  .directoryModal-YJsOMv {
    background-color: var(--background-primary);
  }

  // New channels and role thing and member thing
  .container_f1fd9c,
  .header_f1fd9c,
  .emptyPage_c6b11b,
  .scrollerContainer_c6b11b,
  .container_c2efea,
  .background_e85cee,
  .container_d20375,
  .pageBody_c2efea,
  .page_d20375 {
    background-color: var(--background-primary) !important;
  }

  .homeContent_e85cee .row_b53f4f, .channelRow_f04d06 {
    background-color: var(--background-secondary);
  }

  .headerArtPlaceholder_d32e26 {
    background-color: var(--background-tertiary);
  }
}

.soundButtonRefresh_f40049 {
  background-color: var(--background-primary);
}

.theme-dark {
  --card-secondary-bg: var(--background-secondary);
}