/* 让 select 继承主题主色 */
.mdex-select {
  --md-select-border: var(--md-primary-fg-color);
  --md-select-bg: var(--md-default-bg-color);
  --md-select-radius: 4px;
  position: relative;
  display: inline-block;
  font-size: 0.8rem;
  min-width: 100px;
}

.mdex-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.5em 2em 0.5em 0.75em;
  border: 1px solid var(--md-select-border);
  border-radius: var(--md-select-radius);
  background: var(--md-select-bg)
              url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M7 10l5 5 5-5z"/></svg>') right 0.5em center/1.5em no-repeat;
  cursor: pointer;
}

/* 深色模式适配 */
[data-md-color-scheme="slate"] .mdex-select select {
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
}

/* Cusdis 嵌入块高度自适应 */
#cusdis_thread {
  min-height: 310px;        /* 首次加载时先给一个足够空间，避免抖动 */
}
#cusdis_thread iframe {
  height: auto !important;  /* 覆盖 Cusdis 写死的 180 px */
  min-height: 310px;
  width: 100%;
  border: 0;
}
