/* Download.chat — smart-download overlay (branded, on-site download modal). */

body.dc-sd-open { overflow: hidden; }

.dc-sd-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(6, 3, 16, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: dc-sd-fade 0.16s ease;
}
@keyframes dc-sd-fade { from { opacity: 0; } to { opacity: 1; } }

.dc-sd {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: linear-gradient(165deg, var(--dc-surface-2, #1a1030), var(--dc-surface, #140b28));
	border: 1px solid var(--dc-border);
	border-radius: var(--dc-radius-lg, 18px);
	box-shadow: var(--dc-shadow, 0 24px 60px rgba(0, 0, 0, 0.5)), var(--dc-shadow-glow, 0 0 60px rgba(109, 59, 245, 0.18));
	padding: 26px 24px 22px;
	color: var(--dc-text);
	animation: dc-sd-pop 0.18s ease;
}
@keyframes dc-sd-pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

.dc-sd__x {
	position: absolute;
	top: 12px; right: 12px;
	width: 32px; height: 32px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: var(--dc-muted);
	font-size: 1.4rem; line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.dc-sd__x:hover { background: rgba(255, 255, 255, 0.12); color: var(--dc-text); }

.dc-sd__loading {
	display: flex; align-items: center; gap: 12px;
	color: var(--dc-muted); font-size: 0.95rem;
	padding: 22px 8px;
}
.dc-sd__spin {
	width: 20px; height: 20px; flex: 0 0 auto;
	border: 2px solid rgba(184, 166, 255, 0.25);
	border-top-color: var(--dc-lavender);
	border-radius: 50%;
	animation: dc-sd-spin 0.7s linear infinite;
}
@keyframes dc-sd-spin { to { transform: rotate(360deg); } }

.dc-sd__head { display: flex; align-items: center; gap: 14px; padding-right: 28px; }
.dc-sd__ico {
	flex: 0 0 auto;
	width: 44px; height: 44px;
	border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--dc-border);
}
.dc-sd__ico--ltr { background: var(--dc-accent-gradient); color: #0a0616; font-weight: 700; font-size: 1.3rem; }
.dc-sd__ico--svg svg, .dc-sd__ico--svg img { width: 26px; height: 26px; }
.dc-sd__ico--img { object-fit: contain; }
.dc-sd__titles { display: flex; flex-direction: column; min-width: 0; gap: 2px; flex: 1 1 auto; }
.dc-sd__title { font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.dc-sd__plat { color: var(--dc-lavender); font-size: 0.82rem; }
.dc-sd__badge { flex: 0 0 auto; }

.dc-sd__file {
	margin: 14px 0 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78rem;
	color: var(--dc-muted);
	word-break: break-all;
}

.dc-sd__meta { margin: 16px 0 0; display: flex; flex-direction: column; gap: 0; }
.dc-sd__mrow {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--dc-border);
}
.dc-sd__mrow:last-child { border-bottom: 0; }
.dc-sd__mrow dt { color: var(--dc-muted); font-size: 0.86rem; margin: 0; }
.dc-sd__mrow dd { margin: 0; font-weight: 600; font-size: 0.9rem; text-align: end; }
.dc-sd__host { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84rem; }
.dc-sd__ok { color: #7ee0a6; }
.dc-sd__warn { color: #ffb27d; }
a.dc-sd__ok:hover, a.dc-sd__warn:hover { text-decoration: underline; }

.dc-sd__sum {
	margin-top: 16px;
	border: 1px solid rgba(184, 166, 255, 0.22);
	border-radius: var(--dc-radius, 14px);
	background: rgba(109, 59, 245, 0.08);
	padding: 12px 14px;
}
.dc-sd__sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dc-sd__sum-type { color: var(--dc-muted); font-size: 0.78rem; letter-spacing: 0.03em; }
.dc-sd__sum-row { display: flex; align-items: center; gap: 8px; }
.dc-sd__hash {
	flex: 1 1 auto; min-width: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.74rem;
	color: var(--dc-text);
	background: rgba(0, 0, 0, 0.28);
	padding: 7px 9px;
	border-radius: 8px;
	overflow-x: auto;
	white-space: nowrap;
}
.dc-sd__copy {
	flex: 0 0 auto; padding: 6px 12px; font-size: 0.8rem; font-weight: 600;
	background: rgba(184, 166, 255, 0.16); border-color: var(--dc-lavender); color: var(--dc-lavender);
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dc-sd__copy:hover { background: var(--dc-accent-gradient); color: #0a0616; border-color: transparent; }
.dc-sd__sum-hint { margin: 8px 0 0; color: var(--dc-muted); font-size: 0.78rem; line-height: 1.5; }

.dc-sd__actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.dc-sd__go { width: 100%; justify-content: center; font-size: 0.98rem; padding: 13px; }
.dc-sd__go.is-done { opacity: 0.6; cursor: default; }
.dc-sd__page { text-align: center; color: var(--dc-muted); font-size: 0.86rem; }
.dc-sd__page:hover { color: var(--dc-lavender); }

.dc-sd__status {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: var(--dc-radius-sm, 10px);
	font-size: 0.86rem;
	background: rgba(46, 160, 102, 0.12);
	border: 1px solid rgba(46, 160, 102, 0.32);
	color: #a9edc5;
}
.dc-sd__note { margin: 12px 0 0; color: var(--dc-muted); font-size: 0.8rem; line-height: 1.5; text-align: center; }

@media (max-width: 480px) {
	.dc-sd { padding: 22px 18px 18px; border-radius: 16px; }
	.dc-sd__title { font-size: 1.02rem; }
}

/* Overlay share + reviews chips. */
.dc-sd__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--dc-border); }
.dc-sd__social-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px; border-radius: 999px;
	border: 1px solid var(--dc-border); background: var(--dc-surface);
	color: var(--dc-muted); font-size: .84rem; line-height: 1; cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.dc-sd__social-btn:hover { border-color: var(--dc-lavender); color: var(--dc-text); background: rgba(184, 166, 255, .08); text-decoration: none; }
.dc-sd__social-btn svg { flex: 0 0 auto; }
.dc-sd__stars { color: #ffc65c; }
