/* ==========================================================================
   næmt Plugins – download-shortcode [naemt_plugins]
   Arver temaets skrifttype og tekstfarve, så det passer ind på alle sites.
   ========================================================================== */

.nmt-dl {
	--nmt-dl-accent: #4f46e5;
	--nmt-dl-accent-hover: #4338ca;
	--nmt-dl-surface: #ffffff;
	--nmt-dl-surface-2: #f8f9fb;
	--nmt-dl-border: rgba(17, 24, 39, .1);
	--nmt-dl-muted: rgba(17, 24, 39, .6);
	--nmt-dl-text: #111827;
	--nmt-dl-radius: 14px;

	font-size: 15px;
	line-height: 1.55;
	color: var(--nmt-dl-text);
	margin: 1.5em 0;
}

.nmt-dl *,
.nmt-dl *::before,
.nmt-dl *::after {
	box-sizing: border-box;
}

.nmt-dl [hidden] {
	display: none !important;
}

.nmt-dl .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.nmt-dl-icon {
	flex: none;
	display: inline-block;
	vertical-align: middle;
}

/* --- Liste ---------------------------------------------------------------- */

.nmt-dl-list {
	display: grid;
	gap: 14px;
}

.nmt-dl-card {
	background: var(--nmt-dl-surface);
	border: 1px solid var(--nmt-dl-border);
	border-radius: var(--nmt-dl-radius);
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 3px rgba(17, 24, 39, .06);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.nmt-dl-card:hover {
	box-shadow: 0 12px 28px -10px rgba(17, 24, 39, .18), 0 4px 10px -4px rgba(17, 24, 39, .06);
}

.nmt-dl-main {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 22px;
}

.nmt-dl-info {
	flex: 1;
	min-width: 0;
}

.nmt-dl .nmt-dl-name {
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: inherit;
}

.nmt-dl .nmt-dl-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--nmt-dl-muted);
}

.nmt-dl .nmt-dl-desc {
	margin: 8px 0 0;
	font-size: 14px;
	color: inherit;
	opacity: .85;
}

.nmt-dl-ver {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 6px;
	background: rgba(79, 70, 229, .1);
	color: var(--nmt-dl-accent);
	white-space: nowrap;
}

.nmt-dl-muted {
	color: var(--nmt-dl-muted);
}

/* Ikon med initialer – samme som i admin. */
.nmt-dl .nmt-avatar {
	--nmt-hue: 240;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 13px;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: .02em;
	color: hsl(var(--nmt-hue) 55% 32%);
	background: linear-gradient(135deg, hsl(var(--nmt-hue) 85% 94%), hsl(calc(var(--nmt-hue) + 30) 80% 88%));
	box-shadow: inset 0 0 0 1px hsl(var(--nmt-hue) 60% 85%);
}

/* --- Knap ----------------------------------------------------------------- */

.nmt-dl a.nmt-dl-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 18px;
	border-radius: 10px;
	background: var(--nmt-dl-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
	transition: background-color .15s ease, transform .05s ease, box-shadow .15s ease;
}

.nmt-dl a.nmt-dl-btn:hover {
	background: var(--nmt-dl-accent-hover);
	color: #fff;
}

.nmt-dl a.nmt-dl-btn:active {
	transform: translateY(1px);
}

.nmt-dl a.nmt-dl-btn:focus-visible,
.nmt-dl summary:focus-visible,
.nmt-dl-older a:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, .3);
}

/* --- Noter og ældre versioner ---------------------------------------------- */

.nmt-dl-extra {
	border-top: 1px solid var(--nmt-dl-border);
	background: var(--nmt-dl-surface-2);
	padding: 4px 22px;
}

.nmt-dl-details + .nmt-dl-details {
	border-top: 1px dashed var(--nmt-dl-border);
}

.nmt-dl summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 0;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	border-radius: 6px;
	user-select: none;
}

.nmt-dl summary::-webkit-details-marker {
	display: none;
}

.nmt-dl summary::before {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	opacity: .55;
	transition: transform .15s ease;
	margin-right: 2px;
}

.nmt-dl details[open] > summary::before {
	transform: rotate(45deg);
}

.nmt-dl-notes {
	padding: 0 0 14px 17px;
	font-size: 14px;
}

.nmt-dl-notes p,
.nmt-dl-notes ul {
	margin: 0 0 6px;
}

.nmt-dl-notes ul {
	padding-left: 18px;
}

