/* 文件分享：工具栏紧凑双按钮 + 旁侧进度条 */
.file-share-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.file-share-inline.is-busy .file-share-chip {
  opacity: 0.5;
  pointer-events: none;
}

.file-share-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 26px;
  padding: 0 10px;
  margin: 0;
  border-radius: 8px;
  border: 1px dashed rgba(120, 150, 190, 0.42);
  background: rgba(12, 18, 28, 0.55);
  cursor: pointer;
  user-select: none;
  /* 放大只用 transform，不改占位宽高，避免挤开邻居造成一闪一闪 */
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

/* 子元素不接拖拽事件，避免 enter/leave 在 span 间反复抖动 */
.file-share-chip > * {
  pointer-events: none;
}

.file-share-chip span {
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.file-share-chip-small span {
  color: rgba(180, 196, 220, 0.72);
}

.file-share-chip-large span {
  color: #d6deeb;
  font-weight: 500;
}

.file-share-chip:hover {
  background: rgba(24, 34, 52, 0.9);
  border-color: rgba(120, 170, 255, 0.55);
}

.file-share-chip-small:hover span {
  color: rgba(210, 222, 240, 0.92);
}

.file-share-chip.is-dragover {
  background: rgba(28, 42, 68, 0.95);
}

.file-share-chip-small.is-dragover {
  border-color: rgba(90, 220, 150, 0.75);
}

.file-share-chip-large.is-dragover {
  border-color: rgba(255, 200, 110, 0.75);
}

.file-share-chip-mega {
  border-style: solid;
  border-color: rgba(180, 130, 255, 0.45);
  background: rgba(28, 18, 42, 0.62);
}

.file-share-chip-mega span {
  color: #d8b8ff;
  font-weight: 600;
}

.file-share-chip-mega:hover {
  border-color: rgba(200, 150, 255, 0.75);
  background: rgba(36, 22, 54, 0.9);
}

.file-share-chip-mega.is-dragover,
.file-share-chip-mega.is-drag-expand {
  border-color: rgba(210, 160, 255, 0.85);
  background: rgba(40, 26, 60, 0.95);
}

.file-share-mega-panel {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.file-share-mega-panel.hidden {
  display: none !important;
}

.file-share-mega-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}

.file-share-mega-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 920px);
  height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(140, 110, 220, 0.35);
  background: rgba(12, 16, 24, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.file-share-mega-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(70, 90, 120, 0.28);
}

.file-share-mega-title {
  font-size: 13px;
  color: #e8d8ff;
  white-space: nowrap;
  flex-shrink: 0;
}

.file-share-mega-live-tip {
  display: block;
  justify-self: center;
  text-align: center;
  max-width: 100%;
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  color: #ff8a8a;
  animation: mega-tip-traffic 5.4s ease-in-out infinite;
}

.file-share-mega-live-tip.is-alert {
  font-weight: 700;
}

@keyframes mega-tip-traffic {
  0%,
  100% {
    color: #ff9a9a;
    opacity: 0.82;
    text-shadow: 0 0 0 transparent;
  }
  33% {
    color: #ffe08a;
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 214, 102, 0.18);
  }
  66% {
    color: #8dffb0;
    opacity: 0.95;
    text-shadow: 0 0 8px rgba(110, 220, 150, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .file-share-mega-live-tip,
  .file-share-mega-live-tip.is-alert {
    animation: none;
    opacity: 1;
    color: #ffe08a;
  }
}

.file-share-mega-head-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.file-share-mega-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0a0e14;
  min-height: 360px;
}

.file-share-mega-foot {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(70, 90, 120, 0.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 14, 22, 0.96);
  flex-shrink: 0;
}

.file-share-mega-friend-inline {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
  color: #c4b4e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
}

.file-share-mega-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
}

.file-share-mega-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.file-share-mega-label-row > span:first-child {
  font-size: 11px;
  color: #9bb0cc;
  flex-shrink: 0;
}

