/*!
 * giscus 自定义主题 — lemonade
 * 基于 daisyUI lemonade 主题配色
 * daisyUI lemonade: light color-scheme, 温暖黄绿色调
 */

@font-face {
  font-family: "Manrope";
  src: url("https://cdn.jsdelivr.net/npm/manrope@2.0.0/complete/manrope-regular.woff2")
    format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("https://cdn.jsdelivr.net/npm/manrope@2.0.0/complete/manrope-bold.woff2")
    format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

main {
  /* ========== 字体（与主站 daisyUI --default-font-family 风格一致） ========== */
  font-family:
    "Manrope", "Noto Sans SC Variable", "Noto Sans SC",
    "Noto Sans Sinhala Variable", "Noto Sans Sinhala", ui-sans-serif, system-ui,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";

  font-feature-settings: "halt";

  /* ========== 语法高亮 ========== */
  --color-prettylights-syntax-comment: oklch(55% 0.03 120);
  --color-prettylights-syntax-constant: oklch(45% 0.18 250);
  --color-prettylights-syntax-entity: oklch(50% 0.2 290);
  --color-prettylights-syntax-storage-modifier-import: oklch(25% 0.02 120);
  --color-prettylights-syntax-entity-tag: oklch(45% 0.18 145);
  --color-prettylights-syntax-keyword: oklch(50% 0.22 25);
  --color-prettylights-syntax-string: oklch(40% 0.12 250);
  --color-prettylights-syntax-variable: oklch(50% 0.18 55);
  --color-prettylights-syntax-brackethighlighter-unmatched: oklch(50% 0.22 15);
  --color-prettylights-syntax-invalid-illegal-text: oklch(98% 0.01 120);
  --color-prettylights-syntax-invalid-illegal-bg: oklch(50% 0.22 15);
  --color-prettylights-syntax-carriage-return-text: oklch(98% 0.01 120);
  --color-prettylights-syntax-carriage-return-bg: oklch(50% 0.22 25);
  --color-prettylights-syntax-string-regexp: oklch(45% 0.18 145);
  --color-prettylights-syntax-markup-list: oklch(35% 0.08 80);
  --color-prettylights-syntax-markup-heading: oklch(45% 0.18 250);
  --color-prettylights-syntax-markup-italic: oklch(25% 0.02 120);
  --color-prettylights-syntax-markup-bold: oklch(25% 0.02 120);
  --color-prettylights-syntax-markup-deleted-text: oklch(50% 0.22 15);
  --color-prettylights-syntax-markup-deleted-bg: oklch(95% 0.04 15);
  --color-prettylights-syntax-markup-inserted-text: oklch(45% 0.18 145);
  --color-prettylights-syntax-markup-inserted-bg: oklch(92% 0.06 145);
  --color-prettylights-syntax-markup-changed-text: oklch(50% 0.18 55);
  --color-prettylights-syntax-markup-changed-bg: oklch(94% 0.06 70);
  --color-prettylights-syntax-markup-ignored-text: oklch(90% 0.01 240);
  --color-prettylights-syntax-markup-ignored-bg: oklch(45% 0.18 250);
  --color-prettylights-syntax-meta-diff-range: oklch(50% 0.2 290);
  --color-prettylights-syntax-brackethighlighter-angle: oklch(45% 0.03 120);
  --color-prettylights-syntax-sublimelinter-gutter-mark: oklch(65% 0.03 120);
  --color-prettylights-syntax-constant-other-reference-link: oklch(
    40% 0.12 250
  );

  /* ========== 按钮 ========== */
  --color-btn-text: oklch(19.742% 0.004 123.72);
  --color-btn-bg: oklch(91.8% 0.018 123.72);
  --color-btn-border: oklch(19.742% 0.004 123.72 / 15%);
  --color-btn-shadow: 0 1px 0 oklch(19.742% 0.004 123.72 / 4%);
  --color-btn-inset-shadow: inset 0 1px 0 oklch(100% 0 0 / 25%);
  --color-btn-hover-bg: oklch(88% 0.017 123.72);
  --color-btn-hover-border: oklch(19.742% 0.004 123.72 / 15%);
  --color-btn-active-bg: oklch(84.89% 0.017 123.72);
  --color-btn-active-border: oklch(19.742% 0.004 123.72 / 15%);
  --color-btn-selected-bg: oklch(86% 0.017 123.72);
  /* 主按钮（使用 primary 色） */
  --color-btn-primary-text: oklch(11.784% 0.039 134.6);
  --color-btn-primary-bg: oklch(58.92% 0.199 134.6);
  --color-btn-primary-border: oklch(19.742% 0.004 123.72 / 15%);
  --color-btn-primary-shadow: 0 1px 0 oklch(11.784% 0.039 134.6 / 10%);
  --color-btn-primary-inset-shadow: inset 0 1px 0 oklch(100% 0 0 / 12%);
  --color-btn-primary-hover-bg: oklch(63% 0.199 134.6);
  --color-btn-primary-hover-border: oklch(19.742% 0.004 123.72 / 15%);
  --color-btn-primary-selected-bg: oklch(55% 0.199 134.6);
  --color-btn-primary-selected-shadow: inset 0 1px 0
    oklch(11.784% 0.039 134.6 / 20%);
  --color-btn-primary-disabled-text: oklch(11.784% 0.039 134.6 / 60%);
  --color-btn-primary-disabled-bg: oklch(58.92% 0.199 134.6 / 50%);
  --color-btn-primary-disabled-border: oklch(19.742% 0.004 123.72 / 15%);

  /* ========== 控件/布局 ========== */
  --color-action-list-item-default-hover-bg: oklch(19.742% 0.004 123.72 / 8%);
  --color-segmented-control-bg: oklch(91.8% 0.018 123.72);
  --color-segmented-control-button-bg: oklch(98.71% 0.02 123.72);
  --color-segmented-control-button-selected-border: oklch(65% 0.03 120);

  /* ========== 前景色（文字） ========== */
  --color-fg-default: oklch(19.742% 0.004 123.72);
  --color-fg-muted: oklch(40% 0.01 123.72);
  --color-fg-subtle: oklch(55% 0.015 123.72);

  /* ========== 画布/背景 ========== */
  --color-canvas-default: oklch(98.71% 0.02 123.72);
  --color-canvas-overlay: oklch(98.71% 0.02 123.72);
  --color-canvas-inset: oklch(96.89% 0.017 123.72);
  --color-canvas-subtle: oklch(91.8% 0.018 123.72);

  /* ========== 边框 ========== */
  --color-border-default: oklch(80% 0.016 123.72);
  --color-border-muted: oklch(87% 0.017 123.72);
  --color-neutral-muted: oklch(30.98% 0.075 108.6 / 15%);

  /* ========== 强调色 (accent = primary) ========== */
  --color-accent-fg: oklch(58.92% 0.199 134.6);
  --color-accent-emphasis: oklch(55% 0.199 134.6);
  --color-accent-muted: oklch(58.92% 0.199 134.6 / 35%);
  --color-accent-subtle: oklch(58.92% 0.199 134.6 / 10%);

  /* ========== 语义色 ========== */
  --color-success-fg: oklch(45% 0.18 145);
  --color-attention-fg: oklch(50% 0.18 85);
  --color-attention-muted: oklch(77.75% 0.196 111.09 / 40%);
  --color-attention-subtle: oklch(85.39% 0.201 100.73 / 30%);
  --color-danger-fg: oklch(50% 0.22 25);
  --color-danger-muted: oklch(50% 0.22 25 / 35%);
  --color-danger-subtle: oklch(86.19% 0.047 25.85 / 40%);

  /* ========== 阴影 ========== */
  --color-primer-shadow-inset: inset 0 1px 0 oklch(19.742% 0.004 123.72 / 8%);
  --color-scale-gray-7: oklch(30.98% 0.075 108.6);
  --color-scale-blue-8: oklch(40% 0.12 240);

  /* ========== 社交反馈 ========== */
  --color-social-reaction-bg-hover: var(--color-scale-gray-7);
  --color-social-reaction-bg-reacted-hover: var(--color-scale-blue-8);
}

/* ========== 加载动画 ========== */
main .pagination-loader-container {
  background-image: url("https://github.com/images/modules/pulls/progressive-disclosure-line.svg");
}

main .gsc-loading-image {
  background-image: url("https://github.githubassets.com/images/mona-loading-default.gif");
}
