/*
 * ndevr-forms.css — shared modern form kit for the native-web OWL widgets (auth, upload, etc.).
 * Dark, self-contained, scoped under .ndevr-forms so it never leaks into a host WordPress theme.
 * Accent is themeable via --ndevr-accent (defaults to NDEVR gold), same convention as the product
 * widget. Floating labels, inline validation, password-strength meter, beveled accent buttons —
 * deliberately the antidote to the dated QGroupBox-per-field native dialogs.
 */
.ndevr-forms {
  --ndevr-accent: #f2a900;
  --ndevr-accent-dark: #c98a00;
  --ndevr-bg: #1b1e24;
  --ndevr-card: #23272f;
  --ndevr-field: #1b1e24;
  --ndevr-border: #353b46;
  --ndevr-text: #e7e9ee;
  --ndevr-muted: #9aa3b2;
  --ndevr-error: #ff7a85;
  --ndevr-ok: #5ee08a;
  color: var(--ndevr-text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}
.ndevr-forms *, .ndevr-forms *::before, .ndevr-forms *::after { box-sizing: border-box; }

/* Kill the mobile tap-highlight box (the translucent blue/grey flash WebKit & Chrome draw on tap)
   on every interactive element, and reserve visible focus rings for keyboard users (:focus-visible)
   so a tap/click doesn't leave a lingering blue outline. */
.ndevr-forms, .ndevr-forms * { -webkit-tap-highlight-color: transparent; }
.ndevr-forms button, .ndevr-forms a, .ndevr-forms [role="button"] { -webkit-tap-highlight-color: transparent; }
.ndevr-forms button:focus:not(:focus-visible),
.ndevr-forms a:focus:not(:focus-visible),
.ndevr-forms [role="button"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.ndevr-forms button:focus-visible,
.ndevr-forms [role="button"]:focus-visible { outline: 2px solid var(--ndevr-accent); outline-offset: 2px; }

.ndevr-forms .nf-card {
  background: var(--ndevr-card);
  border: 1px solid var(--ndevr-border);
  border-radius: 14px;
  padding: 26px 24px 24px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.ndevr-forms .nf-title { font-size: 20px; font-weight: 700; margin: 0 0 2px; }
.ndevr-forms .nf-sub { color: var(--ndevr-muted); font-size: 13px; margin: 0 0 20px; }

/* Tabs (Sign in / Create account). A single pill slides between the two options — JS positions it
   from the active button's box (robust to padding/gaps). Box model + typography are locked with
   !important across every state so a host theme's button:hover styles can't resize them. */
.ndevr-forms .nf-tabs {
  position: relative; display: flex; gap: 4px;
  background: var(--ndevr-field); border: 1px solid var(--ndevr-border);
  border-radius: 10px; padding: 4px; margin-bottom: 22px;
}
.ndevr-forms .nf-tab-pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 7px; background: var(--ndevr-card); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  z-index: 0; pointer-events: none;
  transition: transform .26s cubic-bezier(.4, 0, .2, 1), width .26s cubic-bezier(.4, 0, .2, 1);
}
.ndevr-forms .nf-tab,
.ndevr-forms .nf-tab:hover,
.ndevr-forms .nf-tab:focus,
.ndevr-forms .nf-tab:active {
  position: relative; z-index: 1;
  flex: 1 1 0; text-align: center; cursor: pointer; width: auto; min-height: 0;
  margin: 0 !important;
  padding: 9px 10px !important;
  border: 0 !important;
  border-radius: 7px !important;
  font: 600 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  transform: none !important; outline: none !important;
  -webkit-appearance: none; appearance: none;
  background: transparent !important;
  color: var(--ndevr-muted);
  box-shadow: none;
  transition: color .2s ease;
}
.ndevr-forms .nf-tab:hover,
.ndevr-forms .nf-tab:focus,
.ndevr-forms .nf-tab.is-active { color: var(--ndevr-text); }

/* Form area whose height JS animates when switching tabs / toggling the recovery warning. The
   incoming pane fades+slides in. overflow is only clamped by JS during the transition. */
.ndevr-forms .nf-forms { position: relative; }
@keyframes nf-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ndevr-forms .nf-fade { animation: nf-fadein .26s ease; }

/* Floating-label field */
.ndevr-forms .nf-field { position: relative; margin-bottom: 16px; }
.ndevr-forms .nf-field input {
  width: 100%; height: 52px; padding: 22px 14px 8px; border-radius: 10px;
  background: var(--ndevr-field); border: 1px solid var(--ndevr-border);
  color: var(--ndevr-text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ndevr-forms .nf-field input::placeholder { color: transparent; }
.ndevr-forms .nf-field label {
  position: absolute; left: 14px; top: 16px; color: var(--ndevr-muted);
  font-size: 15px; pointer-events: none; transition: transform .14s ease, color .14s, font-size .14s;
  transform-origin: left top;
}
.ndevr-forms .nf-field input:focus + label,
.ndevr-forms .nf-field input:not(:placeholder-shown) + label {
  transform: translateY(-9px); font-size: 11.5px; color: var(--ndevr-accent); letter-spacing: .02em;
}
.ndevr-forms .nf-field input:focus { border-color: var(--ndevr-accent); box-shadow: 0 0 0 3px rgba(242,169,0,.15); }
.ndevr-forms .nf-field.is-error input { border-color: var(--ndevr-error); }
.ndevr-forms .nf-field.is-error input:focus { box-shadow: 0 0 0 3px rgba(255,122,133,.16); }
.ndevr-forms .nf-hint { font-size: 12px; color: var(--ndevr-muted); margin: 6px 2px 0; min-height: 14px; }
.ndevr-forms .nf-field.is-error .nf-hint { color: var(--ndevr-error); }

/* Show/hide password toggle. Box model + the vertical-centering transform are locked with !important
   across every state so a host theme's button:hover can't resize or shift it. */
.ndevr-forms .nf-field .nf-eye,
.ndevr-forms .nf-field .nf-eye:hover,
.ndevr-forms .nf-field .nf-eye:focus,
.ndevr-forms .nf-field .nf-eye:active {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%) !important;
  background: transparent !important; color: var(--ndevr-muted); cursor: pointer;
  margin: 0 !important; padding: 8px 10px !important; border: 0 !important; border-radius: 6px !important;
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
  box-shadow: none !important; outline: none !important; -webkit-appearance: none; appearance: none;
}
.ndevr-forms .nf-field .nf-eye:hover,
.ndevr-forms .nf-field .nf-eye:focus { color: var(--ndevr-text); }

/* Password-strength meter */
.ndevr-forms .nf-strength { display: flex; gap: 4px; margin: 8px 2px 0; }
.ndevr-forms .nf-strength i { height: 4px; flex: 1; border-radius: 2px; background: var(--ndevr-border); transition: background .2s; }
.ndevr-forms .nf-strength.s1 i:nth-child(-n+1),
.ndevr-forms .nf-strength.s2 i:nth-child(-n+2),
.ndevr-forms .nf-strength.s3 i:nth-child(-n+3),
.ndevr-forms .nf-strength.s4 i:nth-child(-n+4) { background: var(--ndevr-accent); }
.ndevr-forms .nf-strength.s1 i:nth-child(-n+1) { background: var(--ndevr-error); }
.ndevr-forms .nf-strength.s2 i:nth-child(-n+2) { background: #e8a13a; }

.ndevr-forms .nf-check { display: flex; align-items: center; gap: 9px; margin: 4px 2px 12px; color: var(--ndevr-muted); font-size: 13.5px; cursor: pointer; }
.ndevr-forms .nf-check input { width: 16px; height: 16px; accent-color: var(--ndevr-accent); flex: 0 0 auto; }

/* Password-recovery opt-in note + the "no recovery" acknowledgment warning */
.ndevr-forms .nf-note { margin: -6px 2px 14px 27px; color: var(--ndevr-muted); font-size: 12px; }
.ndevr-forms .nf-warn {
  border-radius: 10px; padding: 11px 13px; margin: 0 0 12px;
  background: rgba(232,161,58,.1); border: 1px solid rgba(232,161,58,.4); color: #e8a13a; font-size: 13px;
}
.ndevr-forms .nf-warn b { color: #f3b85a; }

/* Buttons */
.ndevr-forms .nf-btn {
  width: 100%; height: 50px; border: 0; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #1a1205;
  background: linear-gradient(180deg, var(--ndevr-accent), var(--ndevr-accent-dark));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px rgba(242,169,0,.25);
  transition: filter .15s, transform .05s;
}
.ndevr-forms .nf-btn:hover { filter: brightness(1.06); }
.ndevr-forms .nf-btn:active { transform: translateY(1px); }
.ndevr-forms .nf-btn[disabled] { filter: grayscale(.5) brightness(.8); cursor: default; box-shadow: none; }
.ndevr-forms .nf-btn.nf-btn-ghost {
  background: transparent; color: var(--ndevr-muted); box-shadow: none; height: auto; font-weight: 600; font-size: 13.5px;
}
.ndevr-forms .nf-btn.nf-btn-ghost:hover { color: var(--ndevr-text); filter: none; }
.ndevr-forms .nf-btn .nf-spin {
  display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px;
  border: 2px solid rgba(0,0,0,.35); border-top-color: rgba(0,0,0,.85); border-radius: 50%;
  animation: nf-spin .7s linear infinite;
}
@keyframes nf-spin { to { transform: rotate(360deg); } }

/* Message banners */
.ndevr-forms .nf-msg { border-radius: 10px; padding: 11px 13px; font-size: 13.5px; margin-bottom: 16px; display: none; }
.ndevr-forms .nf-msg.show { display: block; }
.ndevr-forms .nf-msg.err { background: rgba(255,122,133,.12); border: 1px solid rgba(255,122,133,.4); color: var(--ndevr-error); }
.ndevr-forms .nf-msg.ok { background: rgba(94,224,138,.1); border: 1px solid rgba(94,224,138,.35); color: var(--ndevr-ok); }
.ndevr-forms .nf-msg.info { background: rgba(242,169,0,.1); border: 1px solid rgba(242,169,0,.35); color: var(--ndevr-accent); }

.ndevr-forms .nf-foot { text-align: center; margin-top: 14px; }

/* Logged-in state */
.ndevr-forms .nf-account { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ndevr-forms .nf-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--ndevr-accent), var(--ndevr-accent-dark));
  color: #1a1205; font-weight: 800; font-size: 18px;
}
.ndevr-forms .nf-account .nf-who { font-weight: 700; }
.ndevr-forms .nf-account .nf-who small { display: block; color: var(--ndevr-muted); font-weight: 500; font-size: 12.5px; }
.ndevr-forms .nf-row { display: flex; gap: 10px; }
.ndevr-forms .nf-row .nf-btn { flex: 1; }
.ndevr-forms .nf-btn.nf-btn-sec {
  background: var(--ndevr-field); color: var(--ndevr-text); box-shadow: inset 0 0 0 1px var(--ndevr-border);
}
.ndevr-forms .nf-btn.nf-btn-sec:hover { filter: none; background: #20242c; }

/* ---- OWL data view (ndevr-owl-data.js) ------------------------------------------------------ */
/* The data browser is a wide surface (grid/table), not a narrow form — let it fill its container up
   to a generous cap, and override the 420px form-card width it would otherwise inherit. */
.ndevr-forms .owl-data { width: 100%; max-width: 1040px; margin: 0 auto; }
.ndevr-forms .owl-data .nf-card { max-width: none; }
.ndevr-forms .owl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.ndevr-forms .owl-head .owl-title { font-size: 18px; font-weight: 700; }
/* Refresh (text) button — box model locked across states so a host theme's button:hover can't resize it. */
.ndevr-forms .owl-head .owl-refresh,
.ndevr-forms .owl-head .owl-refresh:hover,
.ndevr-forms .owl-head .owl-refresh:focus,
.ndevr-forms .owl-head .owl-refresh:active {
  background: transparent !important; color: var(--ndevr-muted); cursor: pointer;
  margin: 0 !important; padding: 2px 4px !important; border: 0 !important; border-radius: 6px !important;
  font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
  transform: none !important; box-shadow: none !important; outline: none !important;
  -webkit-appearance: none; appearance: none;
}
.ndevr-forms .owl-head .owl-refresh:hover,
.ndevr-forms .owl-head .owl-refresh:focus { color: var(--ndevr-text); }
.ndevr-forms .owl-list { display: flex; flex-direction: column; gap: 8px; }
.ndevr-forms .owl-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--ndevr-field); border: 1px solid var(--ndevr-border); border-radius: 10px;
}
.ndevr-forms .owl-ico {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(242,169,0,.12); color: var(--ndevr-accent); font-size: 16px;
}
.ndevr-forms .owl-main { flex: 1 1 auto; min-width: 0; }
.ndevr-forms .owl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndevr-forms .owl-meta { color: var(--ndevr-muted); font-size: 12.5px; margin-top: 2px; }
.ndevr-forms .owl-meta span + span::before { content: "·"; margin: 0 7px; opacity: .6; }
.ndevr-forms .owl-badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--ndevr-muted); text-transform: uppercase; letter-spacing: .03em;
}
.ndevr-forms .owl-badge.ok { background: rgba(94,224,138,.12); color: var(--ndevr-ok); }
.ndevr-forms .owl-badge.warn { background: rgba(232,161,58,.14); color: #e8a13a; }
.ndevr-forms .owl-empty { color: var(--ndevr-muted); font-size: 13.5px; padding: 18px 4px; text-align: center; }
.ndevr-forms .owl-locks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ndevr-forms .owl-lock { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.06); color: var(--ndevr-muted); }

