/* LokalMarketPH Upload Fix V3 - 2026-05-14
   Keeps the native browser file input hidden and shows only the custom upload card. */
input[type="file"].lokal-hidden-file-input,
input[type="file"]#validId,
input[type="file"]#businessPermit,
input[type="file"]#dtiRegistration,
input[type="file"]#barangayClearance,
input[type="file"][id^="file-"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

/* If a selected-file message appears, prevent it from overflowing mobile screens. */
label[for^="file-"], label[for="validId"], label[for="businessPermit"], label[for="dtiRegistration"], label[for="barangayClearance"] {
  word-break: break-word;
}


/* V83: keep registration upload as one visible native file input, then hide the old custom card. */
input[type="file"].lm-v83-inline-file-input {
  display: block !important;
  position: static !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  opacity: 1 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 1px solid #d1d5db !important;
  padding: 12px !important;
  margin: 8px 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 16px !important;
}
label[data-lm-v83-hidden-dropzone="1"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.lm-v83-file-chip {
  display: block;
}


/* V85: registration upload field must remain visible on desktop and mobile.
   Older global fixes hide input[id^="file-"]; this override intentionally wins. */
input[type="file"].lm-v84-inline-file-input,
input[type="file"].lm-v85-inline-file-input,
form input[type="file"].lm-v85-inline-file-input,
form input[type="file"].lokal-mobile-file-input.lm-v85-inline-file-input {
  display: block !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 48px !important;
  opacity: 1 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 1px solid #d1d5db !important;
  padding: 12px !important;
  margin: 8px 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 16px !important;
  pointer-events: auto !important;
}


/* V86: make the whole registration upload card clickable.
   This overrides older global rules that hide input[id^="file-"] off-screen. */
input[type="file"].lm-v86-card-file-input,
form input[type="file"].lm-v86-card-file-input {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* V88: prominent registration upload cards. */
input[type="file"].lm-v88-prominent-file-input,
form input[type="file"].lm-v88-prominent-file-input {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0.01 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.lm-v88-force-clickable-upload,
.lm-v88-prominent-upload-card {
  cursor: pointer !important;
  border-color: #fb923c !important;
  background: #fff7ed !important;
  box-shadow: 0 10px 24px rgba(251, 100, 8, .10) !important;
}
.lm-v88-force-clickable-upload:hover,
.lm-v88-prominent-upload-card:hover {
  border-color: #FC6408 !important;
  background: #ffedd5 !important;
}
.lm-v88-upload-selected-chip {
  margin-top: .75rem;
  padding: .65rem .75rem;
  border-radius: .75rem;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: .875rem;
  font-weight: 700;
  word-break: break-word;
}


/* V91: reliable label-based registration file picker.
   The input is visually hidden, but each upload card is a real <label for="file-..."> so tapping anywhere opens the browser picker. */
input[type="file"].lm-v91-stable-file-input,
form input[type="file"].lm-v91-stable-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0.01 !important;
}
.lm-v91-upload-label {
  cursor: pointer !important;
  user-select: none;
  -webkit-tap-highlight-color: rgba(252, 100, 8, .20);
}
.lm-v91-upload-label:focus-within,
.lm-v91-upload-label:hover {
  border-color: #FC6408 !important;
}


/* V93: registration upload native overlay fix.
   The real file input now sits over the upload card, so clicking anywhere opens
   the browser file picker directly instead of relying on a hidden input/label click. */
form input[type="file"].lm-v91-stable-file-input,
input[type="file"].lm-v91-stable-file-input {
  display: block !important;
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  width: 100% !important;
  height: 124px !important;
  min-height: 110px !important;
  opacity: 0.01 !important;
  overflow: hidden !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 30 !important;
}
#file-seller-documents-bulk.lm-v91-stable-file-input {
  height: 118px !important;
}
.lm-v91-upload-label {
  position: relative !important;
  z-index: 10 !important;
}
form input[type="file"].lm-v91-stable-file-input:disabled {
  cursor: wait !important;
  pointer-events: none !important;
}
/* Keep remove buttons clickable above the transparent file input overlay. */
form button[type="button"] {
  position: relative;
  z-index: 40;
}


/* V94: registration direct browser file picker fix.
   Removes the transparent overlay approach that made only the faint native input clickable.
   The upload card remains clickable through its label, and a real browser file picker is visible as a fallback. */
.lm-v94-upload-label {
  cursor: pointer !important;
  user-select: none;
  -webkit-tap-highlight-color: rgba(252, 100, 8, .22);
}
.lm-v94-upload-label:hover,
.lm-v94-upload-label:focus-within {
  border-color: #FC6408 !important;
  box-shadow: 0 8px 22px rgba(252, 100, 8, .14) !important;
}
.lm-v94-native-file-row {
  position: relative !important;
  z-index: 50 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: .4rem !important;
  margin-top: .75rem !important;
  padding: .75rem !important;
  border: 2px solid #fb923c !important;
  border-radius: .875rem !important;
  background: #fff7ed !important;
}
.lm-v94-native-file-label {
  font-size: .75rem !important;
  font-weight: 900 !important;
  color: #9a3412 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}
form input[type="file"].lm-v94-direct-file-input,
input[type="file"].lm-v94-direct-file-input {
  display: block !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 44px !important;
  opacity: 1 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 1px solid #fed7aa !important;
  border-radius: .75rem !important;
  padding: .65rem !important;
  margin: 0 !important;
  background: #ffffff !important;
  color: #111827 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 60 !important;
}
form input[type="file"].lm-v94-direct-file-input::file-selector-button,
input[type="file"].lm-v94-direct-file-input::file-selector-button {
  margin-right: .75rem;
  border: 0;
  border-radius: .65rem;
  background: #FC6408;
  color: #fff;
  padding: .55rem .85rem;
  font-weight: 800;
  cursor: pointer;
}
form input[type="file"].lm-v94-direct-file-input::-webkit-file-upload-button,
input[type="file"].lm-v94-direct-file-input::-webkit-file-upload-button {
  margin-right: .75rem;
  border: 0;
  border-radius: .65rem;
  background: #FC6408;
  color: #fff;
  padding: .55rem .85rem;
  font-weight: 800;
  cursor: pointer;
}
/* If any older cached upload component still renders lm-v91, restore label behavior instead of overlaying the card. */
form input[type="file"].lm-v91-stable-file-input,
input[type="file"].lm-v91-stable-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0.01 !important;
  z-index: -1 !important;
}

/* V95: one clean upload control only. The real file input stays available to the browser but is visually hidden. */
form input[type="file"].lm-v95-hidden-file-input,
input[type="file"].lm-v95-hidden-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  pointer-events: none !important;
}
.lm-v95-upload-label {
  user-select: none;
  -webkit-tap-highlight-color: rgba(252, 100, 8, 0.15);
}
.lm-v95-upload-label:hover,
.lm-v95-upload-label:focus-within {
  box-shadow: 0 0 0 3px rgba(252, 100, 8, 0.16) !important;
}
