/*! laoguanTX bundle: article-enhancements-post-no-code */
/* source: components/gfm-alerts.css */
/* ========================================
 * GFM Alert Blocks — [!NOTE] / [!WARNING] / etc.
 * 配对: js/gfm-alerts.js
 * 浅色卡片、胶囊标题与装饰性 Emoji 水印，参考 Phycat。
 * ======================================== */

.gfm-alert {
  --alert-tint: #6c5ce7;
  --alert-accent: #6c5ce7;
  --alert-bg-strength: 9%;
  --alert-bg-hover-strength: 12%;
  --alert-badge-bg: color-mix(in srgb, var(--color-bg-secondary) 78%, transparent);
  --alert-hover-shadow: 0 4px 14px rgb(0 0 0 / 5%);
  position: relative;
  isolation: isolate;
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: color-mix(in srgb, var(--color-bg-secondary), var(--alert-tint) var(--alert-bg-strength));
  color: var(--color-text-secondary);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

/* 取消普通引用继承的左侧色条。 */
.gfm-alert::before {
  content: none;
}

/* --- Capsule Header --- */
.gfm-alert-header {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--alert-badge-bg);
  box-shadow: 0 1px 3px rgb(0 0 0 / 3%);
  color: var(--alert-accent);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.gfm-alert-icon {
  font-size: 1.05em;
  flex-shrink: 0;
}

.gfm-alert-title {
  font-weight: var(--font-semibold);
}

/* --- Content & Decorative Watermark --- */
.gfm-alert-body {
  position: relative;
  z-index: 1;
}

.gfm-alert-body p {
  margin: 0 0 var(--space-3);
}

.gfm-alert-body > :first-child {
  margin-top: 0;
}

.gfm-alert-body > :last-child {
  margin-bottom: 0;
}

.gfm-alert-watermark {
  position: absolute;
  right: -6px;
  bottom: -10px;
  z-index: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 64px;
  line-height: 1;
  opacity: 0.09;
  transform: rotate(-12deg);
  pointer-events: none;
  user-select: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

/* --- Type Colors: Note 紫 / Tip 青绿 / Important 珊瑚 / Warning 琥珀 / Caution 红 --- */
.gfm-alert--tip {
  --alert-tint: #00b894;
  --alert-accent: #087f68;
}

.gfm-alert--important {
  --alert-tint: #ff7675;
  --alert-accent: #b44850;
}

.gfm-alert--warning {
  --alert-tint: #fdcb6e;
  --alert-accent: #a85619;
}

.gfm-alert--caution {
  --alert-tint: #d63031;
  --alert-accent: #bc2931;
}

/* --- Dark Mode --- */
[data-theme="dark"] .gfm-alert {
  --alert-bg-strength: 14%;
  --alert-bg-hover-strength: 17%;
  --alert-badge-bg: color-mix(in srgb, var(--color-bg-secondary) 72%, transparent);
  --alert-hover-shadow: 0 4px 14px rgb(0 0 0 / 16%);
  --alert-accent: #b9acff;
}

[data-theme="dark"] .gfm-alert--tip {
  --alert-accent: #65d9ba;
}

[data-theme="dark"] .gfm-alert--important {
  --alert-accent: #ffaaaa;
}

[data-theme="dark"] .gfm-alert--warning {
  --alert-accent: #f3cf82;
}

[data-theme="dark"] .gfm-alert--caution {
  --alert-accent: #ff9898;
}

/* 仅在精确指针设备上轻微上浮，不放大正文。 */
@media (hover: hover) and (pointer: fine) {
  .gfm-alert:hover {
    transform: translateY(-1px);
    box-shadow: var(--alert-hover-shadow);
    background-color: color-mix(in srgb, var(--color-bg-secondary), var(--alert-tint) var(--alert-bg-hover-strength));
  }

  .gfm-alert:hover > .gfm-alert-watermark {
    opacity: 0.13;
    transform: rotate(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gfm-alert,
  .gfm-alert-watermark {
    transition: none;
  }

  .gfm-alert:hover {
    transform: none;
  }

  .gfm-alert:hover > .gfm-alert-watermark {
    transform: rotate(-12deg);
  }
}

/* source: components/view-image.css */
/* ========================================
 * ViewImage — 图片灯箱主题样式覆盖
 * 配对: js/view-image.min.js + js/view-image-init.js
 *
 * 亮色模式：白色毛玻璃工具栏 + 暗色图标/文字
 * 暗色模式：暗色毛玻璃工具栏 + 白色图标/文字
 * ======================================== */

/* ========================================
 * Overlay
 * ======================================== */
.view-image.view-image {
  z-index: 1001 !important;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* 暗色模式 */
[data-theme="dark"] .view-image.view-image {
  background-color: rgba(0, 0, 0, 0.82);
}

/* ========================================
 * Toolbar — 底部工具栏
 * ======================================== */

/* 亮色（默认）：白色毛玻璃 + 暗色文字 */
.view-image .view-image-tools {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 8px var(--space-4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  max-width: 520px;
  color: var(--color-text-secondary);
}

/* 暗色：暗色毛玻璃 + 白色文字 */
[data-theme="dark"] .view-image .view-image-tools {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
 * 按钮
 * ======================================== */

/* 亮色（默认） */
.view-image .view-image-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.07);
  transition: background var(--transition-fast) var(--ease-in-out),
              transform var(--transition-fast) var(--ease-in-out),
              box-shadow var(--transition-fast) var(--ease-in-out);
}

.view-image .view-image-btn:hover {
  background: var(--color-primary);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

/* 亮色 SVG 图标：白色源 → 深灰（约 #333） */
.view-image .view-image-btn svg {
  filter: brightness(0.2);
  transition: filter var(--transition-fast);
}

.view-image .view-image-btn:hover svg {
  filter: brightness(10);
}

/* 暗色 */
[data-theme="dark"] .view-image .view-image-btn {
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .view-image .view-image-btn svg {
  filter: none;
}
[data-theme="dark"] .view-image .view-image-btn:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 35%, transparent);
}
[data-theme="dark"] .view-image .view-image-btn:hover svg {
  filter: brightness(10);
}

/* ========================================
 * 计数文字
 * ======================================== */
.view-image .view-image-tools__count {
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: inherit;
}

/* ========================================
 * 图片容器
 * ======================================== */
.view-image .view-image-lead img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* ========================================
 * 加载动画
 * ======================================== */
.view-image .view-image-loading::after {
  background: var(--color-primary);
}

/* ========================================
 * 关闭全屏区域
 * ======================================== */
.view-image .view-image-close__full {
  background-color: transparent;
}

/* ========================================
 * 动画
 * ======================================== */
.view-image.view-image {
  animation: view-image-in var(--transition-slow) var(--ease-out);
}

.view-image__out.view-image__out {
  animation: view-image-out var(--transition-base) var(--ease-in-out) forwards;
}

/* ========================================
 * 响应式：移动端
 * ======================================== */
@media (max-width: 767px) {
  .view-image .view-image-tools {
    left: var(--space-4);
    right: var(--space-4);
    bottom: 3%;
    border-radius: var(--radius-md);
    padding: 6px var(--space-3);
  }

  .view-image .view-image-btn {
    width: 34px;
    height: 34px;
  }

  .view-image.view-image {
    padding: 0.5rem;
  }
}
