/* version 0.2.0-alpha.2 */

input {
  padding: 0;
}

:root {
  /* colors */
  --black: #2a2a2a;
  --white: rgb(255 255 255);
  --slate: #bdbdbd;
  --slate-light: #e6e6e6;
  --slate-dark: #3c3c3c;
  --light-green: #99ff73;
  --green: #979441;
  --light-blue: #ccccff;
  --blue: #594dff;
  --pink: #f5aad1;
  --red: #ff5f5f;
  --orange: #fec20d;
  --yellow: #ffff00;

  /* accent color - defaults to blue but can be changed by user */
  --accent-color: var(--light-green);

  /* DS1 Documentation Colors */
  --ds1-docs-header-bg: light-dark(#f5f5f5, #232323);
  --ds1-docs-header-border: light-dark(#e0e0e0, #000000);
  --ds1-docs-header-text: light-dark(#2a2a2a, #f1f1f1);
  --ds1-docs-header-text-secondary: light-dark(#666666, #cdcdcd);
  --ds1-docs-accent-green: #72ff3d;
  --ds1-docs-sidebar-bg: light-dark(#fafafa, #1f1f1f);
  --ds1-docs-content-bg: light-dark(#ffffff, #171717);
  --ds1-docs-search-bg: light-dark(#f0f0f0, #171717);
  --ds1-docs-divider: light-dark(#e0e0e0, #000000);

  /* typefaces */
  --typeface: "GT-America-Standard-Regular";
  --typeface-medium: "GT-America-Standard-Medium";
  --typeface-compressed: "GT-America-Compressed-Regular";
  --typeface-japanese: "Noto Sans JP";
  --typeface-mono: "Iosevka";
  --type-size-default: calc(14px * var(--scaling-factor));
  --type-size-small: calc(10px * var(--scaling-factor));
  --type-weight-default: 500;
  --type-lineheight-default: calc(15px * var(--scaling-factor));
  --type-size-heading: calc(15px * var(--scaling-factor));
  --type-weight-bold: 500;

  --type-size-japanese-default: calc(12px * var(--scaling-factor));
  --type-size-japanese-heading: calc(14px * var(--scaling-factor));
  --type-lineheight-japanese-default: calc(17px * var(--scaling-factor));
  --type-weight-product: var(--type-weight-bold);
  --type-weight-heading: var(--type-weight-bold);
  --type-size-book: 9px;
  --type-weight-book: 400;
  --type-lineheight-book: 15px;

  /* ezo-scaling-factor */
  --scaling-factor: var(--scaling-factor-mobile);
  --scaling-factor-mobile: 1;

  /* size */
  --outline-stroke: 1px solid light-dark(var(--black), var(--slate-dark));
  --outline-stroke-mobile: calc(1px * var(--scaling-factor)) solid
    light-dark(var(--black), var(--slate-dark));
  --item-width: calc(79px * var(--scaling-factor));
  --item-height: calc(19px * var(--scaling-factor));
  --margin-correction: calc(1px * var(--scaling-factor));

  /* sizes */

  /* main unit */
  --1: 20px;
  /* bigger sizes */
  --2: calc(var(--1) * 2);
  --4: calc(var(--1) * 4);

  /* smaller sizes */
  --01: calc(var(--1) * 0.1);
  --025: calc(var(--1) * 0.25);
  --08: calc(var(--1) * 0.8);

  /* ezo-button */
  --button-background-color-primary: var(--accent-color);
  --button-background-color-secondary: light-dark(
    var(--slate-light),
    var(--slate-dark)
  );
  --button-text-color: light-dark(var(--black), var(--white));
  --button-text-color-secondary: light-dark(
    var(--slate-dark),
    var(--slate-light)
  );

  /* ezo-text-color */
  --text-color-primary: light-dark(var(--black), var(--white));
  --text-color-dimmed: light-dark(var(--slate), var(--slate-light));

  /* ezo-icon */
  --icon-background: light-dark(var(--slate-light), var(--slate-dark));
  --icon-color: light-dark(var(--black), var(--white));

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  color-scheme: light dark;
}

:root.light-theme {
  color-scheme: light;
}

:root.dark-theme {
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not(.light-theme):not(.dark-theme) {
    color-scheme: light;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not(.light-theme):not(.dark-theme) {
    color-scheme: dark;
  }
}

@view-transition {
  navigation: auto;
}

::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none;
}

@font-face {
  font-family: GT-America-Standard-Regular;
  src: url("./fonts/GT-America-Standard-Regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: GT-America-Standard-Medium;
  src: url("./fonts/GT-America-Standard-Medium.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: GT-America-Compressed-Regular;
  src: url("./fonts/GT-America-Compressed-Regular.woff2") format("woff2");
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
}

.matrix__board {
  position: relative;
  top: calc(21.5px * var(--scaling-factor));
  left: calc(-20px * var(--scaling-factor));
  display: flex;
  width: calc(240px * var(--scaling-factor));
}

.matrix__board--vertical {
  position: relative;
  left: calc(20.5px * var(--scaling-factor));
  display: flex;
  flex-direction: row;
  align-items: start;
}

.matrix__board--horizontal {
  position: relative;
  top: calc(19.5px * var(--scaling-factor));
  left: calc(-239.5px * var(--scaling-factor));
  display: flex;
  flex-direction: column;
  align-items: start;
}

.matrix__column {
  display: flex;
  flex-direction: column;
}

.matrix__row {
  display: flex;
  flex-direction: row;
}

.matrix__column-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: var(--item-height);
  margin-right: var(--margin-correction);
  margin-bottom: var(--margin-correction);
  outline: var(--outline-stroke);
  background-color: light-dark(var(--white), var(--black));
}

.matrix__row-header {
  position: relative;
  top: calc(0.5px * var(--scaling-factor));
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(19px * var(--scaling-factor));
  height: var(--item-height);
  margin-right: var(--margin-correction);
  margin-bottom: var(--margin-correction);
  outline: var(--outline-stroke);
  background-color: light-dark(rgb(220 241 213), var(--slate-dark));
}

.mobile .matrix__row-header {
  outline: var(--outline-stroke-mobile);
}

.matrix__column-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #64f814;
}

.matrix__row-content {
  display: flex;
  align-items: center;
  background-color: light-dark(#dbe4ee, var(--slate-dark));
}

.matrix__row-content--dragging {
  background-color: #b4f6ac;
}

.matrix__column-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: var(--item-height);
  margin-right: var(--margin-correction);
  margin-bottom: var(--margin-correction);
  outline: var(--outline-stroke);
}

.matrix__row-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: var(--item-height);
  margin-right: var(--margin-correction);
  outline: var(--outline-stroke);
}

.board__container {
  position: relative;
  top: calc(0.5px * var(--scaling-factor));
}

.board {
  position: relative;
  top: calc(0.5px * var(--scaling-factor));
  left: calc(0.5px * var(--scaling-factor));
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--margin-correction);
  flex-wrap: nowrap;
  touch-action: pan-x;
  cursor: move;
}

.column {
  display: flex;
  flex-direction: column;
}

.column__header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: var(--item-height);
  background-color: #00000000;
  opacity: 1;
}

.column__header:hover {
  background-color: var(--slate-light);
  outline: 0.5px solid var(--slate-light);
  opacity: 1;
}

.mobile .column__header {
  outline: var(--outline-stroke-mobile);
}

.column__header.dragging {
  background-color: var(--slate-light);
  opacity: 1;
}

.move-icon {
  color: var(--slate);
  width: 16px;
  height: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.column__header:hover .move-icon {
  opacity: 1;
  display: flex;
  justify-content: center;
}

.column__header.dragging .move-icon {
  opacity: 1;
  display: flex;
  justify-content: center;
}

.header {
  display: flex;
  justify-content: center;
  width: calc(var(--item-width) * var(--scaling-factor));
  height: calc(var(--item-height) * var(--scaling-factor));
}

.header.dragging {
  outline: calc(var(--outline-stroke) * var(--scaling-factor)) solid
    var(--black);
  outline-offset: calc(var(--outline-stroke-offset) * var(--scaling-factor));
  background-color: var(--white);
}

.card {
  position: relative;
  left: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: var(--item-height);
  margin-top: var(--margin-correction);
  margin-right: var(--margin-correction);
  outline: var(--outline-stroke);
  background-color: light-dark(var(--white), var(--slate-dark));
  color: var(--text-color-primary);
}

.mobile .card {
  outline: var(--outline-stroke-mobile);
}

.card:active {
  cursor: grabbing;
}

.list {
  display: flex;
  align-items: center;
  justify-content: start;
  width: var(--item-width);
  height: 19px;
  margin-top: 1px;
  z-index: 99;
  margin-bottom: 2px;
  padding-left: calc(3px * var(--scaling-factor));
  color: var(--text-color-primary);
  outline: var(--outline-stroke);
  background-color: var(--accent-color);
}

.item-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--item-width);
  height: 100%;
}

.item-container.mobile {
  margin-left: calc(0.25px * var(--scaling-factor));
}

.group-children {
  position: relative;
  display: flex;
  flex-direction: column;
}

.item-container.dragging .group-children {
  display: none;
}

.item-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  width: var(--item-width);
  padding-left: calc(5px * var(--scaling-factor));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grouped-item {
  width: var(--item-width);
  background-color: #6f8f63;
}

.grouped-item .card {
  width: var(--item-width);
}

table {
  border-collapse: collapse;
  width: 100%;
}

tr {
  background-color: var(--light-green);
}

td {
  text-align: left;
}

.layout-grid {
  margin-top: 0.5px;
  margin-left: -0px;
  display: grid;
  z-index: -10;
  grid-template-columns: repeat(19, 79px);
  grid-template-rows: repeat(500, 19px);
  gap: 1px;
  row-rule: 1px solid #00000012;
  column-rule: 1px solid #00000012;
  outline: 1px solid #100101e7;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
