/* The dark top bar: logo, clip menu, tools, background picker, zoom. */
/* ---------- top bar ---------- */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 16px;
  min-height: 48px;
  padding-block: 6px;
  padding-left: var(--gl);
  padding-right: var(--gr);
  background: var(--bar);
  color: var(--bar-text);
}
.tb-left,
.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tb-right {
  justify-content: flex-end;
}
.logo {
  width: 24px;
  height: 24px;
  flex: none;
}
.clipname {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 34ch;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bar-text);
  font-size: 13px;
  font-weight: 500;
}
.clipname:hover,
.clipname[aria-expanded='true'] {
  background: var(--bar-2);
}
.fwrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
}
.fchev {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--bar-dim);
  margin-left: -2px;
}
.menu.filemenu {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 250px;
}
.filemenu button {
  white-space: nowrap;
}
.filemenu .keys,
.filemenu > button > kbd {
  margin-left: auto;
}
.keys {
  display: inline-flex;
  gap: 3px;
}
.clipname span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bar-3);
  color: var(--bar-dim);
}
.tb-center {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tbi {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bar-dim);
  transition:
    background 0.12s,
    color 0.12s;
}
.tbi:hover {
  background: var(--bar-2);
  color: var(--bar-text);
}
.tbi[aria-pressed='true'] {
  background: var(--bar-3);
  color: #fff;
}
.tbi svg.i {
  width: 18px;
  height: 18px;
}
.tsep {
  width: 1px;
  height: 18px;
  background: var(--bar-3);
  margin: 0 6px;
}
.zwrap {
  position: relative;
  display: inline-flex;
}
.zl {
  height: 32px;
  min-width: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 6px 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bar-text);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.zl:hover,
.zl[aria-expanded='true'] {
  background: var(--bar-2);
}
.zchev {
  width: 14px;
  height: 14px;
  color: var(--bar-dim);
}
.zmenu {
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
}
.zmenu button {
  justify-content: space-between;
}

.tb-ghost {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--bar-text);
  font-size: 12.5px;
  font-weight: 500;
}
.tb-ghost:hover {
  background: var(--bar-2);
}
.tb-ghost svg.i {
  width: 16px;
  height: 16px;
}
.tb-export {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12.5px;
  font-weight: 600;
}
.tb-export:hover {
  background: var(--accent-2);
}
.tb-export svg.i {
  width: 16px;
  height: 16px;
}
