
:root { --mk-up-size: 120px; --mk-up-radius: 12px; }
/* the real input stays in the form (it is what gets sent, and `required` still works)
   but is drawn by its tile */
html input[type=file].mk-up-native {
    position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important;
    overflow: hidden !important; clip: rect(0 0 0 0) !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; pointer-events: none !important;
}
.mk-up { position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: top;
         border: 2px dashed var(--mk-slate-300, #cbd5e1); border-radius: var(--mk-up-radius);
         background: var(--mk-slate-50, #f8fafc); color: var(--mk-slate-400-2, #94a3b8);
         cursor: pointer; overflow: hidden; margin: 0; font-weight: 400; box-sizing: border-box;
         transition: border-color .15s, background .15s; }
.mk-up:hover, .mk-up.is-drag { border-color: var(--mk-blue-500-2, #4f46e5); background: var(--mk-blue-50, #eef2ff); color: var(--mk-blue-500-2, #4f46e5); }
.mk-up:focus-within { outline: 2px solid var(--mk-blue-300, #a5b4fc); outline-offset: 2px; }
.mk-up.is-disabled { opacity: .55; cursor: not-allowed; }
/* photo: the logo square */
.mk-up-photo { width: var(--mk-up-size); height: var(--mk-up-size); flex-direction: column; text-align: center; }
/* the camera and its label, one under the other, both in the very middle of the square */
.mk-up-photo .mk-up-ph { display: flex; flex-direction: column; align-items: center; justify-content: center;
                         width: 100%; height: 100%; text-align: center; }
.mk-up-photo .mk-up-ph i { font-size: 24px; line-height: 1; margin: 0 0 6px; color: var(--mk-blue-500-2, #4f46e5); }
.mk-up-photo .mk-up-ph span { font-size: 11px; line-height: 1.2; padding: 0 6px; }
.mk-up-photo img.mk-up-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-up-photo.has-file { border-style: solid; border-color: var(--mk-slate-200, #e2e8f0); background: #fff; }
.mk-up-photo .mk-up-more { position: absolute; left: 6px; bottom: 6px; background: rgba(15,23,42,.72); color: #fff;
                           font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
/* document: the same dashed frame, wide */
.mk-up-doc { width: 100%; max-width: 560px; min-height: 64px; padding: 10px 14px; gap: 12px; justify-content: flex-start; text-align: left; }
.mk-up-doc .mk-up-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center;
                        justify-content: center; font-size: 18px; background: #fff; box-shadow: 0 0 0 1px var(--mk-slate-200, #e2e8f0); }
.mk-up-doc .mk-up-txt { min-width: 0; display: flex; flex-direction: column; }
.mk-up-doc .mk-up-txt b { color: var(--mk-slate-700, #334155); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-up-doc .mk-up-txt small { font-size: 11.5px; }
.mk-up-doc.has-file { border-style: solid; border-color: var(--mk-slate-200, #e2e8f0); background: #fff; }
.mk-up-doc.has-file .mk-up-ico { color: var(--mk-blue-500-2, #4f46e5); }
/* ✕: empty the field again */
.mk-up-clear { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
               background: rgba(15,23,42,.72); color: #fff; font-size: 11px; line-height: 22px; text-align: center;
               cursor: pointer; display: none; z-index: 2; }
.mk-up.has-file .mk-up-clear { display: block; }
.mk-up-doc .mk-up-clear { top: 50%; transform: translateY(-50%); right: 10px; }
.mk-up-doc.has-file { padding-right: 40px; }
/* in a table cell or a tight row: a smaller square */
td .mk-up-photo, .mk-up-photo.mk-up-sm { --mk-up-size: 64px; }
td .mk-up-photo .mk-up-ph span { display: none; }
td .mk-up-doc { min-height: 44px; padding: 6px 10px; }
td .mk-up-doc .mk-up-ico { width: 30px; height: 30px; font-size: 14px; }
@media print { .mk-up { display: none !important; } }
