/* My Downloads list and the download info box – colours follow the theme (currentColor, --mods-accent) */
.dmkrtz-my-downloads { --dmd-accent: var(--mods-accent, #3b82f6); --dmd-ok: #22c55e; --dmd-warn: #f59e0b; --dmd-line: rgba(127, 127, 127, .28); --dmd-soft: rgba(127, 127, 127, .1);
	display: flex; flex-direction: column; gap: 14px; margin: 0 auto; max-width: 960px; }
.dmkrtz-my-downloads a { text-decoration: none; }
.dmd-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; opacity: .85; }
.dmd-summary .dmd-has-updates b { color: var(--dmd-warn); }

.dmd-filter { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--dmd-line); border-radius: 10px; width: max-content; max-width: 100%; }
.dmd-filter a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 7px; color: inherit; font-weight: 600; white-space: nowrap; }
.dmd-filter a span { min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--dmd-soft); font-size: .8em; text-align: center; }
.dmd-filter a:hover { background: var(--dmd-soft); }
.dmd-filter a.is-active { background: var(--dmd-accent); color: #fff; }
.dmd-filter a.is-active span { background: rgba(255, 255, 255, .25); }

.dmd-empty, .dmd-login { padding: 28px 16px; border: 1px dashed var(--dmd-line); border-radius: 12px; text-align: center; margin: 0; }
.dmd-empty .fa-circle-check { color: var(--dmd-ok); }
.dmd-login p { margin: 0 0 14px; }

.dmd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dmd-item { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 16px 10px 10px;
	background: rgba(0, 0, 0, .22); border: 1px solid var(--dmd-line); border-left: 4px solid var(--dmd-ok); border-radius: 12px; }
.dmd-item.no-thumb { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
.dmd-item.is-outdated { border-left-color: var(--dmd-warn); }
.dmd-item.is-removed { border-left-color: var(--dmd-line); opacity: .7; }
.dmd-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--dmd-soft); }
.dmd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dmd-body { min-width: 0; }
.dmd-body h3 { margin: 0 0 4px; font-size: 1.05em; line-height: 1.3; overflow-wrap: anywhere; }
.dmd-body h3 a { color: inherit; }
.dmd-body h3 a:hover { color: var(--dmd-accent); }
.dmd-body p { margin: 0; }
.dmd-meta { font-size: .85em; opacity: .7; }
.dmd-status { margin-top: 6px !important; font-size: .9em; font-weight: 600; }
.dmd-status.is-ok { color: var(--dmd-ok); }
.dmd-status.is-old { color: var(--dmd-warn); }
.dmd-reason { margin-top: 6px !important; padding: 6px 10px; border-radius: 6px; background: var(--dmd-soft); font-size: .85em; white-space: pre-line; max-height: 6.5em; overflow: auto; }

.dmd-btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--dmd-line); border-radius: 8px; color: inherit !important; font-weight: 600; white-space: nowrap; text-align: center; }
.dmd-btn:hover { border-color: var(--dmd-accent); }
.dmd-btn.is-primary, .dmd-login .dmd-btn { background: var(--dmd-accent); border-color: var(--dmd-accent); color: #fff !important; }
.dmd-pager { display: flex; gap: 12px; align-items: center; justify-content: center; }

@media (max-width: 640px) {
	.dmd-item { grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; padding: 10px; align-items: start; }
	.dmd-item.no-thumb { grid-template-columns: minmax(0, 1fr); }
	.dmd-item > .dmd-btn { grid-column: 1 / -1; margin-top: 6px; }
	.dmd-filter { width: 100%; }
	.dmd-filter a { flex: 1; justify-content: center; padding: 7px 8px; }
}

/* download info box on a mod */
.dmd-info { --dmd-warn: #f59e0b; display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.dmd-info p { margin: 0; }
.dmd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.dmd-stat { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: rgba(255, 255, 255, .03); text-align: left; }
.dmd-stat-ic { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--mods-accent, #f07c00) 16%, transparent); color: var(--mods-accent, #f07c00); font-size: 15px; }
.dmd-stat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dmd-stat-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #9a9a9a; }
.dmd-stat-value { font-size: 15px; color: #eee; }
.dmd-stat-value b { font-size: 18px; color: #fff; }
.dmd-stat-value small { color: #9a9a9a; }
.dmd-stat-act { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: #a8a8a8 !important; text-decoration: none !important; transition: color .15s, border-color .15s, background .15s; }
.dmd-stat-act:hover, .dmd-stat-act:focus-visible { color: #fff !important; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.05); }
/* moderator-only action: small purple dot, same marker as the mod tools bar */
.dmd-stat-act--mod::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; }
.dmd-stat-act--mod:hover, .dmd-stat-act--mod:focus-visible { border-color: #e5484d; background: rgba(229,72,77,.12); }
.dmd-info-update { margin-top: 4px !important; padding: 8px 12px; border-left: 3px solid var(--dmd-warn); border-radius: 6px; background: rgba(245, 158, 11, .1); }
.dmd-info-update .fa-circle-exclamation { color: var(--dmd-warn); }
.dmd-info .dmd-reason { display: block; margin-top: 4px; font-size: .9em; white-space: pre-line; opacity: .9; }

/* count of one download link (tracker.js puts it in front of the link) */
.dmkrtz-link-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #9a9a9a; white-space: nowrap; }
.dmkrtz-link-count::before { content: "\2193"; color: var(--mods-accent, #f07c00); font-weight: 800; }