/* View toggle (icon/table) */
.ndevr-forms .owl-tools { display: flex; align-items: center; gap: 10px; }
.ndevr-forms .owl-view { display: flex; background: var(--ndevr-field); border: 1px solid var(--ndevr-border); border-radius: 8px; padding: 2px; }
/* Grid/table view toggle. Box model + typography are locked with !important across every state so a
   host theme's button:hover styles can't change the size and cause a jarring resize — only the color
   (and the active pill background) change. */
.ndevr-forms .owl-vbtn,
.ndevr-forms .owl-vbtn:hover,
.ndevr-forms .owl-vbtn:focus,
.ndevr-forms .owl-vbtn:active {
  background: transparent; color: var(--ndevr-muted); cursor: pointer;
  margin: 0 !important; padding: 3px 9px !important;
  border: 0 !important; border-radius: 6px !important;
  font: 400 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  transform: none !important; outline: none !important; box-shadow: none !important;
  width: auto; height: auto; min-width: 0; min-height: 0;
  -webkit-appearance: none; appearance: none;
  transition: color .15s, background .15s;
}
.ndevr-forms .owl-vbtn:hover,
.ndevr-forms .owl-vbtn:focus { color: var(--ndevr-text); }
.ndevr-forms .owl-vbtn.is-active,
.ndevr-forms .owl-vbtn.is-active:hover,
.ndevr-forms .owl-vbtn.is-active:focus { background: var(--ndevr-card) !important; color: var(--ndevr-text); }

