/* Secure Product Files: popup. Everything is prefixed .spf- so it does not clash with the theme. */
.spf-root { margin: 1em 0; }
.spf-btn .spf-lock { font-size: .9em; }

.spf-dialog {
	border: 0; border-radius: 12px; padding: 0;
	width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
	background: #fff; color: #1f2937; box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
	font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.spf-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.spf-dialog * { box-sizing: border-box; }

.spf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.spf-head h2 { margin: 0; font-size: 18px; line-height: 1.3; color: inherit; }
.spf-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 4px; }
.spf-x:hover { color: #111827; }
.spf-body { padding: 20px; }
.spf-body p { margin: 0 0 14px; }

.spf-field { margin: 0 0 14px; }
.spf-field label { display: block; font-weight: 600; margin: 0 0 4px; font-size: 14px; }
.spf-field input { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; background: #fff; color: #111827; }
.spf-field input:focus { outline: 2px solid #1d4ed8; outline-offset: 1px; border-color: #1d4ed8; }
.spf-field input.spf-code { letter-spacing: .35em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }

.spf-primary { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 8px; background: #1d4ed8; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.spf-primary:hover { background: #1e40af; }
.spf-primary:disabled { opacity: .6; cursor: wait; }

.spf-choice { display: block; width: 100%; text-align: left; padding: 14px 16px; margin: 0 0 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: inherit; cursor: pointer; font: inherit; }
.spf-choice:hover, .spf-choice:focus-visible { border-color: #1d4ed8; background: #f8faff; }
.spf-choice strong { display: block; font-size: 16px; }
.spf-choice span { display: block; color: #6b7280; font-size: 13px; }

.spf-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.spf-link { border: 0; background: none; padding: 0; color: #1d4ed8; text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }

.spf-note { color: #4b5563; font-size: 14px; }
.spf-error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.spf-ok { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.spf-who { font-size: 15px; }
.spf-badge { display: inline-block; padding: 2px 10px; margin: 0 6px 0 0; border-radius: 99px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 600; }
.spf-top { margin-top: 0; align-items: baseline; }
.spf-top .spf-who { margin: 0; }
.spf-files { margin: 10px 0 0; }
.spf-sec { border-top: 1px solid #e5e7eb; padding: 14px 0 6px; }
.spf-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.spf-sec-head h3 { margin: 0; font-size: 16px; color: inherit; }
.spf-up, .spf-dl { border: 1px solid #1d4ed8; background: #fff; color: #1d4ed8; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.spf-up { background: #1d4ed8; color: #fff; }
.spf-up:hover { background: #1e40af; }
.spf-dl:hover { background: #eff4ff; }
.spf-dl:disabled { opacity: .6; cursor: wait; }
.spf-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f2f4; }
.spf-fmain { min-width: 0; }
.spf-fname { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.spf-meta { color: #6b7280; font-size: 12px; }
.spf-older { margin: 0 0 4px 14px; font-size: 13px; }
.spf-older summary { cursor: pointer; color: #4b5563; padding: 4px 0; }
.spf-older .spf-fname { font-weight: 500; }
.spf-empty { color: #9ca3af; font-size: 14px; margin: 0 0 8px; }
.spf-status p { margin: 0 0 6px; }
