/**
 * docsify-fontsize-plugin 像素风样式
 * 与 Script Graph 项目整体风格统一
 */

/* 字体大小控制容器 */
.pixel-fontsize-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  font-family: 'Ark Pixel 12px', 'Ark Pixel 12px Latin', 'Courier New', monospace;

  /* 像素化渲染 */
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;

  /* 禁用字体平滑 */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

/* 字体大小按钮 */
.pixel-fontsize-btn {
  width: 20px;
  height: 20px;
  background: transparent;
  border: 1px solid rgba(96, 96, 96, 0.8);
  color: rgba(160, 160, 160);
  font-size: 0.6rem;
  font-weight: normal;
  font-family: 'Ark Pixel 12px', 'Ark Pixel 12px Latin', 'Courier New', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: none;
  position: relative;
  cursor: url('images/cusor-pointer.png'), pointer;
  padding: 0;
  line-height: 1;
}

.pixel-fontsize-btn:hover {
  background: rgba(253, 230, 138, 0.2);
  border-color: rgba(253, 230, 138, 0.8);
  color: rgba(253, 230, 138);
}

.pixel-fontsize-btn:active {
  background: rgba(253, 230, 138, 0.3);
}

.pixel-fontsize-btn:disabled {
  opacity: 0.2;
  cursor: url('images/cusor.png'), auto;
  pointer-events: none;
}

/* 字体大小显示 */
.pixel-fontsize-display {
  background: transparent;
  border: 1px solid rgba(253, 230, 138, 0.8);
  color: rgba(253, 230, 138);
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: normal;
  box-shadow: none;
  min-width: 40px;
  text-align: center;
  text-shadow: none;
  cursor: url('images/cusor.png'), auto;
}



/* 响应式调整 */
@media (max-width: 768px) {
  .pixel-fontsize-control {
    gap: 3px;
    margin-bottom: 0.8rem;
  }

  .pixel-fontsize-btn {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
  }

  .pixel-fontsize-display {
    padding: 2px 5px;
    font-size: 0.55rem;
    min-width: 36px;
  }
}

/* 入场动画 */
@keyframes fontSizeControlFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.pixel-fontsize-control {
  animation: fontSizeControlFadeIn 0.6s ease-out;
}