@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Lexend', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

body {
  color: rgba(255, 255, 255, 0.87);
  background-color: #2b2b2b;
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: auto;
}

#pixi-container {
  cursor: none;
}

#tools {
  position: fixed;
  left: 8px;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #3c3c3c;
  padding: 6px;
  border-radius: 4px;
  z-index: 10;
}

.tool {
  border: none;
  background-color: #323232;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 40px;
  width: 40px;
  user-select: none;
}

.tool.active,
.tool:hover {
  background-color: #222;
}

.tool img,
.tool input {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  user-select: none;
}

.tool input {
  width: 100%;
  height: 100%;
  border-radius: 100%;
  outline: none;
  cursor: pointer;
}

.tool-color {
  padding: 4px;
}

#layers {
  position: fixed;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #3c3c3c;
  padding: 6px;
  border-radius: 4px;
}

.layers-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.layers-nav .tool {
  width: 24px;
  height: 24px;
}

.layers-nav .tool img {
  width: 20px;
  height: 20px;
}

.layer-info {
  display: flex;
  flex-direction: column;
  max-width: calc(200px - 32px - 20px - 16px);
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-item {
  display: flex;
  gap: 8px;
  width: 200px;
  background-color: #323232;
  padding: 4px 6px;
  border-radius: 4px;
  align-items: center;
  opacity: 0.8;
  cursor: not-allowed;
}

.layer-item.owned {
  cursor: pointer;
  opacity: 1;
}

.layer-item.active {
  background-color: #2b2b2b;
}

.layer-preview {
  width: 32px;
  height: 32px;
  /* tmporary placeholder */
  background-color: #222;
  flex-shrink: 0;
}

.layer-owner {
  font-size: 0.7rem;
}

.layer-name {
  font-size: 1rem;
}

.layer-owner,
.layer-name {
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
  overflow: hidden;
}

.layer-delete {
  width: 16px;
  height: 16px;
  margin-left: auto;
}

.layer-delete:hover {
  opacity: 0.75;
  z-index: 2;
}

/* --- BRUSH SETTINGS --- */

.hidden {
  display: none;
}

#brush-settings {
  position: fixed;
  left: 62px;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #3c3c3c;
  padding: 10px;
  border-radius: 4px;
  width: 220px;
}

.brush-settings-title {
  font-size: 1rem;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid #555;
}

.setting {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.setting-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-checkbox label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  user-select: none;
  cursor: pointer;
}

.brush-list-title {
  font-size: 0.9rem;
  margin-top: 8px;
}

.brush-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}

.brush-item {
  border: none;
  background-color: #323232;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 40px;
  width: 100%;
  user-select: none;
}

.brush-item.active,
.brush-item:hover {
  background-color: #222;
}

.brush-item img {
  width: 24px;
  height: 24px;
}
