@layer reset {
  :root {
    --main-typo:
      system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
      "Helvetica Neue", sans-serif;
    --primary-color: var(--color-gray-900);
    --secondary-color: var(--color-gray-50);

    interpolate-size: allow-keywords; /* This enables animations between keywords (auto, min-content, etc) */
    scroll-behavior: smooth;
    font-size: 100%;
  }

  *,
  *:after,
  *:before {
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    box-sizing: border-box;
    vertical-align: baseline;
  }

  /* Avoid selection of text on desktop, mobile apps */
  :not(input):not(textarea),
  :not(input):not(textarea)::after,
  :not(input):not(textarea)::before {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Show normal cursor on desktop, mobile apps except links and inputs */
  :not(a):not(a *):not(input):not(textarea) {
    cursor: default !important;
  }

  img,
  image,
  picture,
  video,
  iframe,
  figure {
    max-height: 100%;
    max-width: 100%;
    width: 100%;
    display: block;
  }

  a {
    display: block;
  }

  p a {
    display: inline;
  }

  li {
    list-style-type: none;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  span,
  a,
  strong,
  blockquote,
  i,
  b,
  em,
  pre {
    font-size: 1em;
    font-weight: inherit;
    font-style: inherit;
    text-decoration: none;
    color: inherit;
  }

  form,
  input,
  textarea,
  select,
  button,
  label {
    font-family: inherit;
    font-size: inherit;
    hyphens: auto;
    background-color: transparent;
    display: block;
    color: inherit;
  }

  table,
  tr,
  td {
    border-collapse: collapse;
    border-spacing: 0;
  }

  svg {
    width: 100%;
    display: block;
  }

  body {
    font-size: 1em;
    line-height: 1.4em;
    font-family: var(--main-typo);
    color: var(--primary-color);
    background-color: var(--secondary-color);
    hyphens: auto;
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  hr {
    border: 1px solid;
    margin: 0.5em 0;
    opacity: 0.8;
    color: var(--color-gray-200);
  }
}

/* Antd reset */
.ant-popover:not(.ant-color-picker):not(.ant-popconfirm) {
  .ant-popover-inner {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

.ant-dropdown-menu-submenu,
.ant-dropdown-menu,
.ant-menu {
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 4px !important;

  .ant-menu-item,
  .ant-dropdown-menu-item {
    padding: 10px !important;
    height: min-content !important;
    width: 100% !important;
    line-height: 12px !important;
    margin: 0 !important;
    border-radius: 8px !important;

    &:active {
      background-color: transparent !important;
    }
  }

  .ant-menu-item-selected {
    background-color: transparent !important;
  }

  .ant-menu-item:not(.ant-menu-item-danger),
  .ant-dropdown-menu-item:not(.ant-dropdown-menu-item-danger) {
    color: inherit !important;

    &:hover {
      backdrop-filter: brightness(0.7) !important;
    }
  }

  .ant-menu-item-divider,
  .ant-dropdown-menu-item-divider {
    backdrop-filter: brightness(0.9) !important;
  }

  .ant-dropdown-menu-submenu-title {
    color: inherit !important;
  }
}

.ant-picker-cell {
  padding: 0 !important;
}

.ant-tooltip:has(.ant-tooltip-inner:empty) {
  display: none;
}
