/* Word 97 workspace */
.word-workspace {
  height: calc(100dvh - 28px);
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  box-sizing: border-box;
}

/* Word window chrome */
.word-window {
  width: 816px;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 0 #000;
}

.word-titlebar {
  background: #000080;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.word-titlebar-icon {
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid #000;
  flex-shrink: 0;
}

.word-titlebar-title {
  flex: 1;
}

.word-titlebar-buttons {
  display: flex;
  gap: 2px;
}

.word-titlebar-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  font-size: 9px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #000;
}

.word-menubar {
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  font-family: Arial, sans-serif;
  font-size: 11px;
  padding: 2px 4px;
  display: flex;
  gap: 2px;
  user-select: none;
}

.word-menubar span {
  padding: 1px 6px;
  cursor: default;
}

.word-menubar span:hover {
  background: #000080;
  color: #fff;
}

/* The paper */
.paper {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  background: #fff;
  border: 1px solid #808080;
  padding: 32px 48px;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
  font-size: 12pt;
  line-height: 1.6;
  color: #000;
  outline: none;
  cursor: text;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.paper:empty::before {
  content: attr(data-placeholder);
  color: #aaa;
  pointer-events: none;
}

@media (width <= 600px) {
  .word-workspace {
    padding: 0.5rem;
  }

  .paper {
    padding: 32px 24px;
  }
}