.nmt-dl-notes code {
	font-size: 12px;
}

.nmt-dl .nmt-dl-older {
	list-style: none;
	margin: 0;
	padding: 0 0 12px 17px;
}

.nmt-dl-older li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	margin: 0;
	font-size: 13.5px;
}

.nmt-dl-older li + li {
	border-top: 1px solid var(--nmt-dl-border);
}

.nmt-dl .nmt-dl-older a {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 7px;
	font-weight: 600;
	color: var(--nmt-dl-accent);
	text-decoration: none;
}

.nmt-dl .nmt-dl-older a:hover {
	background: rgba(79, 70, 229, .08);
}

/* --- Søgning -------------------------------------------------------------- */

.nmt-dl-search {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 14px;
}

.nmt-dl-search .nmt-dl-icon {
	position: absolute;
	left: 14px;
	color: var(--nmt-dl-muted);
	pointer-events: none;
}

.nmt-dl .nmt-dl-search input {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px 0 40px;
	border: 1px solid var(--nmt-dl-border);
	border-radius: 11px;
	background: var(--nmt-dl-surface);
	color: inherit;
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}

.nmt-dl .nmt-dl-search input:focus {
	outline: none;
	border-color: var(--nmt-dl-accent);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, .2);
}

.nmt-dl-none,
.nmt-dl-empty {
	padding: 28px;
	text-align: center;
	color: var(--nmt-dl-muted);
	border: 1.5px dashed var(--nmt-dl-border);
	border-radius: var(--nmt-dl-radius);
}

/* --- Login ---------------------------------------------------------------- */

.nmt-dl-locked {
	max-width: 420px;
	margin: 0 auto;
	padding: 32px 28px;
	text-align: center;
	background: var(--nmt-dl-surface);
	border: 1px solid var(--nmt-dl-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px -12px rgba(17, 24, 39, .18);
}

.nmt-dl-locked > .nmt-dl-icon {
	width: 48px;
	height: 48px;
	padding: 13px;
	margin: 0 auto 14px;
	display: block;
	border-radius: 14px;
	background: rgba(79, 70, 229, .1);
	color: var(--nmt-dl-accent);
}

.nmt-dl .nmt-dl-locked h3 {
	margin: 0 0 6px;
	padding: 0;
	font-size: 19px;
	font-weight: 700;
	color: inherit;
}

.nmt-dl .nmt-dl-locked > p {
	margin: 0 0 20px;
	color: var(--nmt-dl-muted);
	font-size: 14px;
}

.nmt-dl #nmt-dl-login {
	text-align: left;
	margin: 0;
}

.nmt-dl #nmt-dl-login p {
	margin: 0 0 14px;
}

.nmt-dl #nmt-dl-login label {
	display: block;
	margin-bottom: 5px;
	font-size: 13.5px;
	font-weight: 600;
}

.nmt-dl #nmt-dl-login input[type="text"],
.nmt-dl #nmt-dl-login input[type="password"] {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--nmt-dl-border);
	border-radius: 10px;
	background: var(--nmt-dl-surface);
	color: inherit;
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}

.nmt-dl #nmt-dl-login input[type="text"]:focus,
.nmt-dl #nmt-dl-login input[type="password"]:focus {
	outline: none;
	border-color: var(--nmt-dl-accent);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, .2);
}

.nmt-dl #nmt-dl-login .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	margin: 0;
}

.nmt-dl #nmt-dl-login .login-submit {
	margin: 6px 0 0;
}

.nmt-dl #nmt-dl-login input[type="submit"] {
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: 10px;
	background: var(--nmt-dl-accent);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease;
}

.nmt-dl #nmt-dl-login input[type="submit"]:hover {
	background: var(--nmt-dl-accent-hover);
}

.nmt-dl a.nmt-dl-lost {
	display: inline-block;
	margin-top: 14px;
	font-size: 13.5px;
	color: var(--nmt-dl-muted);
}

/* --- Mobil ---------------------------------------------------------------- */

@media (max-width: 600px) {
	.nmt-dl-main {
		flex-wrap: wrap;
		padding: 18px;
	}

	.nmt-dl-info {
		flex-basis: calc(100% - 64px);
	}

	.nmt-dl a.nmt-dl-btn {
		width: 100%;
		justify-content: center;
	}

	.nmt-dl-extra {
		padding: 4px 18px;
	}

	.nmt-dl-locked {
		padding: 26px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nmt-dl * {
		transition: none !important;
	}
}
