.titlebar {
  padding: 0;
  background-color: #3a3a3af6;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  width: 100%;
  height: 28px;
  z-index: 10;
  order: 1;
  user-select: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.titlebar-stoplight {
  cursor: default;
  display: inline-grid;
  grid-template-columns: 1fr 1fr 1fr;
  place-items: center;
  position: absolute;
  width: 70px;
  float: left;
}

.titlebar:after,
.titlebar-stoplight:after {
  content: " ";
  display: table;
  clear: both;
}

.titlebar-stoplight:hover svg {
  opacity: 1;
}

.titlebar-close,
.titlebar-minimize,
.titlebar-fullscreen {
  border-radius: 50%;
  line-height: 0;
  padding: 2px;
}

.titlebar svg {
  width: 8px;
  height: 8px;
  margin: auto;
  opacity: 0;
}

.titlebar-close {
  border: 1px solid #e2463f;
  background-color: #ff5f57;
}

.titlebar-close:active {
  border-color: #ad3934;
  background-color: #bf4943;
}

.titlebar-minimize {
  border: 1px solid #e1a116;
  background-color: #ffbd2e;
}

.titlebar-minimize:active {
  border-color: #ad7d15;
  background-color: #bf9123;
}

.titlebar-fullscreen,
.titlebar-maximize {
  border: 1px solid #12ac28;
  background-color: #28c940;
}

.titlebar-fullscreen:active {
  border-color: #128622;
  background-color: #1f9a31;
}

.titlebar-spotlight {
  background: #1e1e1e;
  color: #e0e0e0;
  border-radius: 5px;
  height: 70%;
  width: 30%;
  margin: 0 auto;
  text-align: center;
  display: inline-grid;
  place-items: center;
  grid-template-areas: "label";
  grid-template-rows: 100%;
}

.titlebar-spotlight .label {
  font-size: 10px;
  width: 30%;
  transition: visibility 0s, opacity 0.4s ease-in-out;
  visibility: visible;
  position: absolute;
  z-index: 10;
  margin: 5px;
  text-overflow: clip;
  overflow: hidden;
  white-space: nowrap;
  grid-area: label;
}

.titlebar-settings {
  float: right;
  display: grid;
  margin-right: 0.2em;

  img {
    opacity: 0.4;
    transition: all 0.5s ease-in-out;

    &:hover {
      filter: invert(0.4);
      opacity: 0.7;
    }
  }

  &:hover {
    cursor: pointer;
  }
}

.postInfo {
  background-color: #3586ff;
  color: #dadada;
}

.postError {
  background-color: #ff4c7c;
  color: #dadada;
}

.labelHidden {
  visibility: hidden;
  opacity: 0;
}
