/*!
 * auok-cloud-card.css — 网盘按钮前台样式
 * 正文标签仍是 <joe-cloud>，由本插件接管渲染，不依赖主题 CSS。
 * 默认强调色 #1F6F8B。
 */

.acc-card {
  --acc-a: var(--acc-accent, #1f6f8b);
  --acc-r: var(--acc-radius, 10px);
  --acc-b: var(--acc-btn, 30px);
  --acc-bg: #ffffff;
  --acc-fg: #1f2328;
  --acc-fg-2: #57606a;
  --acc-border: color-mix(in srgb, var(--acc-a) 24%, #d9dfe7);
  --acc-fill: color-mix(in srgb, var(--acc-a) 8%, #f4f6f9);
  --acc-ink: #ffffff;

  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1em 0;
  padding: 12px 14px;
  width: 100%;
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-r);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc-a) 6%, var(--acc-bg)), var(--acc-bg) 42%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 20px -14px rgba(16, 24, 40, 0.18);
  color: var(--acc-fg);
  line-height: 1.4;
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .acc-card {
    --acc-bg: #0d1117;
    --acc-fg: #e6edf3;
    --acc-fg-2: #a8b1bb;
    --acc-border: color-mix(in srgb, var(--acc-a) 36%, #323a45);
    --acc-fill: color-mix(in srgb, var(--acc-a) 16%, #141a22);
  }
}

html.dark .acc-card,
html[data-theme="dark"] .acc-card,
body.dark .acc-card,
.dark .acc-card {
  --acc-bg: #0d1117;
  --acc-fg: #e6edf3;
  --acc-fg-2: #a8b1bb;
  --acc-border: color-mix(in srgb, var(--acc-a) 36%, #323a45);
  --acc-fill: color-mix(in srgb, var(--acc-a) 16%, #141a22);
}

.acc-card *,
.acc-card *::before,
.acc-card *::after {
  box-sizing: border-box;
}

.acc-card__logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: max(6px, calc(var(--acc-r) - 4px));
  background: var(--acc-fill) center / 26px 26px no-repeat;
}

.acc-card__logo[data-acc-logo="url"] {
  background-size: cover;
}

.acc-card__logo[data-acc-logo="default"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%236b7280'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E7%9B%98%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="bd"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%232932e1'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E5%BA%A6%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="ad"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%23ff6a00'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E9%98%BF%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="ty"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%233aa0ff'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E5%A4%A9%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="360"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%2300b24a'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3E360%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="wy"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%2312b7f5'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E5%BE%AE%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="ct"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%23f5a623'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E5%9F%8E%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="lz"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%232f6bff'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E8%93%9D%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="github"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%2324292f'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3EGH%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="gitee"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%23c71d23'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E7%A0%81%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="quark"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%235b4bff'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E5%A4%B8%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="123"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%231aa7ec'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='11' font-weight='700' fill='%23fff'%3E123%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="onedrive"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%23094ab2'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3EOD%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="dropbox"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%230061ff'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3EDB%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="mediafire"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%231d4ed8'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3EMF%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="mega"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%23d9272e'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='13' font-weight='700' fill='%23fff'%3EME%3C/text%3E%3C/svg%3E"); }
.acc-card__logo[data-acc-logo="local"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='8' fill='%231f6f8b'/%3E%3Ctext x='18' y='23' text-anchor='middle' font-family='system-ui,sans-serif' font-size='16' font-weight='700' fill='%23fff'%3E%E7%9B%B4%3C/text%3E%3C/svg%3E"); }

.acc-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.acc-card__title {
  display: block;
  overflow: hidden;
  font-weight: 650;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.acc-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 2px;
  color: var(--acc-fg-2);
  font-size: 12.5px;
}

.acc-card__code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.acc-card__code code {
  padding: 0 5px;
  border-radius: 4px;
  background: var(--acc-fill);
  color: var(--acc-fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.acc-card__copy {
  appearance: none;
  margin: 0;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--acc-a) 40%, transparent);
  border-radius: 4px;
  background: transparent;
  color: var(--acc-a);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}

.acc-card__copy:hover {
  background: var(--acc-fill);
}

.acc-card__copy.is-ok {
  border-color: var(--acc-a);
  background: var(--acc-a);
  color: var(--acc-ink);
}

.acc-card__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: var(--acc-b, 30px);
  height: var(--acc-b, 30px);
  border-radius: 50%;
  background: var(--acc-a);
  color: var(--acc-ink);
  text-decoration: none;
}

.acc-card__btn:hover {
  filter: brightness(1.08);
}

.acc-card__btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acc-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--acc-accent, #1f6f8b);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.2);
}
