@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

.tecknar-container {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
}
.tecknar-container-middle {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1em;
  width: 100%;
  background-color: #ececec;
  padding: 1em 0;
}
.tecknar-container button, .tecknar-import-file {
  font-size: 14px;
  padding: 4px 6px;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #000;
}
.tecknar-container button:has(> .bi) {
  font-size: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 4px;
}
.tecknar-container button .bi {
  display: block;
  font-size: 1em;
  width: 20px;
  height: 20px;
  text-align: center;
}
.tecknar-container button:hover, .tecknar-import-file:hover {
  background-color: #eee;
}
.tecknar-container button:active, .tecknar-import-file:active {
  background-color: #d8d8d8;a
}
.tecknar-container button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.tecknar-import-file input {
  display: none;
}

.tecknar-canvasbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1em;
  padding: 0.5em;
  background-color: #ececec;
  width: 100%;
  box-sizing: border-box;
}

.tecknar-canvas-container {
  flex: none;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: left;
  overflow: auto;
  border: 1px solid #000;
  height: auto;
}
.tecknar-canvas, .tecknar-layer-list canvas {
  background: conic-gradient(white 0deg 90deg, #eee 90deg 180deg, white 180deg 270deg, #eee 270deg 360deg);
  background-size: 20px 20px;
  background-repeat: repeat;
  transform-origin: top left;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
}

.tecknar-toolbar {
  font-size: 16px;
  flex: 0 1 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 0.5em;
  padding: 0;
  margin: 0;
  margin-left: 1em;
}
.tecknar-toolbar label {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 4px;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #000;
}
.tecknar-toolbar label:hover {
  background-color: #eee;
}
.tecknar-toolbar label:active {
  background-color: #d8d8d8;
}
.tecknar-toolbar label:has(input:checked) {
  background-color: #ddd;
}
.tecknar-tool i {
  display: block;
  font-size: 1em;
  width: 20px;
  height: 20px;
  text-align: center;
}
.tecknar-tool input {
  display: none;
}

.tecknar-topbar {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1em;
  padding: 0.5em;
  background-color: #ddd;
  border-bottom: 1px solid #000;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.tecknar-topbar label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.tecknar-topbar input[type="color"] {
  width: 2em;
  height: min-content;
  padding: 0;
  margin: 0;
  border: 1px solid #000;
  background-color: #fff;
  cursor: pointer;
}

.tecknar-layerbar {
  flex: 0 1 30%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1em;
  height: 100%;
}
.tecknar-layer-list-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5em;
  height: 100%;
}
.tecknar-layer-controls {
  display: flex;
  flex-direction: row;
}
.tecknar-layer-list, .tecknar-layer-list ul {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: left;
  list-style: none;
  gap: 0.1em;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}
.tecknar-layer-list canvas {
  border: 1px solid #000;
  max-width: 2em;
  max-height: 1em;
  width: auto;
  height: auto;
  background-size: 2px 2px;
}
.tecknar-layer-list ul {
  padding-left: 1em;
}
.tecknar-layer-group > label:first-child {
  cursor: pointer;
}
.tecknar-layer-list li:has(> label .tecknar-layer-collapse:not(:checked)) > ul {
  display: none;
}
.tecknar-layer-collapse {
  display: none;
}
.tecknar-layer-options {
  flex: 0 1 10%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: left;
  gap: 0.5em;
}
.tecknar-layer-options label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: left;
  gap: 0.5em;
}

.tecknar-bottombar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0.5em;
  background-color: #ddd;
  border-top: 1px solid #000;
  gap: 1em;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.tecknar-bottombar label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5em
}
.tecknar-bottombar a {
  text-decoration: none;
}
.tecknar-bottombar a:hover {
  border-bottom: 1px solid currentColor;
}

.tecknar-save-modal::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}
.tecknar-save-close {
  float: right;
}
.tecknar-save-modal label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
