*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

body {
  color: var(--colors-text-main);
  overflow-y: overlay;
}

body>iframe {
  display: none;
}

.grecaptcha-badge {
  visibility: hidden;
  z-index: 1303;
}

.feedback-button>span.feedback-btn-text-hide {
  display: none;
}

/* Feedback button positioning is handled in StyledFeedbackButton component styles */
/* Removed automatic left-side movement to prevent unwanted repositioning */

/* Ensure MUI Dialogs don't exceed viewport and have proper scrolling */
.MuiDialog-container.MuiDialog-scrollPaper {
  align-items: flex-start !important;
  padding-top: 24px !important;
  padding-bottom: 24px !important;
  overflow-y: auto !important;
}

.MuiDialog-paper.MuiDialog-paperScrollPaper {
  max-height: calc(100vh - 48px) !important;
  margin: 24px auto !important;
  position: relative !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.MuiDialogContent-root {
  overflow-y: auto !important;
  flex: 1 1 auto !important;
}

/* Hide React Flow Controls - they appear as a white bar with three lines on the right side */
.react-flow__controls {
  display: none !important;
}

/* Ensure React Flow pane is transparent and doesn't clip nodes */
.react-flow__pane {
  overflow: visible !important;
  background: transparent !important;
}

.react-flow {
  overflow: visible !important;
}

.react-flow__renderer {
  overflow: visible !important;
}

.react-flow__viewport {
  overflow: visible !important;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

body {
  line-height: 1;
  font-family: 'Fira Sans';
  font-weight: 500;
}

a {
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  border-radius: 0;
}

/* Track */
::-webkit-scrollbar-track {
  border-radius: 0;
  background: var(--colors-background-panel);
  box-shadow: inset 0px 0px 11px -7px rgba(0, 0, 0, 0.4);
}

/* Handle */
::-webkit-scrollbar-thumb {
  border-radius: 3px;
  transition: all 0.1s;
  background: var(--colors-text-small);
  opacity: 0.7;
  cursor: grab;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--colors-text-strong);
}

/* Handle on click */
::-webkit-scrollbar-thumb:active {
  background: var(--colors-accent-active);
}

@keyframes screenshot {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

body[data-theme='swarmLight'] {
  --colors-accent-main: #35d8a5;
  --colors-accent-hover: #12bd87;
  --colors-accent-active: #40e5b2;
  --colors-accent-secondary: #c8e9de;
  --colors-accent-secondary--hover: #c5e4de;
  --colors-accent-secondary--text: #336f43;

  --colors-warning-main: #f79a0f;
  --colors-warning-hover: #feac31;
  --colors-warning-active: #f78b0f;

  --colors-neutral-white: #ffffff;
  --colors-neutral-black: #000000;
  --colors-neutral-brandBlack: #363537;

  --colors-background-primary: #f4eeeb;
  --colors-background-secondary: #ffffff;
  --colors-background-panel: #ffffff;

  --colors-backgroundImage-homepage: url('./images/background_welcometext_light.jpg');

  --colors-navigation-primary: #363537;
  --colors-navigation-secondary: #919191;
  --colors-navigation-text: #f9f6ee;
  --colors-navigation-textFooter: #f4eeeb;

  --colors-notifications-main: #ffffff;
  --colors-notifications-hover: #f9f6ee;
  --colors-notifications-text: #47474b;
  --colors-notifications-buttons: #363537;
  --colors-notifications-buttonsHover: #47474b;

  --colors-card-background: #ffffffee;
  --colors-card-background-alt: #faf3eb;
  --colors-card-background-active: #e4e4e4;
  --colors-card-background-hover: #f6f6f6;
  --colors-card-divider: #d9d9db;
  --colors-card-border-active: #33d8a5;
  --colors-card-border-alt: #827169;
  --colors-card-border-dragged: yellow;

  --colors-tag-background: #ebebeb;
  --colors-tag-input-background: #ebebeb;

  /* Tag - modal */
  --colors-tag-filled-active-background: #47474a;
  --colors-tag-filled-active-textColor: #f4eeeb;

  --colors-tag-filled-inactive-background: #ebebeb;
  --colors-tag-filled-inactive-textColor: #363537;
  --colors-tag-filled-inactive-hover: #ebebeb;

  --colors-tab-background: #ffffff;
  --colors-tab-hover: #f9f6ee;
  --colors-tab-border: #d9d9db;

  --colors-text-main: #363537;
  --colors-text-strong: #47474a;
  --colors-text-small: #5e5e61;
  --colors-text-dimmed: #737375;
  --colors-text-contrast: #dbd6d3;

  --colors-menu-main: #ffffff;
  --colors-menu-active: #f1f1f1;
  --colors-menu-hover: #ebebeb;
  --colors-menu-divider: #ebebeb;
  --colors-menu-text: #363537;

  /* Button */
  --colors-buttonPrimary-background: #35d8a5;
  --colors-buttonPrimary-backgroundHover: #40e5b2;
  --colors-buttonPrimary-backgroundActive: #3ff8be;
  --colors-buttonPrimary-backgroundDisabled: #f9f6ee;
  --colors-buttonPrimary-textColor: black;
  --colors-buttonPrimary-textColorDisabled: #d9d9db;

  --colors-buttonOutlined-background: transparent;
  --colors-buttonOutlined-backgroundHover: #363537;
  --colors-buttonOutlined-backgroundActive: #363537;
  --colors-buttonOutlined-backgroundDisabled: ;
  --colors-buttonOutlined-borderColor: #363537;
  --colors-buttonOutlined-borderColorDisabled: #d9d9db;
  --colors-buttonOutlined-textColor: black;
  --colors-buttonOutlined-textColorHover: #f9f6ee;
  --colors-buttonOutlined-textColorActive: #ffffff;
  --colors-buttonOutlined-textColorDisabled: #d9d9db;

  --colors-buttonDanger-background: transparent;
  --colors-buttonDanger-backgroundHover: #f26666;
  --colors-buttonDanger-backgroundActive: #f26666;
  --colors-buttonDanger-borderColor: #f26666;
  --colors-buttonDanger-borderColorDisabled: #d9d9db;
  --colors-buttonDanger-textColor: #f26666;
  --colors-buttonDanger-textColorActive: white;
  --colors-buttonDanger-textColorDisabled: #d9d9db;

  --colors-buttonIcon-background: transparent;
  --colors-buttonIcon-backgroundHover: #ebebeb;
  --colors-buttonIcon-textColor: #47474a;

  /* Input */

  --colors-input-main: #f8f7f7;
  --colors-input-hover: #f8f7f7;
  --colors-input-disabled: #ffffff;
  --colors-input-focused: #ffffff;
  --colors-input-secondary: #ebebeb;
  --colors-input-icons: #47474a;
  --colors-input-adornment: #aaaaaa;
  --colors-input-boxShadow-main: rgb(0 0 0 / 5%);
  --colors-input-boxShadow-hover: rgba(0, 0, 0, 0.1);
  --colors-input-boxShadow-focused: rgb(0 0 0 / 10%);
  --colors-input-boxShadow-focused2: rgb(0 0 0 / 15%);

  --colors-background-fade: #dbd6d3;

  --colors-tooltip-background: #363537;
  --colors-tooltip-text: #f9f6ee;

  --colors-icons-primary: #5e5e61;
  --colors-icons-primaryHover: #5e5e61;
  --colors-icons-secondary: #ababad;
  --colors-icons-secondaryHover: #919191;

  --colors-relation-agree-normal: #35d8a5;
  --colors-relation-agree-lighter: #40e5b2;
  --colors-relation-agree-darker: #29d19e;

  --colors-relation-disagree-normal: #f26666;
  --colors-relation-disagree-lighter: #ff8787;
  --colors-relation-disagree-darker: #e35454;

  --colors-relation-steelman-normal: #ffba53;
  --colors-relation-steelman-lighter: #ffc671;
  --colors-relation-steelman-darker: #feac31;

  --colors-relation-condition-normal: #6b75de;
  --colors-relation-condition-lighter: #7d8ae3;
  --colors-relation-condition-darker: #5969cc;

  --colors-relation-refutes-normal: #b665f5;
  --colors-relation-refutes-lighter: #c985ff;
  --colors-relation-refutes-darker: #a762dd;

  --colors-relation-isEquivalentTo-normal: #449ae9;
  --colors-relation-isEquivalentTo-lighter: #68aae8;
  --colors-relation-isEquivalentTo-darker: #3c92e1;

  --colors-relation-isMutallyExclusive-normal: #fa8c4e;
  --colors-relation-isMutallyExclusive-lighter: #fe9960;
  --colors-relation-isMutallyExclusive-darker: #ff833e;

  --colors-weights-heavy: #c8e9de;
  --colors-weights-heavy--color: #336f43;
  --colors-weights-light: #ffe3c8;
  --colors-weights-light--color: #a1531a;

  --colors-estimates-smallDiffer: #a19465;
  --colors-estimates-bigDiffer: #ff833e;

  --colors-feedbackButton-background: #5e5e61;
  --colors-feedbackButton-textColor: #f9f6ee;
  --colors-rating-background: #ffffff;
  --colors-rating-icon-color: #47474a;
  --colors-rating-icon-color-checked: #47474a;

  --colors-treeview-addAndButton-background: #5e5e61;
  --colors-treeview-addAndButton-textColor: #f9f6ee;
  --colors-treeview-backToRootBtn-background: #fdf9f8;
  --colors-treeview-backToRootBtn-boxShadow: #d0d0d0;

  --colors-importPremises-checkboxItem-background: transparent;
  --colors-importPremises-checkboxItem-boxShadow: #0000000d;

  --colors-discussionType-switch-background: #888;
  --colors-discussionType-switch-textColor: #fff;
}

body[data-theme='swarmDark'] {
  /* Button */
  --colors-buttonPrimary-background: #3ff8be;
  --colors-buttonPrimary-backgroundHover: #40e5b2;
  --colors-buttonPrimary-backgroundActive: #35d8a5;
  --colors-buttonPrimary-backgroundDisabled: #919191;
  --colors-buttonPrimary-textColor: #363537;
  --colors-buttonPrimary-textColorDisabled: #ababad;

  --colors-buttonOutlined-background: transparent;
  --colors-buttonOutlined-backgroundHover: #f9f6ee;
  --colors-buttonOutlined-backgroundActive: #f9f6ee;
  --colors-buttonOutlined-backgroundDisabled: transparent;
  --colors-buttonOutlined-borderColor: #f9f6ee;
  --colors-buttonOutlined-borderColorDisabled: #919191;
  --colors-buttonOutlined-textColor: #f9f6ee;
  --colors-buttonOutlined-textColorHover: #47474a;
  --colors-buttonOutlined-textColorActive: #363537;
  --colors-buttonOutlined-textColorDisabled: #919191;

  --colors-buttonDanger-background: transparent;
  --colors-buttonDanger-backgroundHover: #fe8787;
  --colors-buttonDanger-backgroundActive: #fe8787;
  --colors-buttonDanger-borderColor: #fe8787;
  --colors-buttonDanger-borderColorDisabled: #919191;
  --colors-buttonDanger-textColor: #fe8787;
  --colors-buttonDanger-textColorActive: #f9f6ee;
  --colors-buttonDanger-textColorDisabled: #a4a4a6;

  --colors-buttonIcon-background: #47474a;
  --colors-buttonIcon-backgroundHover: #47474a;
  --colors-buttonDanger-textColor: #f4eeeb;

  --colors-buttonIcon-background: transparent;
  --colors-buttonIcon-backgroundHover: #47474a;
  --colors-buttonIcon-textColor: #f4eeeb;

  --colors-accent-main: #35d8a5;
  --colors-accent-hover: #12bd87;
  --colors-accent-active: #40e5b2;
  --colors-accent-secondary: #6f867f;
  --colors-accent-secondary--hover: #77938a;
  --colors-accent-secondary--text: #bad7c2;

  --colors-warning-main: #f79a0f;
  --colors-warning-hover: #feac31;
  --colors-warning-active: #f78b0f;

  --colors-neutral-white: #ffffff;
  --colors-neutral-black: #000000;
  --colors-neutral-brandBlack: #363537;

  --colors-background-primary: #47474a;
  --colors-background-secondary: #47474a;
  --colors-background-panel: #363537;
  --colors-background-fade: #737375;

  --colors-backgroundImage-homepage: url('./images/background_welcometext_dark.jpg');

  --colors-navigation-primary: #363537;
  --colors-navigation-secondary: #919191;
  --colors-navigation-text: #f9f6ee;
  --colors-navigation-textFooter: #f4eeeb;

  --colors-notifications-main: #363537;
  --colors-notifications-hover: #47474a;
  --colors-notifications-text: #f4eeeb;
  --colors-notifications-buttons: #f9f6ee;
  --colors-notifications-buttonsHover: #f4eeeb;

  --colors-card-background: #5e5e61cc;
  --colors-card-background-alt: #363537;
  --colors-card-background-active: #363537;
  --colors-card-background-hover: #7d7d7d;
  --colors-card-divider: #d9d9db;
  --colors-card-border-active: rgb(0, 150, 255);
  --colors-card-border-alt: #868274;
  --colors-card-border-dragged: rgb(118, 118, 105);
  --colors-card-border-titan: #49c6f1;

  --colors-tag-background: #737375;
  --colors-tag-input-background: #5e5e61;

  --colors-tab-background: #737375;
  --colors-tab-hover: #5e5e61;
  --colors-tab-border: #919191;

  --colors-text-main: #f4eeeb;
  --colors-text-strong: #ffffff;
  --colors-text-small: #c2c2c4;
  --colors-text-dimmed: #737375;
  --colors-text-contrast: #47474a;

  --colors-menu-main: #47474a;
  --colors-menu-active: #616163;
  --colors-menu-hover: #5e5e61;
  --colors-menu-divider: #747476;
  --colors-menu-text: #f9f6ef;

  /* Input */

  --colors-input-main: #737375;
  --colors-input-hover: #737375;
  --colors-input-disabled: #5e5e61;
  --colors-input-focused: #5e5e61;
  --colors-input-secondary: #919191;
  --colors-input-icons: #f4eeeb;
  --colors-input-adornment: #2d2d2d;
  --colors-input-boxShadow-main: rgb(200 200 200 /15%);
  --colors-input-boxShadow-hover: #888;
  --colors-input-boxShadow-focused: #999;
  --colors-input-boxShadow-focused2: #999;

  --colors-tooltip-background: #f4eeeb;
  --colors-tooltip-text: #4e4c4d;

  --colors-icons-primary: #f4eeeb;
  --colors-icons-primaryHover: #f9f6ee;
  --colors-icons-secondary: #f4eeeb;
  --colors-icons-secondaryHover: #f4eeeb;

  --colors-relation-agree-normal: #35d8a5;
  --colors-relation-agree-lighter: #40e5b2;
  --colors-relation-agree-darker: #29d19e;

  --colors-relation-disagree-normal: #f26666;
  --colors-relation-disagree-lighter: #ff8787;
  --colors-relation-disagree-darker: #e35454;

  --colors-relation-condition-normal: #6b75de;
  --colors-relation-condition-lighter: #7d8ae3;
  --colors-relation-condition-darker: #5969cc;

  --colors-relation-steelman-normal: #ffba53;
  --colors-relation-steelman-lighter: #ffc671;
  --colors-relation-steelman-darker: #feac31;

  --colors-relation-refutes-normal: #b665f5;
  --colors-relation-refutes-lighter: #c985ff;
  --colors-relation-refutes-darker: #a762dd;

  --colors-relation-isEquivalentTo-normal: #449ae9;
  --colors-relation-isEquivalentTo-lighter: #68aae8;
  --colors-relation-isEquivalentTo-darker: #3c92e1;

  --colors-relation-isMutallyExclusive-normal: #fa8c4e;
  --colors-relation-isMutallyExclusive-lighter: #fe9960;
  --colors-relation-isMutallyExclusive-darker: #ff833e;

  /* Tag - modal */
  --colors-tag-filled-active-background: #f4eeeb;
  --colors-tag-filled-active-textColor: #47474a;
  --colors-tag-filled-inactive-background: #363537;
  --colors-tag-filled-inactive-textColor: #ebebeb;
  --colors-tag-filled-inactive-hover: #363537;

  --colors-weights-heavy: #336f43;
  --colors-weights-heavy--color: #c8e9de;
  --colors-weights-light: #a1531a;
  --colors-weights-light--color: #ffe3c8;

  --colors-estimates-smallDiffer: #c2b27a;
  --colors-estimates-bigDiffer: #ff833e;

  --colors-feedbackButton-background: #5e5e61;
  --colors-feedbackButton-textColor: #f9f6ee;
  --colors-rating-background: #676767;
  --colors-rating-icon-color: #47474a;
  --colors-rating-icon-color-checked: #47474a;

  --colors-treeview-addAndButton-background: #5e5e61;
  --colors-treeview-addAndButton-textColor: #f9f6ee;
  --colors-treeview-backToRootBtn-background: #5e5e61;
  --colors-treeview-backToRootBtn-boxShadow: #00000040;

  --colors-importPremises-checkboxItem-background: #737375;
  --colors-importPremises-checkboxItem-boxShadow: transparent;

  --colors-discussionType-switch-background: #777;
  --colors-discussionType-switch-textColor: #fff;
}