:root {
  --min-width: 1000px;
  --toolbar-height: 45px;
  --min-content-line-height: 480px;
  --min-clipboard-height: 200px;
  --color-size: 58px;
  --toolbox-tool-size: 52px;
  --background-color: white;
  --clipboard-item-width: 100px;
  --clipboard-item-height: 130px;
  --clipboard-dimensions-height: 21px;
}

* {
  box-sizing: border-box;
  vertical-align: middle;
}

body {
  margin: 0;
  padding: 0;
  background-color: red;
}

.outside-container {
  min-width: var(--min-width);
  width: 100vw;
  height: 100vh;
  /* background-color: green; */
}

.inside-container {
  padding: 3px;
  background-color: var(--background-color);
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
}

.toolbar {
  height: var(--toolbar-height);
  min-height: var(--toolbar-height);
  border: 1px solid black;
  padding: 1px;
  display: flex;
}

.content-line {
  flex: 2 1 600px;
  min-height: var(--min-content-line-height);
  display: flex;
  gap: 2px;
  flex-direction: row;
}

.content {
  border: 1px solid black;
  flex: 4 1 1000px;
}

.toolbox-container {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toolbox {
  border: 1px solid black;
  flex: 1 1 1px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.toolbox-content {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(var(--toolbox-tool-size), 1fr)
  );
  gap: 2px;
  padding: 2px;
  overflow: auto;
  width: 100%;
  /* background: red; */
}

.palette {
  border: 1px solid black;
  flex: 6 1 6px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

h1 {
  font-size: 16px;
  margin: 0;
  text-align: center;
  font-family: system-ui;
  border-bottom: 1px solid black;
  padding: 1px;
}

.toolbar-spacer {
  width: 1px;
  border-left: 1px solid black;
  height: calc(var(--toolbar-height) - 4px);
  margin-right: 6px;
  margin-left: 6px;
}

.palette-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--color-size), 1fr));
  gap: 3px;
  padding: 5px;
  overflow: auto;
}

.tool {
  height: 100%;
  border: 1px solid black;
  position: relative;
  padding: 1rem;
}

.tool::before {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.tool > img {
  position: absolute;
  max-width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.toolbar .tool {
  margin: 0 2px 0 2px;
}

.toolbox .tool {
  background-color: aliceblue;
}

.toolbox .selected-tool {
  background: #ffc012;
}

/* HACK DO CARALHO PRA FAZER QUADRADOS https://css-tricks.com/a-grid-of-logos-in-squares/ */
.color {
  border: 1px solid black;
  padding: 0;
  /* background: green; */
  height: 100%;
  position: relative;
}

.color::before {
  content: "";
  padding-bottom: 100%;
  display: block;
}

.color > img.add-color {
  position: absolute;
  max-width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

.color img.closebutton {
  width: 22px;
  height: 22px;
  position: absolute;
  left: calc(100% - 22px + 3px);
  top: -3px;
  cursor: pointer;
}

/****************** Clipboard *****************************************/
.clipboard {
  border: 1px solid black;
  flex: 1 1 300px;
  min-height: var(--min-clipboard-height);
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--clipboard-item-width));
  align-content: start;
  gap: 2px;
  padding: 2px;
}

.clipboard .item {
  border: 1px solid black;
  width: var(--clipboard-item-width);
  height: var(--clipboard-item-height);
  position: relative;
}

.clipboard .item .dimensions {
  height: calc(
    var(--clipboard-dimensions-height) - 1px
  ); /* tiro 1 borda aqui tb*/
  text-align: center;
  font-size: 16px;
  font-family: system-ui;
  border-top: 1px solid black;
}

.clipboard .item svg {
  height: calc(
    var(--clipboard-item-height) - var(--clipboard-dimensions-height) - 1px
  ); /* altura, -1 da borda de cima */
}

.clipboard .item .selected {
  background: #ddf;
}

/* TODO: resolver isso aqui, dá bug de scroll! ACHO que o da cor não dá, tem q ver */
img.clipboardclosebutton {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 88px;
  position: absolute;
  z-index: 1;
  cursor: pointer;
}

/*************************************************************************************/
/*************************************************************************************/
/*************************************************************************************/
/*************************************************************************************/
/*************************************************************************************/

svg {
  width: 100%;
  height: 100%;
}

.conta {
  fill: #d9d0d9;
}

.conta:hover {
  stroke: black;
  stroke-width: 1;
  stroke-dasharray: none;
}

.conta-selected {
  stroke-width: 2px;
  stroke-dasharray: 1 2;
  stroke: #000;
  fill: #222;
  opacity: 0.6;
}

.select-rectangle {
  stroke-width: 1px;
  stroke-dasharray: 3;
  stroke: #909090;
}

.invisible,
.disabled-tool {
  display: none;
}

.input-item {
  margin: 0 4px 0 4px;
  display: flex;
  /* background-color: red; */
  align-items: center;
}

.input-item > input {
  height: 24px;
  width: 60px;
  border: 1px solid black;
}

.input-item > span {
  margin: 0 2px 0 2px;
}

.highlighted {
  opacity: 0.35;
}

/******* Janelas modais ********************************************/
#dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

#dialog-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  z-index: 11;
  overflow: auto;
}