.file-share-mega-hint {
  font-size: 10px;
  color: #7a8aa0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

.file-share-mega-paste {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(120, 150, 190, 0.35);
  background: rgba(8, 12, 18, 0.9);
  color: #e8edf5;
  font-family: inherit;
  font-size: 12px;
}

.file-share-mega-status {
  min-height: 16px;
  font-size: 11px;
  line-height: 1.35;
  color: #9bb0cc;
}

.file-share-mega-status.is-error {
  color: #ffb4b4;
}

.file-share-mega-status.hidden {
  display: none;
}

.btn-primary-lite {
  border: 1px solid rgba(120, 170, 255, 0.45);
  background: rgba(24, 34, 52, 0.9);
  color: #b8d4ff;
  flex-shrink: 0;
}

.note-file-badge.mega,
.note-file-badge-mega {
  background: rgba(180, 130, 255, 0.18);
  color: #d8b8ff;
  border-color: rgba(180, 130, 255, 0.4);
}

.note-file-badge.image,
.note-file-badge-image {
  background: rgba(88, 180, 255, 0.16);
  color: #9ad0ff;
  border-color: rgba(88, 180, 255, 0.42);
}

.note-card-local-snap .note-file-title {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.file-share-progress.is-mega .file-share-progress-card {
  border-color: rgba(180, 130, 255, 0.42);
}

.file-share-chip.is-drag-expand {
  z-index: 40;
  transform: scale(2.35);
  transform-origin: center center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.48);
  border-style: solid;
}

.file-share-chip.is-drag-expand span {
  font-weight: 600;
  color: #eef4ff;
}

.file-share-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.note-card-file .note-toggle {
  display: none !important;
}

.note-card-file .note-file-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.note-file-badge {
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(90, 200, 140, 0.18);
  color: #8dffb0;
  border: 1px solid rgba(90, 200, 140, 0.35);
}

.note-file-badge.temp {
  background: rgba(255, 180, 90, 0.15);
  color: #ffc878;
  border-color: rgba(255, 180, 90, 0.35);
}

.note-card-file .note-card-row {
  position: relative;
}

.note-card-file .note-file-hover-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) translateY(2px);
  z-index: 6;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(200, 214, 236, 0.92);
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid rgba(120, 150, 190, 0.22);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.note-card-file .note-file-hover-hint.is-visible {
  opacity: 1;
  transform: translateY(-50%);
}

.note-file-title {
  position: relative;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-share-progress {
  flex: 0 0 auto;
  min-width: 148px;
  max-width: 200px;
}

.file-share-progress.is-temp,
.file-share-progress.is-slow {
  min-width: 248px;
  max-width: 280px;
}

.file-share-progress.hidden {
  display: none;
}

.file-share-progress-card {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(16, 22, 34, 0.96);
  border: 1px solid rgba(120, 170, 255, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.file-share-progress.is-temp .file-share-progress-card {
  border-color: rgba(255, 190, 110, 0.35);
}

.file-share-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.file-share-progress-head-left {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.file-share-progress-bot {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  animation: file-share-bot-run 0.55s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 4px rgba(120, 170, 255, 0.35));
}

.file-share-progress-bot.hidden {
  display: none;
}

@keyframes file-share-bot-run {
  from {
    transform: translateX(0) rotate(-8deg);
  }
  to {
    transform: translateX(4px) rotate(8deg);
  }
}

.file-share-progress-title {
  font-size: 11px;
  color: #b8c6dc;
  white-space: nowrap;
}

.file-share-progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: #e8f0ff;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.file-share-progress-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.file-share-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ea1ff, #8dffb0);
  transition: width 0.12s linear;
}

.file-share-progress.is-temp .file-share-progress-fill {
  background: linear-gradient(90deg, #ffb347, #8dffb0);
}

.file-share-progress-tips {
  margin-top: 6px;
  overflow: hidden;
}

.file-share-progress-tips.hidden {
  display: none;
}

.file-share-progress-tip-viewport {
  height: 16px;
  overflow: hidden;
  position: relative;
}

.file-share-progress-tip-text {
  font-size: 10px;
  line-height: 16px;
  color: rgba(184, 198, 220, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.file-share-progress-tip-text.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.file-share-progress-tip-text.is-entering {
  opacity: 0;
  transform: translateY(6px);
}
