@define-mixin docs-color-ui-light {
  .docs-color {
    border-color: var(--ld-col-neutral-100);
  }
}
@define-mixin docs-color-ui-dark {
  .docs-color {
    border-color: var(--ld-col-neutral-600);
  }
}

@mixin docs-color-ui-light;

@media (prefers-color-scheme: dark) {
  @mixin docs-color-ui-dark;
}
.docs-ui-dark {
  @mixin docs-color-ui-dark;
}
.docs-ui-light {
  @mixin docs-color-ui-light;
}

.docs-color {
  background: #090909
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g><rect height="12" width="12" fill="black"></rect><rect height="12" width="12" y="12" x="12" fill="black"></rect></g></svg>');
  display: flex;
  width: 100%;
  height: var(--ld-sp-40);
  align-items: center;
  overflow: hidden;
  border-style: solid;
  border-width: var(--ld-sp-1);
  color: var(--ld-col-neutral-900);
  overflow-x: auto;
  scroll-snap-type: x mandatory;

  &:first-of-type {
    border-top-left-radius: var(--ld-br-l);
    border-top-right-radius: var(--ld-br-l);
  }
  &:last-of-type {
    border-bottom-left-radius: var(--ld-br-l);
    border-bottom-right-radius: var(--ld-br-l);
  }
  &:not(:first-of-type) {
    border-top-width: 0;
  }
  &:not(:last-of-type) {
    border-bottom-width: 0;
  }
}

.docs-color--transparent {
  color: var(--ld-col-wht);

  &.docs-color--dark {
    color: var(--ld-col-neutral-900);
  }

  .docs-copy-to-cb {
    filter: invert(1) hue-rotate(180deg);
  }
}

.docs-color--dark {
  color: var(--ld-col-wht);
  background: #f1f1f1
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g><rect height="12" width="12" fill="white"></rect><rect height="12" width="12" y="12" x="12" fill="white"></rect></g></svg>');

  .docs-copy-to-cb {
    filter: invert(1) hue-rotate(180deg);
  }
}

.docs-color__var,
.docs-color__val {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  width: 50%;
  min-width: 20rem;
  font: var(--ld-typo-body-s);
  font-family: 'Source Code Pro', Consolas, Monaco, 'Ubuntu Mono', monospace;
  flex-shrink: 0;
  padding: var(--ld-sp-8);
  white-space: nowrap;

  .docs-copy-to-cb {
    margin-right: var(--ld-sp-8);
  }
}

.docs-color__val {
  padding-left: 0;
}
