@charset "utf-8";

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

html {
  box-sizing: border-box;
}

body {
  line-height: 1;
  background: #fff;
  /* 使字体更加顺滑 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

a {
  cursor: pointer;
  /* 取消超链接的默认下划线 */
  text-decoration: none;
}

a,
h1,
h2,
h3,
h4,
h5,
h6,
input,
select,
button,
textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  color: inherit;
  outline: none;
}

/* 清除浮动 */
.clearfix {
  zoom: 1;
}

.clearfix:after {
  content: "";
  display: block;
  height: 0;
  clear: both;
}

body * {
  box-sizing: border-box;
}

input,
button {
  box-sizing: border-box;
  border: 0;
}

svg > path.OfficeIconColors_m24 {
  fill: #1e8bcdff;
}

svg > path.OfficeIconColors_m211 {
  fill: #de6c00ff;
}

svg > path.OfficeIconColors_m212 {
  fill: #f8db8fff;
}

svg > path.OfficeIconColors_m22 {
  fill: #3a3a38ff;
}

svg > path.OfficeIconColors_m20 {
  fill: #fafafaff;
}

svg > path.OfficeIconColors_HighContrast:not([class*="OfficeIconColors_m"]) {
  fill: transparent;
}

svg > path.OfficeIconColors_DynamicColor {
  fill: inherit;
}

.word-container {
  background-color: #f5f5f5;
  height: 100vh;
  font-size: 1em;
  display: flex;
  flex-direction: column;
}

.word-container div::-webkit-scrollbar {
  background: #f5f5f5;
}

::-webkit-scrollbar {
  min-height: 18px;
  min-width: 18px;
  background: #f5f5f5;
}

::-webkit-scrollbar:disabled {
  display: none;
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
  background: transparent;
  cursor: pointer;
  display: none;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece {
  background: transparent;
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
  background-clip: content-box;
  border: 6px solid transparent;
  border-radius: 9px;
}

::-webkit-scrollbar-thumb:active,
::-webkit-scrollbar-thumb:hover {
  border: 5px solid transparent;
}

::-webkit-scrollbar-thumb:vertical {
  min-height: 50px;
}

::-webkit-scrollbar-thumb:horizontal {
  min-width: 50px;
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
  background-color: #797775 !important;
}

::-webkit-scrollbar-thumb:active {
  background-color: #605e5c !important;
}

.navHeader {
  display: flex;
  align-items: center;
  background-color: #185abd;
}

.icon-word {
  margin: 0 1em;
  cursor: pointer;
}

.icon-word svg {
  color: #fff;
}

.nav-title {
  display: flex;
  align-items: center;
  color: #fff;
  cursor: pointer;
}

.nav-title span {
  display: inline-block;
  line-height: 48px;
  font-size: 14px;
}

.nav-title .icon-saved {
  font-style: normal;
  font-size: 0.6em;
  margin-left: 0.8em;
  line-height: 48px;
}

.nav-title .icon-saved svg {
  margin-top: -6px;
}

.tellme-wrap {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  border: 1px solid transparent;
  border-radius: 4px;
  height: 32px;
  background: #fafafa;
  color: #707070;
  fill: rgb(255, 255, 255);
  flex-wrap: nowrap;
  margin: 8px auto;
  line-height: 32px;
  opacity: 0.8;
  user-select: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.14);
  min-width: 360px;
}

.icon-search {
  font-size: 14px;
  margin: 0px 8px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
  color: #616161;
  fill: #616161;
  flex-shrink: 0;
}

#search-box {
  outline: none;
  border: none;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  text-align: left;
  cursor: text;
  border-radius: 0px;
  height: 30px;
  color: #707070;
  fill: rgb(255, 255, 255);
  margin: 0px 4px;
  flex: 1;
}

.icon-settings {
  color: #fff;
  margin: 0 1em;
  cursor: pointer;
}

.word-toolbar {
  display: flex;
  justify-content: space-between;
}

.word-toolbar-nav {
  display: flex;
  padding: 0px 8px;
  padding-top: 2px;
  padding-bottom: 4px;
}

.word-button {
  padding: 0 8px;
  background-color: transparent;
  position: relative;
}

.word-button span {
  display: inline-block;
  color: #424242;
  line-height: 32px;
  padding: 0 4px;
  font-size: 14px;
}

.word-button.active span {
  color: #242424;
  font-weight: 600;
}

.button-wrap:first-child .word-button:hover {
  background-color: #ebebeb;
  border-radius: 4px;
}

.button-wrap:not(:first-child) .word-button:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  border-radius: 4px;
  background-color: #c7c7c7;
  transition: all 0.3s;
}

.button-wrap .word-button.active:hover::after {
  background-color: #185abd;
}