/* Thumbnails (image or emoji fallback) */
.ndevr-forms .owl-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.ndevr-forms .owl-ico.sm { width: 28px; height: 28px; font-size: 15px; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }

/* Grid (icon) view */
.ndevr-forms .owl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ndevr-forms .owl-tile { background: var(--ndevr-field); border: 1px solid var(--ndevr-border); border-radius: 10px; padding: 10px; transition: border-color .15s; }
.ndevr-forms .owl-tile:hover { border-color: var(--ndevr-accent); }
.ndevr-forms .owl-tile-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; background: rgba(242,169,0,.08); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.ndevr-forms .owl-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ndevr-forms .owl-tile-emoji { font-size: 34px; }
.ndevr-forms .owl-tile-badge { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.ndevr-forms .owl-tile-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndevr-forms .owl-tile-sub { color: var(--ndevr-muted); font-size: 12px; margin-top: 2px; }

/* Table view */
.ndevr-forms .owl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ndevr-forms .owl-table th { text-align: left; color: var(--ndevr-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; padding: 6px 10px; border-bottom: 1px solid var(--ndevr-border); }
.ndevr-forms .owl-table td { padding: 8px 10px; border-bottom: 1px solid var(--ndevr-border); vertical-align: middle; color: var(--ndevr-muted); }
.ndevr-forms .owl-td-name { display: flex; align-items: center; gap: 9px; }
.ndevr-forms .owl-td-label { font-weight: 600; color: var(--ndevr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ndevr-forms .owl-td-act { text-align: right; width: 1%; }

/* Search + type-filter toolbar (shown above a file list once it passes the entry threshold).
   display + alignment are forced so a host theme can't collapse the flex row. */
.ndevr-forms .owl-toolbar { display: flex !important; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
/* Search box: a flex row holding the icon + a transparent borderless input. They are SIBLINGS,
   not layered, so the icon can never overlap the text. min-width:0 lets the input shrink (and the
   placeholder clip) instead of overflowing the box/toolbar on a narrow phone. */
.ndevr-forms .owl-search-box {
  display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0;
  height: 38px; padding: 0 12px; border-radius: 8px; cursor: text;
  background: var(--ndevr-field); border: 1px solid var(--ndevr-border);
  transition: border-color .15s, box-shadow .15s;
}
.ndevr-forms .owl-search-box:focus-within { border-color: var(--ndevr-accent); box-shadow: 0 0 0 3px rgba(242,169,0,.15); }
.ndevr-forms .owl-search-ico { flex: 0 0 auto; width: 15px; height: 15px; color: var(--ndevr-muted); }
.ndevr-forms .owl-search {
  flex: 1 1 auto; min-width: 0;
  /* !important beats a host theme's input{} box styles (border/padding/height/bg) that would
     otherwise fatten the field and break the toolbar row. */
  width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: var(--ndevr-text);
  font: 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; outline: none;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
}
.ndevr-forms .owl-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* Keep a wide table from overflowing the page on mobile: it scrolls within the card instead. */
.ndevr-forms .owl-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Keep value columns on one line — if the table still can't fit, the wrap scrolls horizontally
   (cleaner than squeezing "5.0 MB" onto two lines). */
.ndevr-forms .owl-table th, .ndevr-forms .owl-table td { white-space: nowrap; }
@media (max-width: 560px) {
  .ndevr-forms .owl-col-mod, .ndevr-forms .owl-col-ver { display: none; } /* drop Modified + Ver on small screens */
  .ndevr-forms .owl-table td, .ndevr-forms .owl-table th { padding: 8px 6px; } /* tighter cells so Name+Size+actions fit */
  .ndevr-forms .owl-td-label { max-width: 26vw; }
  .ndevr-forms .owl-toolbar { gap: 8px; }
}
/* Type-filter + sort selects. THE KEY FIX for the "everything stacks vertically" bug: a host theme
   (e.g. Elementor) sets `select { width: 100% }`, which makes each select fill the row and forces the
   flex toolbar to wrap onto separate lines. flex:0 0 auto + width:auto !important sizes each select to
   its content so they sit in a row; box styling is locked with !important so the host can't restyle it. */
.ndevr-forms .owl-filter {
  flex: 0 0 auto; width: auto !important; min-width: 130px; max-width: 100%;
  height: 38px !important; margin: 0 !important; padding: 0 34px 0 12px !important;
  border-radius: 8px !important; cursor: pointer; box-shadow: none !important;
  background-color: var(--ndevr-field) !important; border: 1px solid var(--ndevr-border) !important;
  color: var(--ndevr-text) !important; font-size: 14px !important; line-height: normal;
  outline: none; transition: border-color .15s;
  -webkit-appearance: none; -moz-appearance: none; appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%239aa3b2' stroke-width='1.6' stroke-linecap='round'/></svg>") !important;
  background-repeat: no-repeat !important; background-position: right 11px center !important;
}
.ndevr-forms .owl-filter:focus { border-color: var(--ndevr-accent); }
.ndevr-forms .owl-filter option { background: var(--ndevr-card); color: var(--ndevr-text); }

/* Download button (grid tile corner + table action cell). Box model + typography locked with
   !important across every state so a host theme's button styles can't fatten it. */
.ndevr-forms .owl-dl, .ndevr-forms .owl-links-btn,
.ndevr-forms .owl-dl:hover, .ndevr-forms .owl-links-btn:hover,
.ndevr-forms .owl-dl:focus, .ndevr-forms .owl-links-btn:focus,
.ndevr-forms .owl-dl:active, .ndevr-forms .owl-links-btn:active {
  -webkit-appearance: none !important; appearance: none !important;
  box-sizing: border-box !important;
  width: 30px !important; height: 30px !important; min-width: 0 !important; min-height: 0 !important; max-width: 30px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important;
  display: inline-grid !important; place-items: center !important;
  font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important; text-indent: 0 !important;
  color: #1a1205 !important; background: var(--ndevr-accent) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35) !important;
  cursor: pointer; transition: filter .15s, transform .05s;
}
.ndevr-forms .owl-links-btn,
.ndevr-forms .owl-links-btn:hover,
.ndevr-forms .owl-links-btn:focus,
.ndevr-forms .owl-links-btn:active {
  color: #eef1f6 !important; background: rgba(255,255,255,.14) !important;
}
.ndevr-forms .owl-dl:hover, .ndevr-forms .owl-links-btn:hover { filter: brightness(1.08); }
.ndevr-forms .owl-dl:active, .ndevr-forms .owl-links-btn:active { transform: scale(.92); }
.ndevr-forms .owl-dl[disabled], .ndevr-forms .owl-links-btn[disabled] { filter: grayscale(.3) brightness(.85); cursor: default; }
/* Tile action cluster (download + links) revealed on hover at the thumb's bottom-right. */
.ndevr-forms .owl-tile-acts { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.ndevr-forms .owl-tile:hover .owl-tile-acts, .ndevr-forms .owl-tile-acts:focus-within { opacity: 1; }
.ndevr-forms .owl-td-act { display: flex; gap: 6px; justify-content: flex-end; }

/* Upload button + progress bar */
.ndevr-forms .owl-upload,
.ndevr-forms .owl-upload:hover,
.ndevr-forms .owl-upload:focus {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  border: 0 !important; margin: 0 !important; min-height: 0 !important; cursor: pointer;
  padding: 6px 12px !important; border-radius: 8px !important;
  font: 700 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  color: #1a1205 !important; background: var(--ndevr-accent) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 8px rgba(242,169,0,.2) !important;
  transition: filter .15s;
}
.ndevr-forms .owl-upload:hover { filter: brightness(1.07); }
.ndevr-forms .owl-upload[disabled] { filter: grayscale(.4) brightness(.85); cursor: default; }
.ndevr-forms .owl-progress { flex-basis: 100%; position: relative; height: 22px; margin-top: 4px; border-radius: 6px; background: var(--ndevr-field); overflow: hidden; border: 1px solid var(--ndevr-border); }
.ndevr-forms .owl-progress-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: linear-gradient(180deg, var(--ndevr-accent), var(--ndevr-accent-dark)); transition: width .15s; }
.ndevr-forms .owl-progress-label { position: relative; display: block; text-align: center; font-size: 11.5px; line-height: 22px; color: var(--ndevr-text); }

/* Upload form panel (file → asset name → version detection) */
.ndevr-forms .owl-up { max-width: 460px; }
.ndevr-forms .owl-up-file { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ndevr-field); border: 1px solid var(--ndevr-border); border-radius: 10px; margin-bottom: 16px; }
.ndevr-forms .owl-up-ico { font-size: 20px; flex: 0 0 auto; }
.ndevr-forms .owl-up-fname { font-weight: 600; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndevr-forms .owl-up-fsize { color: var(--ndevr-muted); font-size: 12.5px; flex: 0 0 auto; }
.ndevr-forms .owl-up-status { font-size: 13px; margin: -4px 2px 14px; min-height: 18px; color: var(--ndevr-muted); }
.ndevr-forms .owl-up-status.fresh { color: var(--ndevr-ok); }
.ndevr-forms .owl-up-status.version { color: var(--ndevr-accent); }

/* Share panel (access level + options → OWL link + QR code) */
.ndevr-forms .owl-share-form, .ndevr-forms .owl-share-result { max-width: 460px; }
.ndevr-forms .owl-sh-group { margin-bottom: 14px; }
.ndevr-forms .owl-sh-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ndevr-muted); margin-bottom: 8px; }
.ndevr-forms .owl-sh-radio, .ndevr-forms .owl-sh-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 14px; color: var(--ndevr-text); cursor: pointer; }
.ndevr-forms .owl-sh-radio input, .ndevr-forms .owl-sh-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--ndevr-accent); cursor: pointer; }
.ndevr-forms .owl-sh-perms { padding: 10px 12px; background: var(--ndevr-field); border: 1px solid var(--ndevr-border); border-radius: 10px; }
.ndevr-forms .owl-sh-perms .owl-sh-check { padding: 3px 0; }
/* On desktop the read-only sub-options sit to the RIGHT of the access-level radios; when the card
   is too narrow (mobile) flex-wrap drops them below. When a non-read level is picked the perms box
   is display:none and the radios sit alone on the left. */
