@import url('layers.css');

/* Required utilities */
@import url('utilities/size.css');
@import url('utilities/variants.css');

@layer ed-native {
  /* region General ~~~~~~~~~~~~~~~~~~~~~~~~~ */
  html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

    tab-size: 4;

    background-color: var(--ed-color-surface-default);
  }

  /* Hide mobile-only elements when the page is in desktop view */
  ed-page[view='desktop'] .ed-mobile-only {
    display: none !important;
  }

  /* Hide desktop-only elements when the page is in mobile view */
  ed-page[view='mobile'] .ed-desktop-only {
    display: none !important;
  }

  *,
  *::before,
  *::after {
    box-sizing: inherit;
  }

  body {
    min-height: 100vh;
    margin: 0;
    padding: 0;

    color: var(--ed-color-text);
    font-family: var(--ed-font-family-body);
    font-size: var(--ed-font-size-m);
    font-weight: var(--ed-font-weight-body);
    line-height: var(--ed-line-height-normal);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: none;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
  }
  /* endregion */

  /* region Content Flow ~~~~~~~~~~~~~~~~~~~~ */
  address,
  audio,
  blockquote,
  dd,
  details,
  dl,
  fieldset,
  figure,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  hr,
  iframe,
  ol,
  p,
  pre,
  table,
  ul,
  video {
    margin: 0;

    &:has(+ *) {
      margin-block-end: var(--ed-content-spacing);
    }
  }
  /* endregion */

  /* region Block Text ~~~~~~~~~~~~~~~~~~~~~~ */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--ed-font-family-heading);
    font-weight: var(--ed-font-weight-heading);
    line-height: var(--ed-line-height-normal);
    color: var(--ed-color-title);
    text-wrap: balance;
  }

  h1 {
    font-size: var(--ed-font-size-2xl);
  }

  h2 {
    font-size: var(--ed-font-size-xl);
  }

  h3 {
    font-size: var(--ed-font-size-l);
  }

  h4,
  h5,
  h6 {
    font-size: var(--ed-font-size-l);
  }

  p {
    text-wrap: pretty;
  }

  blockquote {
    padding: var(--ed-space-xl);
    font-family: var(--ed-font-family-body);
    font-size: var(--ed-font-size-m);
    line-height: var(--ed-line-height-expanded);

    border-inline-start: var(--ed-border-style) var(--ed-border-width-l) var(--ed-color-border);
  }

  hr {
    margin: var(--ed-content-spacing) 0;

    border: none;
    border-bottom: solid var(--ed-border-width-s) var(--ed-color-border);
  }
  /* endregion */

  /* region Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  ul,
  ol {
    padding: 0;
  }

  li > ul,
  li > ol {
    margin-inline-start: 0.25em;
  }

  ul {
    list-style: disc;
  }

  li {
    margin-inline-start: 1.125em;
    padding: 0;
  }

  dt {
    font-weight: var(--ed-font-weight-bold);
  }
  /* endregion */

  /* region Inline Text ~~~~~~~~~~~~~~~~~~~~~ */
  strong,
  b {
    font-weight: var(--ed-font-weight-bold);
  }

  em,
  i {
    font-style: italic;
  }

  u {
    text-decoration-line: underline;
    text-decoration-thickness: 0.09375em;
    text-underline-offset: 0.125em;
  }

  s {
    text-decoration-line: line-through;
    text-decoration-thickness: 0.09375em;
  }

  ins {
    text-decoration-color: var(--ed-color-success-fill-normal);
    text-decoration-line: underline;
    text-decoration-thickness: 0.09375em;
    text-underline-offset: 0.125em;
  }

  del {
    color: color-mix(in oklab, currentColor, transparent 10%);
    text-decoration-color: var(--ed-color-danger-fill-normal);
    text-decoration-line: line-through;
    text-decoration-thickness: 0.09375em;
  }

  mark {
    padding: 0.125em 0.25em;
    background-color: var(--ed-color-warning-fill-light);
    border-radius: var(--ed-border-radius-s);
  }

  small {
    font-size: var(--ed-font-size-smaller);
  }

  sub,
  sup {
    font-size: var(--ed-font-size-smaller);
    line-height: 0;
  }

  sub {
    vertical-align: sub;
  }

  sup {
    vertical-align: super;
  }

  abbr[title] {
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 0.09375em;
    text-underline-offset: 0.125em;

    cursor: help;
  }

  kbd {
    padding: 0.125em 0.25em;

    font-family: var(--ed-font-family-code);
    font-size: var(--ed-font-size-smaller);
    font-weight: var(--ed-font-weight-code);

    border: solid var(--ed-border-width-s) color-mix(in oklab, currentColor, transparent 50%);
    border-radius: var(--ed-border-radius-m);
    box-shadow: 0 0.125em 0 0 color-mix(in oklab, currentColor, transparent 50%);

    ed-icon {
      vertical-align: -2px;
    }
  }
  /* endregion */

  /* region Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  a {
    color: var(--ed-color-text-link);
    text-decoration: var(--ed-link-decoration-default);
    -webkit-text-decoration: var(--ed-link-decoration-default);
    text-decoration-thickness: round(0.0625em, 1px);
    text-underline-offset: 0.125em;
  }

  *:is([appearance~='accent'], .ed-accent) {
    a,
    a:hover {
      color: currentColor;
    }
  }
  @media (hover: hover) {
    a:hover {
      text-decoration: var(--ed-link-decoration-hover);
      -webkit-text-decoration: var(--ed-link-decoration-hover);
    }
  }

  a:active {
    text-decoration: var(--ed-link-decoration-hover);
    -webkit-text-decoration: var(--ed-link-decoration-hover);
    text-decoration-thickness: round(0.125em, 1px);
  }

  a:focus,
  button:focus {
    outline: none;
  }

  a:focus-visible,
  button:focus-visible {
    outline: var(--ed-focus-ring);
    outline-offset: var(--ed-focus-ring-offset);
  }
  /* endregion */

  /* region Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  code,
  samp,
  var {
    padding: 0.125em 0.25em;

    font-family: var(--ed-font-family-code);
    font-size: var(--ed-font-size-smaller);
    font-weight: var(--ed-font-weight-code);

    background-color: var(--ed-color-code-highlight);
    border-radius: var(--ed-border-radius-s);
  }

  pre {
    padding: var(--ed-space-m);

    font-family: var(--ed-font-family-code);
    font-size: var(--ed-font-size-smaller);
    font-weight: var(--ed-font-weight-code);
    white-space: pre;

    background-color: var(--ed-color-code-highlight);
    border-radius: var(--ed-border-radius-m);

    /* Remove overlapping styles for child code elements */
    & code,
    & samp,
    & var {
      padding: 0;

      font-size: 1em;

      background-color: transparent;
    }

    /* Print styles */
    @media print {
      background: none;
      border: solid var(--ed-border-width-s) var(--ed-color-border);
    }
  }
  /* endregion */

  /* region Media ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  img,
  svg,
  picture,
  video {
    max-width: 100%;
    height: auto;
  }

  img,
  picture,
  video {
    border-radius: var(--ed-border-radius-m);
  }

  embed,
  iframe,
  object {
    max-width: 100%;
  }

  iframe {
    border: none;
  }
  /* endregion */

  /* region Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  table {
    width: 100%;

    border: none;
    border-collapse: collapse;
  }

  caption {
    color: var(--ed-color-text);
    font-size: var(--ed-font-size-smaller);

    &:has(+ *) {
      margin-block-end: 0.75em;
    }
  }

  tbody {
    tr {
      border-top: solid var(--ed-border-width-s) var(--ed-color-border);

      :where(table.ed-zebra-rows) &:nth-child(odd) {
        background-color: color-mix(in oklab, var(--ed-color-coolgray-20) 60%, transparent);
      }

      :where(table.ed-hover-rows) & {
        @media (hover: hover) {
          &:hover {
            background-color: var(--ed-surface-hover);

            &,
            + tr {
              border-top-color: var(--ed-color-border);
            }
          }
        }
      }
    }
  }

  td,
  th {
    padding: 0.75em;
    text-align: start;
    vertical-align: top;
  }

  th {
    padding-block: 0.75em;

    font-size: var(--ed-font-size-smaller);
    font-weight: var(--ed-font-weight-bold);
  }
  /* endregion */

  /* region Details ~~~~~~~~~~~~~~~~~~~~~~~~~ */
  details {
    padding: 0;

    background-color: var(--ed-color-surface-default);
    border: var(--ed-border-width-s) var(--ed-color-border) var(--ed-border-style);
    border-radius: var(--ed-border-radius-m);

    overflow-anchor: none;

    summary {
      display: flex;
      align-items: center;
      justify-content: space-between;

      padding: var(--ed-space-m);

      border-radius: calc(var(--ed-border-radius-m) - var(--ed-border-width-s));

      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;

      > * {
        margin: 0;
      }

      &:focus {
        outline: none;
      }

      &:focus-visible {
        outline: var(--ed-focus-ring);
        outline-offset: calc(var(--ed-panel-border-width) + var(--ed-focus-ring-offset));
      }
    }

    &[open] {
      padding: 0 var(--ed-space-m) var(--ed-space-m) var(--ed-space-m);

      summary {
        margin-inline: calc(-1 * var(--ed-space-m));

        border-end-start-radius: 0;
        border-end-end-radius: 0;
      }
    }

    &::details-content {
      box-sizing: border-box; /* Ensure contents don't overflow */
    }

    /* Print styles */
    @media print {
      background: none;
      border: solid var(--ed-border-width-s) var(--ed-color-border);

      summary {
        list-style: none;
      }
    }
  }

  /* Replace the summary marker */
  details summary {
    display: block;
    &::marker,
    &::-webkit-details-marker {
      display: none;
      content: '';
    }

    &::after {
      content: '';
      background-color: var(--ed-color-text);
      mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>')
        center no-repeat;
      width: 1rem;
      height: 1rem;
      rotate: 0deg;
    }

    &:dir(rtl)::after {
      rotate: 180deg;
    }
  }

  details[open] summary::after {
    rotate: 90deg;
  }
  /* endregion */

  /* region Dialogs ~~~~~~~~~~~~~~~~~~~~~~~~~ */
  /*dialog {*/
  /*  flex-direction: column;*/
  /*  align-items: start;*/

  /*  width: 32rem;*/
  /*  max-width: calc(100% - var(--ed-space-l));*/
  /*  padding: var(--ed-space-l);*/

  /*  background-color: var( --ed-color-surface-default);*/
  /*  border-radius: var(--ed-panel-border-radius);*/
  /*  border: none;*/
  /*  box-shadow: var(--ed-shadow-l);*/

  /*  transition: var(--ed-transition-slow, 200ms) var(--ed-transition-easing);*/

  /*  !* Center the dialog *!*/
  /*  margin: auto;*/
  /*  inset: 0;*/

  /*  &[open] {*/
  /*    display: flex;*/
  /*  }*/

  /*  &:focus {*/
  /*    outline: none;*/
  /*  }*/
  /*}*/

  /*dialog::backdrop {*/
  /*  background-color: var(--ed-color-overlay-modal, rgb(0 0 0 / 0.25));*/
  /*}*/
  /* endregion */

  /* region Form Labels ~~~~~~~~~~~~~~~~~~~~~ */
  /*label {*/
  /*  display: inline-block;*/
  /*  position: relative;*/

  /*  color: var(--ed-form-control-label-color);*/
  /*  font-weight: var(--ed-form-control-label-font-weight);*/
  /*  line-height: var(--ed-form-control-label-line-height);*/

  /*  &:has(*/
  /*    input:not(*/
  /*      [type='button'],*/
  /*      [type='checkbox'],*/
  /*      [type='color'],*/
  /*      [type='file'],*/
  /*      [type='hidden'],*/
  /*      [type='image'],*/
  /*      [type='radio'],*/
  /*      [type='reset'],*/
  /*      [type='submit']*/
  /*    ),*/
  /*    textarea,*/
  /*    select*/
  /*  ) {*/
  /*    width: 100%;*/
  /*  }*/

  /*  & + :is(input:not([type='checkbox'], [type='radio']), textarea, select),*/
  /*  & > :is(input:not([type='checkbox'], [type='radio']), textarea, select) {*/
  /*    margin-block-start: 0.5em;*/
  /*  }*/
  /*}*/
  /* endregion */

  /* region Fieldsets ~~~~~~~~~~~~~~~~~~~~~~~ */
  /*fieldset {*/
  /*  padding: var(--ed-space-l);*/
  /*  padding-block-start: calc(var(--ed-space-l) - 0.5em);*/

  /*  border: solid 1px var(--ed-color-border);*/
  /*  border-radius: var(--ed-border-radius-m);*/
  /*}*/

  /*legend {*/
  /*  padding: 0;*/
  /*  padding-inline: var(--ed-space-xs);*/

  /*  font-weight: var(--ed-form-control-label-font-weight);*/
  /*}*/
  /* endregion */

  /* region Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~ */
  button,
  input[type='button'],
  input[type='reset'],
  input[type='submit'],
  input[type='file'],
  a.ed-button {
    /* We allow modifier classes on <input type="file">,
       * but these selectors ensure the styles only apply to
       * the file selector button in the user agent's shadow root */
    &:not(input[type='file']),
    &::file-selector-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;

      height: var(--ed-form-control-height);
      padding: 0 var(--ed-form-control-padding-inline);

      font-family: inherit;
      font-size: inherit;
      font-weight: var(--ed-font-weight-action);
      text-decoration: none;
      vertical-align: middle;
      white-space: nowrap;

      border-style: var(--ed-border-style);
      border-width: var(--ed-border-width-s);
      border-radius: var(--ed-form-control-border-radius);

      transition-property: background, border, box-shadow, color;
      transition-duration: var(--ed-transition-fast);
      transition-timing-function: var(--ed-transition-easing);

      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Default styles for standard buttons */
    &:not(input[type='file']) {
      color: var(--ed-color-on-normal);
      background-color: var(--ed-color-fill-normal);
      border-color: var(--ed-color-fill-normal);

      &:not(:disabled) {
        &:hover {
          background-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-hover));
          border-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-hover));
        }

        &:active {
          background-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-active));
          border-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-active));
        }
        &:focus-visible {
          border-color: var(--ed-color-focus-border);
        }
      }
    }

    /* Default styles for file selector buttons */
    &:is(input[type='file']) {
      &::file-selector-button {
        color: var(--ed-color-on-normal, var(--ed-color-neutral-on-normal));
        background-color: var(--ed-color-fill-normal, var(--ed-color-neutral-fill-normal));
        border-color: transparent;
      }

      &:not(:disabled) {
        &::file-selector-button:hover {
          background-color: color-mix(
            in oklab,
            var(--ed-color-fill-normal, var(--ed-color-neutral-fill-normal)),
            var(--ed-color-mix-hover)
          );
        }

        &::file-selector-button:active {
          background-color: color-mix(
            in oklab,
            var(--ed-color-fill-normal, var(--ed-color-neutral-fill-normal)),
            var(--ed-color-mix-active)
          );
        }
      }
    }

    /* Modifier classes */
    &.ed-plain {
      &:not(input[type='file']),
      &::file-selector-button {
        color: var(--ed-color-fill-dark);
        background-color: transparent;
        border-color: transparent;
      }

      &:not(:disabled) {
        &:not(input[type='file']):hover,
        &::file-selector-button:hover {
          background-color: color-mix(in oklab, transparent, var(--ed-color-mix-hover));
        }

        &:not(input[type='file']):active,
        &::file-selector-button:active {
          background-color: color-mix(in oklab, transparent, var(--ed-color-mix-active));
        }

        &:not(input[type='file']):focus-visible,
        &::file-selector-button:focus-visible {
          box-shadow: inset var(--ed-color-fill-normal) 0 0 0.375rem 0;
          border-color: var(--ed-color-fill-normal);
        }
      }
    }

    &.ed-outlined {
      &:not(input[type='file']),
      &::file-selector-button {
        color: var(--ed-color-fill-dark);
        background-color: transparent;
        border-color: var(--ed-color-fill-normal);
      }

      &:not(:disabled) {
        &:not(input[type='file']):hover,
        &::file-selector-button:hover {
          background-color: color-mix(in oklab, transparent, var(--ed-color-mix-hover));
        }

        &:not(input[type='file']):active,
        &::file-selector-button:active {
          background-color: color-mix(in oklab, transparent, var(--ed-color-mix-active));
        }

        &:not(input[type='file']):focus-visible,
        &::file-selector-button:focus-visible {
          box-shadow: inset var(--ed-color-fill-normal) 0 0 0.375rem 0;
        }
      }
    }

    &.ed-accent {
      &:not(input[type='file']),
      &::file-selector-button {
        color: var(--ed-color-on-normal);
        background-color: var(--ed-color-fill-normal);
        border-color: var(--ed-color-fill-normal);
      }

      &:not(:disabled) {
        &:not(input[type='file']):hover,
        &::file-selector-button:hover {
          background-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-hover));
          border-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-hover));
        }

        &:not(input[type='file']):active,
        &::file-selector-button:active {
          background-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-active));
          border-color: color-mix(in oklab, var(--ed-color-fill-normal), var(--ed-color-mix-active));
        }

        &:not(input[type='file']):focus-visible,
        &::file-selector-button:focus-visible {
          border-color: var(--ed-color-focus-border);
        }
      }
    }

    &.ed-pill {
      &:not(input[type='file']),
      &::file-selector-button {
        border-radius: var(--ed-border-radius-pill);
      }
    }

    &:focus {
      outline: none;
    }

    &:focus-visible {
      outline: var(--ed-focus-ring);
      outline-offset: var(--ed-focus-ring-offset);
    }

    /* Wrap in :is() so that Safari doesn't stop parsing this block */
    &:is(::-moz-focus-inner) {
      border: 0;
    }

    &:disabled {
      opacity: var(--ed-disabled-opacity);
      cursor: not-allowed;

      /* When disabled, prevent mouse events from bubbling up from children */
      * {
        pointer-events: none;
      }
    }

    /* Adds space between icons and adjacent elements
       * Prefer sibling selectors over :first-child/:last-child to avoid extra space when an icon is used alone */
    & > ed-icon:has(+ *) {
      margin-inline-end: 0.25em;
      font-size: round(down, 1.3em, 1px);
    }

    & > * + ed-icon {
      margin-inline-start: 0.25em;
      font-size: round(down, 1.3em, 1px);
    }
  }
  /* endregion */

  /* region File Inputs ~~~~~~~~~~~~~~~~~~~~~ */
  /*  input[type='file'] {*/
  /*    display: block;*/

  /*    max-inline-size: 100%;*/

  /*    color: var(--ed-form-control-value-color);*/
  /*    font-family: inherit;*/
  /*    font-size: var(--ed-form-control-value-font-size);*/
  /*    font-weight: var(--ed-form-control-value-font-weight);*/
  /*    line-height: var(--ed-form-control-value-line-height);*/
  /*    vertical-align: middle;*/

  /*    border-radius: var(--ed-border-radius-m);*/

  /*    cursor: pointer;*/
  /*  }*/
  /* endregion */

  /* region Checkboxes + Radios ~~~~~~~~~~~~~ */
  input[type='checkbox'],
  label:has(input[type='checkbox']),
  input[type='radio'],
  label:has(input[type='radio']) {
    display: inline-flex;
    width: fit-content;
    color: var(--ed-form-control-value-color);
    font-family: inherit;
    font-size: var(--ed-font-size-m);
    font-weight: var(--ed-form-control-label-font-weight);
    line-height: var(--ed-form-control-value-line-height);
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;

    &,
    + label {
      cursor: pointer;
    }

    &:disabled,
    &:has(:disabled) {
      opacity: 0.5;

      cursor: not-allowed;
    }
  }

  input[type='checkbox'],
  input[type='radio'] {
    appearance: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    width: var(--ed-form-control-toggle-size);
    height: var(--ed-form-control-toggle-size);
    margin: 0;
    margin-inline-end: 0.5em;

    background-color: var(--ed-form-control-background-color);
    border-color: var(--ed-form-control-border-color);
    border-style: var(--ed-border-style);
    border-width: var(--ed-form-control-border-width);

    @media (hover: hover) {
      &:hover {
        background-color: color-mix(in oklab, var(--ed-form-control-background-color), var(--ed-color-mix-hover));
      }
    }

    &:active {
      background-color: color-mix(in oklab, var(--ed-form-control-background-color), var(--ed-color-mix-active));
    }

    transition:
      background var(--ed-transition-normal),
      border-color var(--ed-transition-fast),
      box-shadow var(--ed-transition-fast),
      color var(--ed-transition-fast);
    transition-timing-function: var(--ed-transition-easing);

    &:focus-visible {
      outline: var(--ed-focus-ring);
      outline-offset: var(--ed-focus-ring-offset);
    }
  }

  /* Checkbox */
  input[type='checkbox'] {
    --checked-icon-color: var(--ed-color-brand-on-normal);
    --checked-icon-scale: 0.8;

    border-radius: min(
      calc(var(--ed-form-control-toggle-size) * 0.375),
      var(--ed-border-radius-s)
    ); /* min prevents entirely circular checkbox */

    &:checked,
    &:indeterminate {
      color: var(--checked-icon-color);

      background-color: var(--ed-form-control-activated-color);
      border-color: var(--ed-form-control-activated-color);

      @media (hover: hover) {
        &:hover {
          background-color: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-hover));
        }
      }

      &:active {
        background-color: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-active));
      }
    }

    &:checked::after,
    &:indeterminate::after {
      content: '';

      width: var(--ed-form-control-toggle-size);
      height: var(--ed-form-control-toggle-size);
      scale: var(--checked-icon-scale);

      background-color: currentColor;
    }

    &:checked::after {
      mask: url('data:image/svg+xml;utf8,<svg viewBox="1 1 14 14" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> <path d="M 11.507813,4.5 6.8671875,9.1386719 4.8574219,7.1289062 3.625,8.359375 6.8671875,11.603516 12.738281,5.7324219 Z"/> </svg>')
        center / 1.1rem 1.1rem no-repeat;
    }

    &:indeterminate::after {
      mask: url('data:image/svg+xml;utf8,<svg viewBox="1 1 14 14" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="m 4,7 v 2 h 8 V 7 Z" /></svg>')
        center no-repeat;
    }
  }

  /* Radio */
  input[type='radio'] {
    --checked-icon-color: var(--ed-form-control-activated-color);
    --checked-icon-scale: 0.7;

    color: transparent;

    border-radius: 50%;

    &:checked {
      background: var(--checked-icon-color);

      border-color: var(--ed-form-control-activated-color);

      @media (hover: hover) {
        &:hover {
          background: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-hover));
          border-color: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-hover));
        }
      }

      &:active {
        background: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-active));
        border-color: color-mix(in oklab, var(--ed-form-control-activated-color), var(--ed-color-mix-active));
      }
    }

    &:checked::after {
      content: '';

      aspect-ratio: 1;
      width: var(--ed-form-control-toggle-size);
      height: var(--ed-form-control-toggle-size);
      scale: 0.4375;

      background-color: var(--ed-form-control-background-color);
      border-radius: 50%;
    }
  }
  /* endregion */

  /* region Text Fields + Textareas + Selects */
  /*  input:not(*/
  /*    !* Exclude inputs that don't accept text *!*/
  /*    [type='button'],*/
  /*    [type='checkbox'],*/
  /*    [type='color'],*/
  /*    [type='file'],*/
  /*    [type='hidden'],*/
  /*    [type='image'],*/
  /*    [type='radio'],*/
  /*    [type='range'],*/
  /*    [type='reset'],*/
  /*    [type='submit']*/
  /*  ), textarea, select {*/
  /*    width: 100%;*/
  /*    height: var(--ed-form-control-height);*/
  /*    padding: 0 var(--ed-form-control-padding-inline);*/

  /*    color: var(--ed-form-control-value-color);*/
  /*    font-size: var(--ed-form-control-value-size);*/
  /*    font-family: inherit;*/
  /*    font-weight: var(--ed-form-control-value-font-weight);*/
  /*    line-height: var(--ed-form-control-value-line-height);*/
  /*    vertical-align: middle;*/

  /*    background-color: var(--ed-form-control-background-color);*/
  /*    border-color: var(--ed-form-control-border-color);*/
  /*    border-style: var(--ed-form-control-border-style);*/
  /*    border-width: var(--ed-form-control-border-width);*/
  /*    border-radius: var(--ed-form-control-border-radius);*/

  /*    transition:*/
  /*      background-color var(--ed-transition-normal),*/
  /*      border var(--ed-transition-normal),*/
  /*      outline var(--ed-transition-fast);*/
  /*    transition-timing-function: var(--ed-transition-easing);*/

  /*    cursor: text;*/

  /*    &::placeholder {*/
  /*      color: var(--ed-form-control-placeholder-color);*/

  /*      user-select: none;*/
  /*      -webkit-user-select: none;*/
  /*    }*/

  /*    &:focus {*/
  /*      outline: none;*/
  /*    }*/

  /*    &:focus-visible {*/
  /*      outline: var(--ed-focus-ring);*/
  /*      outline-offset: var(--ed-focus-ring-offset);*/
  /*    }*/

  /*    &:disabled {*/
  /*      opacity: 0.5;*/

  /*      cursor: not-allowed;*/
  /*    }*/

  /*    &.ed-outlined {*/
  /*      background-color: var(--ed-form-control-background-color);*/
  /*      border-color: var(--ed-form-control-border-color);*/
  /*    }*/

  /*    &.ed-filled {*/
  /*      background-color: var(--ed-color-neutral-fill-light);*/
  /*      border-color: var(--ed-color-neutral-fill-light);*/

  /*      &.ed-outlined {*/
  /*        border-color: var(--ed-form-control-border-color);*/
  /*      }*/
  /*    }*/

  /*    &.ed-pill {*/
  /*      border-radius: var(--ed-border-radius-pill);*/
  /*    }*/
  /*  }*/

  /*  !* Textarea *!*/
  /*  textarea {*/
  /*    height: auto;*/
  /*    min-height: var(--ed-form-control-height);*/
  /*    padding: calc(var(--ed-form-control-padding-block) - ((1lh - 1em) / 2)) var(--ed-form-control-padding-inline); !* accounts for the larger line height of textarea content *!*/

  /*    line-height: var(--ed-line-height-normal);*/

  /*    resize: vertical;*/
  /*  }*/

  /*  !* Select *!*/
  /*  select {*/
  /*    --icon-caret: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="rgb(180 180 200)" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');*/

  /*    appearance: none;*/

  /*    position: relative;*/

  /*    min-width: 0;*/
  /*    overflow: hidden;*/

  /*    background-image: var(--icon-caret), var(--icon-caret);*/
  /*    background-repeat: no-repeat;*/
  /*    background-position: center right var(--ed-form-control-padding-inline);*/
  /*    background-blend-mode: hue, difference;*/
  /*    background-size: 1rem 1rem;*/

  /*    cursor: pointer;*/
  /*  }*/
  /* endregion */

  /* region Sliders ~~~~~~~~~~~~~~~~~~~~~~~~~ */
  /*  input[type='range'] {*/
  /*    --thumb-width: 1.4em;*/
  /*    --thumb-height: 1.4em;*/
  /*    --track-size: 0.5em;*/

  /*    -webkit-appearance: none;*/

  /*    display: flex;*/
  /*    flex-direction: column;*/
  /*    position: relative;*/

  /*    width: 100%;*/
  /*    height: var(--track-size);*/
  /*    margin: 0;*/

  /*    font-size: inherit;*/
  /*    line-height: var(--ed-form-control-height);*/
  /*    vertical-align: middle;*/

  /*    background-color: var(--ed-color-neutral-fill-normal);*/
  /*    border-radius: calc(var(--track-size) / 2);*/

  /*    &::-webkit-slider-runnable-track {*/
  /*      width: 100%;*/
  /*      height: var(--track-size);*/

  /*      border: none;*/
  /*      border-radius: 999px;*/
  /*    }*/

  /*    &::-webkit-slider-thumb {*/
  /*      -webkit-appearance: none;*/

  /*      width: var(--thumb-width);*/
  /*      height: var(--thumb-height);*/
  /*      margin-top: calc(var(--thumb-height) / -2 + var(--track-size) / 2);*/

  /*      background-color: var(--ed-form-control-activated-color);*/
  /*      border: solid 0.125em var(--ed-color-surface-default);*/
  /*      border-radius: 50%;*/

  /*      transition-property: background-color, border-color, box-shadow, color;*/
  /*      transition-duration: var(--ed-transition-normal);*/
  /*      transition-timing-function: var(--ed-transition-easing);*/
  /*    }*/

  /*    &:enabled {*/
  /*      &:focus-visible::-webkit-slider-thumb {*/
  /*        outline: var(--ed-focus-ring);*/
  /*        outline-offset: var(--ed-focus-ring-offset);*/
  /*      }*/

  /*      &::-webkit-slider-thumb {*/
  /*        cursor: pointer;*/
  /*      }*/

  /*      &::-webkit-slider-thumb:active {*/
  /*        cursor: grabbing;*/
  /*      }*/
  /*    }*/

  /*    &::-moz-focus-outer {*/
  /*      border: 0;*/
  /*    }*/

  /*    &::-moz-range-progress {*/
  /*      height: var(--track-size);*/

  /*      background-color: var(--ed-color-neutral-fill-normal);*/
  /*      border-radius: 3px;*/
  /*    }*/

  /*    &::-moz-range-track {*/
  /*      width: 100%;*/
  /*      height: var(--track-size);*/

  /*      background-color: var(--ed-color-neutral-fill-normal);*/
  /*      border: none;*/
  /*      border-radius: 999px;*/
  /*    }*/

  /*    &::-moz-range-thumb {*/
  /*      width: var(--thumb-width);*/
  /*      height: var(--thumb-height);*/

  /*      background-color: var(--ed-form-control-activated-color);*/
  /*      border: solid 0.125em var(--ed-color-surface-default);*/
  /*      border-radius: 50%;*/

  /*      transition-property: background-color, border-color, box-shadow, color;*/
  /*      transition-duration: var(--ed-transition-normal);*/
  /*      transition-timing-function: var(--ed-transition-easing);*/
  /*    }*/

  /*    &:enabled {*/
  /*      &:focus-visible::-moz-range-thumb {*/
  /*        outline: var(--ed-focus-ring);*/
  /*        outline-offset: var(--ed-focus-ring-offset);*/
  /*      }*/

  /*      &::-moz-range-thumb {*/
  /*        cursor: pointer;*/
  /*      }*/

  /*      &::-moz-range-thumb:active {*/
  /*        cursor: grabbing;*/
  /*      }*/
  /*    }*/
  /*  }*/

  /*  label > input[type='range'] {*/
  /*    margin-block-start: 1em;*/
  /*  }*/

  /*  input[type='range']:focus {*/
  /*    outline: none;*/
  /*  }*/

  /*  input[type='range']:disabled {*/
  /*    opacity: 0.5;*/

  /*    cursor: not-allowed;*/

  /*    &::-webkit-slider-thumb {*/
  /*      cursor: not-allowed;*/
  /*    }*/

  /*    &::-moz-range-thumb {*/
  /*      cursor: not-allowed;*/
  /*    }*/
  /*  }*/
  /* endregion */

  /* region Progress ~~~~~~~~~~~~~~~~~~~~~~~~ */
  /*  progress {*/
  /*    --indicator-color: var(--ed-color-brand-fill-normal);*/

  /*    width: 100%;*/
  /*    height: 1rem;*/
  /*    overflow: hidden;*/

  /*    color: var(--ed-color-brand-on-normal);*/

  /*    background-color: var(--ed-color-neutral-fill-normal);*/
  /*    border-radius: var(--ed-border-radius-pill);*/

  /*    &::-webkit-progress-bar {*/
  /*      background: transparent;*/
  /*    }*/

  /*    &[value]::-webkit-progress-value {*/
  /*      background-color: var(--indicator-color);*/
  /*    }*/

  /*    &::-moz-progress-bar {*/
  /*      background-color: var(--indicator-color);*/
  /*    }*/
  /*  }*/

  /*  !* Indeterminate *!*/
  /*  progress:not([value]) {*/
  /*    padding-left: var(--inset-inline-start);*/

  /*    animation: ed-progress-indeterminate 2.5s infinite cubic-bezier(0.37, 0, 0.63, 1);*/

  /*    &::-webkit-progress-bar {*/
  /*      background-color: var(*/
  /*        --indicator-color*/
  /*      ); !* Chrome does not render a ::-webkit-progress-value for indeterminate progress *!*/
  /*    }*/
  /*  }*/

  /*  @keyframes ed-fade-in {*/
  /*    from {*/
  /*      opacity: 0;*/
  /*    }*/
  /*  }*/

  /*  !* For some reason Chrome fiercely resists animations on this pseudo*/
  /*	  so we had to do it with padding on <progress> *!*/
  /*  @keyframes ed-progress-indeterminate {*/
  /*    0% {*/
  /*      padding-inline-end: 100%;*/
  /*    }*/

  /*    25%,*/
  /*    100% {*/
  /*      padding-inline-end: 0%;*/
  /*    }*/

  /*    75%,*/
  /*    100% {*/
  /*      padding-inline-start: 100%;*/
  /*    }*/
  /*  }*/
  /* endregion */
}