.button-wrap .word-button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  border-radius: 4px;
  background-color: #185abd;
  transition: all 0.3s;
}

.button-wrap .word-button.active:hover::after {
  width: 80%;
}

.word-right-nav {
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.word-share {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  background-color: #185abd;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.word-share:hover {
  background-color: #1652a3;
}

.word-share span {
  margin: 0 4px;
  font-size: 12px;
}

.word-share svg {
  width: 12px;
  height: 12px;
  fill: #fff;
}

.word-share .icon-share svg {
  width: 1em;
  height: 1em;
  font-size: 1em;
}

.word-editor-container {
  padding: 4px 8px;
  background-color: #f5f5f5;
}

.word-editor {
  height: 40px;
  background-color: #fff;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 8px;
  gap: 4px;
}

.editor-section {
  display: flex;
  align-items: center;
  gap: 2px;
}

.editor-divider {
  width: 1px;
  height: 24px;
  background-color: #e0e0e0;
  margin: 0 4px;
}

.editor-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #242424;
  position: relative;
}

.editor-btn:disabled {
  color: #e0e0e0;
  cursor: not-allowed;
}

.editor-btn:disabled svg {
  fill: #e0e0e0;
}

.editor-btn:not(:disabled):hover,
.editor-btn:not(:disabled):focus {
  background-color: #f5f5f5;
}

.editor-btn.active {
  background-color: #e8f0fe;
  color: #242424;
}

.editor-btn.active:hover,
.editor-btn.active:focus {
  background-color: #d2e3fc;
}

.editor-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

.editor-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.editor-btn .icon-dropdown {
  width: 12px;
  height: 12px;
  margin-left: 4px;
}

.icon-highlight {
  color: rgb(255, 255, 0);
  fill: rgb(255, 255, 0);
}

.icon-font-filling {
  color: rgb(217, 226, 243);
  fill: rgb(217, 226, 243);
}

.icon-text-color {
  color: rgb(255, 0, 0);
  fill: rgb(255, 0, 0);
}

/* 下拉菜单样式 */
.editor-dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 32px;
  background-color: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: #242424;
}

.dropdown-btn:hover,
.dropdown-btn:focus {
  background-color: #f5f5f5;
  border-color: #c7c7c7;
}

.dropdown-btn span {
  font-size: 12px;
  white-space: nowrap;
}

.dropdown-btn .icon-dropdown {
  display: flex;
  align-items: center;
}

.dropdown-btn .icon-dropdown svg {
  width: 8px;
  height: 8px;
  fill: #606060;
}

/* 字体选择器宽度 */
.font-family .dropdown-btn {
  min-width: 120px;
}

.font-size .dropdown-btn {
  min-width: 48px;
}

/* 颜色按钮特殊样式 */
.color-btn i {
  position: relative;
}

.color-indicator {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 3px;
  border-radius: 1px;
}

.article-style {
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.article-items {
  display: flex;
  align-items: center;
}

.article-items span {
  display: inline-block;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin: 2px 4px;
  font-size: 12px;
  line-height: 18px;
  padding: 0 10px;
  padding-right: 32px;
}

.article-select {
  display: flex;
  align-items: center;
  padding: 0 2px;
  border-left: 1px solid #e0e0e0;
  height: 24px;
}

.article-select .icon-dropdown svg {
  width: 10px;
  height: 10px;
}

.word-document-area {
  flex: 1;
  overflow-y: auto;
}

.document-area {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.document-container {
  /* A4 大小 */
  width: 794px;
  min-height: 1123px;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  padding: 96px 96px 96px 96px;
  margin: 0 auto;
  font-family: "Calibri", "Microsoft YaHei", sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: #000;
  outline: none;
  position: relative;
}

.document-container:focus {
  outline: none;
}

.status-bar {
  display: flex;
  border-top: 1px solid #e1dfdd;
  background-color: #f3f2f1;
  padding: 0 12px;
  justify-content: space-between;
  align-items: center;
  height: 25px;
  user-select: none;
}

.status-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.status-left span {
  display: inline-block;
  font-size: 12px;
  color: #616161;
}

.status-left > span {
  margin: 0 4px;
}

.status-left .word-separator {
  margin-left: 0;
  margin-right: 10px;
}

.status-left > span span {
  margin: 0 4px;
}

.status-right {
  display: flex;
}

.status-right span {
  display: inline-block;
  font-size: 14px;
  color: #616161;
}

.zoom-controls {
  display: flex;
  align-items: center;
}

.zoom-controls button {
  padding: 4px 0;
  min-width: 40px;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin: 0 4px;
}

.zoom-controls button:hover,
.zoom-controls button:focus {
  background-color: #d2e0f4;
}

.zoom-controls button:active {
  background-color: #ace6eb;
}

.zoom-controls button i {
  display: inline-flex;
  align-items: center;
  line-height: 12px;
  justify-content: center;
  font-size: 20px;
  color: #616161;
}

.zoom-controls button svg {
  width: 12px;
  height: 12px;
  color: #616161;
}

#ZoomToPercentage {
  outline: none;
  height: 4px;
  border-radius: 2px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  --progress: 23%;
  background: linear-gradient(to right, #2461ca var(--progress), #606060 var(--progress));
}

#ZoomToPercentage::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: transparent;
  border-radius: 2px;
}

#ZoomToPercentage::-moz-range-track {
  width: 100%;
  height: 2px;
  background: transparent;
  border-radius: 2px;
}