.ndevr-forms .owl-sh-access { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.ndevr-forms .owl-sh-access > .owl-sh-group { margin-bottom: 0; }
.ndevr-forms .owl-sh-access > .owl-sh-levelgroup { flex: 0 0 auto; }
.ndevr-forms .owl-sh-access > .owl-sh-perms { flex: 1 1 220px; min-width: 180px; align-self: stretch; }
.ndevr-forms .owl-share-err { color: var(--ndevr-bad, #ff7a85); font-size: 13px; min-height: 16px; margin: 4px 2px; }
.ndevr-forms .owl-share-link { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 16px; }
.ndevr-forms .owl-share-link input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  padding: 9px 11px; border-radius: 8px; border: 1px solid var(--ndevr-border);
  background: var(--ndevr-field); color: var(--ndevr-text);
  font: 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis;
}
/* Copy button sits beside the link: compact, not the full-width .nf-btn default. */
.ndevr-forms .owl-share-link button { flex: 0 0 auto; width: auto !important; min-width: 0; height: auto; padding: 0 16px !important; white-space: nowrap; }
/* White QR card: shrink-wrap to the QR (not full-width) and center it above the copy/link. */
.ndevr-forms .owl-share-qr { width: fit-content; max-width: 100%; margin: 0 auto 16px; padding: 16px; background: #fff; border-radius: 12px; }
.ndevr-forms .owl-share-qr svg { width: 220px; height: 220px; max-width: 100%; display: block; }
.ndevr-forms .owl-qr-missing { color: #555; font-size: 13px; padding: 24px; text-align: center; }
.ndevr-forms .owl-sh-ok { color: var(--ndevr-ok); font-weight: 700; font-size: 15.5px; margin-bottom: 14px; }

/* Share panel wrapper (distinct from the circular .owl-links-btn so it isn't clamped to 30px). */
.ndevr-forms .owl-share-panel { display: block; width: 100%; }

/* ---- Bottom flyup sheet (overlay for upload / share / links panels) -------------------------- */
/* Overlay is appended to <body> with .ndevr-forms so the vars + form styles apply and a transformed
   host ancestor can't clip the fixed positioning. The sheet slides up; the backdrop fades in. */
.ndevr-forms.owl-flyup-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ndevr-forms .owl-flyup-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s ease; }
.ndevr-forms.owl-flyup-overlay.is-open .owl-flyup-backdrop { opacity: 1; }
/* Centered modal: floats in the middle of the screen, fades + lifts in slightly. */
.ndevr-forms .owl-flyup-sheet {
  position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--ndevr-card); border: 1px solid var(--ndevr-border);
  border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(28px) scale(.985);
  transition: opacity .26s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}
.ndevr-forms.owl-flyup-overlay.is-open .owl-flyup-sheet { opacity: 1; transform: translateY(0) scale(1); }
.ndevr-forms .owl-flyup-grip { flex: 0 0 auto; width: 42px; height: 4px; border-radius: 2px; background: var(--ndevr-border); margin: 10px auto 2px; cursor: grab; touch-action: none; }
.ndevr-forms .owl-flyup-content { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 22px 24px; }
/* Close ✕ — box locked across states so a host theme's button:hover can't resize it. */
.ndevr-forms .owl-flyup-x,
.ndevr-forms .owl-flyup-x:hover,
.ndevr-forms .owl-flyup-x:focus,
.ndevr-forms .owl-flyup-x:active {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 30px !important; height: 30px !important; min-width: 0 !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
  display: inline-grid !important; place-items: center !important;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  background: var(--ndevr-field) !important; color: var(--ndevr-muted) !important;
  box-shadow: none !important; transform: none !important; outline: none !important;
  cursor: pointer; -webkit-appearance: none; appearance: none; transition: color .15s, background .15s;
}
.ndevr-forms .owl-flyup-x:hover, .ndevr-forms .owl-flyup-x:focus { color: var(--ndevr-text) !important; background: #2a2f38 !important; }
@media (max-width: 560px) { .ndevr-forms .owl-flyup-content { padding: 8px 16px 22px; } }

/* Links manager — list of active share links for an object (view / delete / add) */
.ndevr-forms .owl-links-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.ndevr-forms .owl-link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--ndevr-field); border: 1px solid var(--ndevr-border);
}
.ndevr-forms .owl-link-main { flex: 1 1 auto; min-width: 0; }
.ndevr-forms .owl-link-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndevr-forms .owl-link-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ndevr-forms .owl-link-badge {
  font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--ndevr-muted); white-space: nowrap;
}
.ndevr-forms .owl-link-acts { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.ndevr-forms .owl-link-view,
.ndevr-forms .owl-link-view:hover,
.ndevr-forms .owl-link-view:focus {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  border: 0 !important; margin: 0 !important; min-height: 0 !important; cursor: pointer;
  padding: 6px 12px !important; border-radius: 8px !important;
  font: 700 12.5px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important;
  color: #1a1205 !important; background: var(--ndevr-accent) !important;
}
.ndevr-forms .owl-link-view:hover { filter: brightness(1.07); }
.ndevr-forms .owl-link-del,
.ndevr-forms .owl-link-del:hover,
.ndevr-forms .owl-link-del:focus {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  width: 30px !important; height: 30px !important; min-width: 0 !important; max-width: 30px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important;
  display: inline-grid !important; place-items: center !important;
  font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  color: #ff9aa3 !important; background: rgba(255,122,133,.12) !important; cursor: pointer;
}
.ndevr-forms .owl-link-del:hover { background: rgba(255,122,133,.22) !important; }
.ndevr-forms .owl-link-view[disabled], .ndevr-forms .owl-link-del[disabled] { filter: grayscale(.3) brightness(.85); cursor: default; }

/* Sharing options folded into the upload panel (OWLExportDialog-style "export + share" in one step) */
.ndevr-forms .owl-up-sharetoggle { margin: 6px 2px 12px; color: var(--ndevr-text); font-weight: 600; }
.ndevr-forms .owl-up-shareopts { border-top: 1px solid var(--ndevr-border); padding-top: 14px; margin-top: 4px; }

/* ============================================================================================
   Header "Log In / account" control (ndevr-nav-auth.js) — replaces the ribbon's Contact Us button.
   The button keeps the theme's .elementor-button look; we only add the icon + a logged-in tint and a
   centered modal hosting the ndevrAuth card. NOT scoped under .ndevr-forms (the button lives in the
   theme header), so selectors are deliberately specific to avoid leaking.
   ============================================================================================ */
/* Fully self-styled "clean" button — every visual property is forced with !important so the
   WP/Elementor theme's .elementor-button (uppercase, letter-spacing, gradient, gold outline) is
   completely overridden and the control looks like the native NDEVR UI on any host page. */
a.ndevr-auth-btn,
a.ndevr-auth-btn:link,
a.ndevr-auth-btn:visited,
a.ndevr-auth-btn:hover,
a.ndevr-auth-btn:focus,
a.ndevr-auth-btn:active {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
  width: auto !important; min-width: 0 !important; max-width: none !important; height: auto !important;
  padding: 8px 15px !important; margin: 0 !important;
  border: 0 !important; border-radius: 9px !important; outline: none !important;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important;
  text-indent: 0 !important; text-shadow: none !important; white-space: nowrap !important;
  color: #1a1205 !important; background: #f2a900 !important; background-image: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25) !important;
  cursor: pointer !important; transition: filter .15s, transform .05s, background .15s !important;
}
a.ndevr-auth-btn:hover { filter: brightness(1.06) !important; }
a.ndevr-auth-btn:active { transform: scale(.97) !important; }
/* Children never receive pointer events → every click lands on the <a> (fixes "only the corner works"). */
a.ndevr-auth-btn * { pointer-events: none !important; }
a.ndevr-auth-btn .elementor-button-content-wrapper { display: inline-flex !important; align-items: center !important; gap: 7px !important; background: none !important; }
a.ndevr-auth-btn .ndevr-auth-ico,
a.ndevr-auth-btn .ndevr-auth-caret { display: inline-flex !important; align-items: center !important; flex: 0 0 auto !important; }
a.ndevr-auth-btn .ndevr-auth-caret { opacity: .7; }
a.ndevr-auth-btn .ndevr-auth-label {
  display: inline-block !important; white-space: nowrap !important; overflow: hidden !important;
  text-overflow: ellipsis !important; max-width: 22ch !important; vertical-align: middle !important;
}
/* Logged-in reads as a quiet menu trigger (ghost pill), not a gold CTA. */
a.ndevr-auth-btn.ndevr-auth-in,
a.ndevr-auth-btn.ndevr-auth-in:link,
a.ndevr-auth-btn.ndevr-auth-in:visited,
a.ndevr-auth-btn.ndevr-auth-in:hover,
a.ndevr-auth-btn.ndevr-auth-in:focus,
a.ndevr-auth-btn.ndevr-auth-in:active {
  color: #e7e9ee !important; background: rgba(255, 255, 255, .10) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22) !important;
}
a.ndevr-auth-btn.ndevr-auth-in:hover { background: rgba(255, 255, 255, .17) !important; }

/* Mobile: a standalone icon-only circle injected next to the hamburger toggle (JS toggles its
   display to match the hamburger). Clicking shows the dropdown, which carries the username. */
button.ndevr-auth-mobile {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
  position: fixed !important; z-index: 2147482000 !important; top: 0; left: -9999px; /* JS pins it beside the toggle */
  display: none; align-items: center !important; justify-content: center !important;
  width: 40px !important; height: 40px !important; min-width: 0 !important; min-height: 0 !important; max-width: 40px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; outline: none !important;
  color: #1a1205 !important; background: #f2a900 !important; background-image: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25) !important; cursor: pointer !important;
}
button.ndevr-auth-mobile * { pointer-events: none !important; }
button.ndevr-auth-mobile svg { width: 18px; height: 18px; display: block; }
/* Logged-in: ghost circle to match the desktop signed-in look. */
button.ndevr-auth-mobile.ndevr-auth-in {
  color: #e7e9ee !important; background: rgba(255, 255, 255, .12) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .30) !important;
}

html.ndevr-auth-noscroll, html.ndevr-auth-noscroll body { overflow: hidden; }

/* ---- modal (logged-out sign in / create) -------------------------------------------------- */
.ndevr-auth-modal { position: fixed; inset: 0; z-index: 2147483000; display: none; }
.ndevr-auth-modal.is-open { display: block; }
.ndevr-auth-modal .ndevr-auth-backdrop { position: absolute; inset: 0; background: rgba(6, 8, 12, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ndevr-auth-modal .ndevr-auth-dialog {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ndevr-auth-modal .ndevr-auth-dialog .nf-card { max-width: none; margin: 0; }
/* Lock the card's typography so the WP/Elementor theme's heading/input fonts don't bleed in. */
.ndevr-auth-modal .nf-card,
.ndevr-auth-modal .nf-card input,
.ndevr-auth-modal .nf-card button,
.ndevr-auth-modal .nf-card label { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; }
/* Close button: hard-locked to a 34px circle so theme button rules can't stretch it into an ellipse. */
.ndevr-auth-modal .ndevr-auth-close,
.ndevr-auth-modal .ndevr-auth-close:hover,
.ndevr-auth-modal .ndevr-auth-close:focus,
.ndevr-auth-modal .ndevr-auth-close:active {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  position: absolute !important; top: 10px !important; right: 12px !important; z-index: 2 !important;
  width: 34px !important; height: 34px !important; min-width: 0 !important; min-height: 0 !important; max-width: 34px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important;
  display: inline-grid !important; place-items: center !important;
  font: 300 22px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important; text-transform: none !important; text-indent: 0 !important;
  color: var(--ndevr-text, #e7e9ee) !important; background: rgba(255, 255, 255, .10) !important;
  box-shadow: none !important; cursor: pointer; transition: background .15s;
}
.ndevr-auth-modal .ndevr-auth-close:hover { background: rgba(255, 255, 255, .2) !important; }
@media (max-width: 480px) { .ndevr-auth-modal .ndevr-auth-dialog { width: calc(100vw - 20px); } }

/* ---- dropdown (logged-in account menu) ---------------------------------------------------- */
/* Fully self-styled with !important + an explicit font so the theme can't restyle the menu items. */
.ndevr-auth-menu {
  position: fixed !important; z-index: 2147483000 !important; display: none;
  min-width: 220px; max-width: calc(100vw - 16px);
  padding: 6px !important; margin: 0 !important; border-radius: 12px !important;
  background: var(--ndevr-card, #23272f) !important; border: 1px solid var(--ndevr-border, #353b46) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45) !important;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  color: var(--ndevr-text, #e7e9ee) !important;
}
.ndevr-auth-menu.is-open { display: block; }
.ndevr-auth-menu .ndevr-auth-menu-head {
  padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--ndevr-border, #353b46);
  display: flex; flex-direction: column; gap: 1px;
}
.ndevr-auth-menu .ndevr-auth-menu-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndevr-auth-menu .ndevr-auth-menu-head small { color: var(--ndevr-muted, #9aa3b2); font-size: 11.5px; }
.ndevr-auth-menu .ndevr-auth-menu-item,
.ndevr-auth-menu .ndevr-auth-menu-item:hover,
.ndevr-auth-menu .ndevr-auth-menu-item:focus,
.ndevr-auth-menu .ndevr-auth-menu-item:visited {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important;
  display: block !important; width: 100% !important; text-align: left !important;
  padding: 10px 12px !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important;
  background: transparent !important; cursor: pointer !important;
  font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  color: var(--ndevr-text, #e7e9ee) !important; text-decoration: none !important; text-transform: none !important; letter-spacing: normal !important;
}
.ndevr-auth-menu .ndevr-auth-menu-item:hover { background: rgba(255, 255, 255, .07) !important; }
.ndevr-auth-menu .ndevr-auth-menu-danger { color: var(--ndevr-error, #ff7a85) !important; }
