@layer mms-ui-reset {
  /*
  * Super aggressive reset to remove all default browser styling.
  * We'll keep it for now to avoid any unexpected issues.
  * TODO: https://jira.media-saturn.com/browse/WFC-1634
  */
  *:where(:not(iframe, canvas, img, svg, video):not(svg *, symbol *):not([class*='mms-ui-'])) {
    all: unset;
    display: revert;
  }

  /* Panda CSS Preflight */
  /* Base */
  html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    tab-size: 4;
    font-family: var(
      --global-font-body,
      ui-sans-serif,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      Roboto,
      'Helvetica Neue',
      Arial,
      'Noto Sans',
      sans-serif
    );
    -webkit-tap-highlight-color: transparent;
  }

  body {
    /*
    * Height is intentionally handled in app reset 
    * height: 100%;
    */
    line-height: inherit;
  }

  /* Box model + borders */
  *,
  ::before,
  ::after,
  ::backdrop,
  ::file-selector-button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: var(--global-color-border, currentColor);
  }

  /* Typography */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: inherit;
    font-weight: inherit;
    text-wrap: balance;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  small {
    font-size: 80%;
  }

  /*
  * Redundant with MMS Customizations but default panda preflight behavior
  b,
  strong {
    font-weight: bolder;
  }
  */

  /* Lists */
  ol,
  ul,
  menu {
    list-style: none;
  }

  /* Media */
  img,
  svg,
  video,
  canvas,
  audio,
  iframe,
  embed,
  object {
    display: block;
    vertical-align: middle;
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }

  a,
  button {
    cursor: revert;
  }

  /* Forms */
  button,
  input,
  optgroup,
  select,
  textarea,
  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    background: transparent;
  }

  button,
  input:where([type='button'], [type='reset'], [type='submit']),
  ::file-selector-button {
    appearance: button;
  }

  textarea {
    /* Revert the 'white-space' property for textarea elements on Safari
     * to ensure text wraps correctly.
     */
    white-space: revert;
    resize: vertical;
  }

  ::placeholder {
    opacity: 1;
    --placeholder-fallback: rgba(0, 0, 0, 0.5);
    color: var(--global-color-placeholder, var(--placeholder-fallback));
  }

  @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      --placeholder-fallback: color-mix(in oklab, currentColor 50%, transparent);
    }
  }

  /* Selection */
  ::selection {
    background-color: var(--global-color-selection, rgba(0, 115, 255, 0.3));
  }

  /* Tables */
  table {
    text-indent: 0;
    border-collapse: collapse;
    border-color: inherit;
  }

  /* Inline semantics */
  a {
    color: inherit;
    text-decoration: inherit;
  }

  abbr[title] {
    text-decoration: underline dotted;
  }

  code,
  kbd,
  samp,
  pre {
    font-family: var(
      --global-font-mono,
      ui-monospace,
      SFMono-Regular,
      Menlo,
      Monaco,
      Consolas,
      'Liberation Mono',
      'Courier New',
      monospace
    );
    font-size: 1em;
  }

  /* Misc */
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  summary {
    display: list-item;
  }

  progress {
    vertical-align: baseline;
  }

  dialog {
    padding: 0;
  }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    bottom: -0.25em;
  }

  sup {
    top: -0.5em;
  }

  ::-webkit-search-decoration,
  ::-webkit-search-cancel-button {
    -webkit-appearance: none;
  }

  ::-webkit-inner-spin-button,
  ::-webkit-outer-spin-button {
    height: auto;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  :-moz-focusring {
    outline: auto;
  }

  /*
  * These rules are commented out to avoid interfering with application-specific hidden attribute usage.
  * There is an open discussion about a panda preflight improvement in the original repository: https://github.com/chakra-ui/panda/discussions/3450
  *
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
  */

  /* MMS Customizations */

  b,
  strong {
    font-weight: 700;
  }

  u {
    text-decoration: underline;
  }
}