#ZoomToPercentage::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #2461ca;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
  transition: all 0.2s;
  justify-content: center;
  align-items: center;
}

#ZoomToPercentage::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid #2461ca;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.zoom-percentage {
  padding: 4px 6px;
  min-width: 40px;
  background-color: #f5f5f5;
  margin: 0 4px;
}

.zoom-percentage:hover,
.zoom-percentage:focus,
.fit-button:hover,
.fit-button:focus {
  background-color: #d2e0f4;
  border-radius: 4px;
}

.word-fit {
  display: flex;
  align-items: center;
}

.fit-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: transparent;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s;
  height: 20px;
}

.fit-button i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fit-button svg {
  width: 14px;
  height: 14px;
  fill: #5c5c5c;
}

.fit-button span {
  font-size: 12px;
  color: #5c5c5c;
  white-space: nowrap;
}

/* 下拉菜单样式 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.14);
  width: max-content;
  min-width: 180px;
  display: none;
  z-index: 1000;
  padding: 6px 0;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: #242424;
  font-size: 14px;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.dropdown-item i {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item.disabled {
  color: #999;
  cursor: default;
}

.dropdown-item.disabled:hover {
  background-color: transparent;
}

#history-list .dropdown-item {
  padding-left: 36px;
}

.history-name {
  margin-right: 8px;
}

.history-progress {
  color: #185abd;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 4px 0;
}

/* 文件下拉菜单 */
.file-dropdown {
  position: relative;
}

/* 设置面板样式 */
.settings-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.settings-panel.show {
  right: 0;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.settings-title {
  font-size: 16px;
  font-weight: 600;
  color: #242424;
}

.settings-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.settings-close:hover {
  background-color: #f5f5f5;
}

.settings-close svg {
  width: 16px;
  height: 16px;
  fill: #616161;
}

.settings-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-label {
  font-size: 14px;
  color: #616161;
  margin-bottom: 8px;
  display: block;
}

.settings-options {
  display: flex;
  gap: 8px;
}

.settings-option {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  color: #242424;
  transition: all 0.2s;
}

.settings-option.active {
  background: #185abd;
  color: #fff;
  border-color: #185abd;
}

.settings-option:hover:not(.active) {
  background: #f5f5f5;
}

.settings-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: #185abd;
}

.settings-about {
  font-size: 13px;
  line-height: 1.6;
  color: #616161;
}

.settings-about h4 {
  font-size: 14px;
  font-weight: 600;
  color: #242424;
  margin-bottom: 8px;
}

.settings-about p {
  margin-bottom: 12px;
}

.settings-about kbd {
  padding: 2px 6px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
}

/* 文档分页样式 */
.document-page {
  width: 794px;
  min-height: 1123px;
  max-height: 1123px;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  padding: 96px;
  margin: 0 auto 20px;
  font-family: "Calibri", "Microsoft YaHei", sans-serif;
  font-size: 12pt;
  line-height: 1.5;
  color: #000;
  outline: none;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-page:last-child {
  margin-bottom: 0;
}

.document-page.active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.document-page::after {
  content: var(--page-number);
  left: 100%;
  position: absolute;
  right: auto;
  color: #646464;
  bottom: 5px;
  cursor: default;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 16px;
  display: inline-block;
}

/* 缩放样式 */
.document-wrapper {
  transform-origin: top center;
  transition: transform 0.2s ease;
  --typesetting: left;
  text-align: var(--typesetting);
}

/* 文件输入隐藏 */
.hidden-file-input {
  display: none;
}

/* 保存图标动画 */
.icon-saved {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.icon-saved.show {
  opacity: 1;
}

/* 覆盖层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1999;
  display: none;
}

.overlay.show {
  display: block;
}

@keyframes caretBlink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.fake-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  background: currentColor;
  vertical-align: text-bottom;
  animation: caretBlink 1s steps(1) infinite;
}

/* Toast提示 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
}