#dialog-modal li {
  list-style-type: none;
  /* height: 55px; */
  width: 100%;
  line-height: 50px;
  display: flex;
  padding-bottom: 4px;
}

#dialog-modal li span {
  height: 100%;
  margin: 0 0 0 3px;
}

/* não somos parentes */
.tiny-tool {
  height: 15px;
  width: 15px;
  margin-bottom: 2px;
}

#dialog-modal div.color-square {
  width: 60px;
  height: 60px;
  border: 1px solid black;
}

/******************* Seleção ********************************/
#selectionrect {
  fill: #f0f0f0;
  opacity: 0.5;
  stroke: #000000;
  stroke-width: 1;
  stroke-dasharray: 5;
}

/********** COMENTANDO TUDO ABAIXO PRO FLEX *********************/
/*

div#addcolor {
  opacity: 0.3;
  border: 3px dashed black;
  height: 45px;
  width: 45px;
}

div#addcolor img {
  max-width: 80%;
  max-height: 80%;
  margin: 4px 0 0 4px;
}

.picker {
  border: none;
  border-bottom: 1px solid black;
  background: #cccccc;
  width: 60px;
  height: 60px;
}

#clipboard {
  border: 1px solid black;
  float: left;
  width: 1280px;
  height: 150px;
  margin: 3px 0 0 0;
  overflow: auto;
}

#credits {
  width: 1280px;
  height: 25px;
  overflow: auto;
  text-align: right;
}

#coords {
  float: left;
}

#clipboard .item {
  border: 1px solid black;
  float: left;
  width: 90px;
  height: 120px;
  margin: 3px 0 0 3px;
}

#clipboard .selected {
  background: #ddf;
}

#clipboard .item svg {
  width: 90px;
  height: 90px;
}

#clipboard .item .dimensions {
  height: 21px;
  text-align: center;
  padding: 5px 0 0 0;
  font-size: 14px;
  font-family: system-ui;
}

g #svgline {
  stroke: #000000;
  stroke-width: 1;
}

g #pasteoverlay {
  opacity: 0.7;
  filter: drop-shadow(1px 1px 1px);
}


.voronoi {
  fill: none;
  stroke: #000;
}


*/

/************************ 3d *********************/

/*
canvas {
  position: absolute;
  left: 0px;
}

.container {
  text-align: center;
  width: 1280px;
  height: 600px;
  float: left;
  border: 1px solid black;
}

.sliderdiv {
  padding: 4px 0 0 0;
  display: table-cell;
  vertical-align: middle;
}

.sliderdiv span {
  vertical-align: middle;
}

.sliderdiv input {
  vertical-align: middle;
}

#ballcolordiv {
  padding: 4px 1px 0 0;
  display: table-cell;
  vertical-align: middle;
}

#ballcolordiv input {
  height: 30px;
  margin: -2px 0 0 0;
  vertical-align: middle;
}
*/
