/* CVJOBBOX Slide Verify - front end styles
   Uses the theme custom properties (--brand, --accent, --ink, --muted, --line,
   --bg) so the slider automatically follows all four cvjobbox skins and the
   [data-skin-next] switcher. Fallbacks make the component standalone-safe. */

/* Declared on the component roots (not :root) so body[data-skin="..."] overrides
   from the theme are inherited correctly when the skin switcher is used. */
.cvjbsv-wrap, .cvjbsv-fab {
  --cvjbsv-brand: var(--brand, #1b4dff);
  --cvjbsv-brand-deep: var(--brand-deep, #0d2f9e);
  --cvjbsv-brand-soft: var(--brand-soft, #eaf0ff);
  --cvjbsv-accent: var(--accent, #ff6a2b);
  --cvjbsv-ink: var(--ink, #10203f);
  --cvjbsv-muted: var(--muted, #8896ad);
  --cvjbsv-line: var(--line, #e6ebf3);
  --cvjbsv-bg: var(--bg, #f6f8fc);
  --cvjbsv-ok: #12946f;
  --cvjbsv-err: #c0392b;
  --cvjbsv-radius: 14px;
}

.cvjbsv-wrap,
.cvjbsv-wrap * { box-sizing: border-box; }

.cvjbsv-wrap {
  display: block;
  width: 100%;
  margin: 16px 0 10px;
  font-family: inherit;
  color: var(--cvjbsv-ink);
}

/* The theme already ships four .auth-drawer .cvjbsv-* rules; restate them here
   with the same specificity so this file also works without the theme. */
.auth-drawer .cvjbsv-wrap { display: block; width: 100%; margin: 16px 0 10px; }
.auth-drawer .cvjbsv-slider { min-width: 0; width: 100%; max-width: none; }
.auth-drawer .cvjbsv-label { color: var(--cvjbsv-muted); }
.auth-drawer .cvjbsv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.cvjbsv-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  letter-spacing: .3px;
  color: var(--cvjbsv-muted);
}

.cvjbsv-slider {
  position: relative;
  display: block;
  height: 46px;
  width: 100%;
  border-radius: 999px;
  background: var(--cvjbsv-bg);
  border: 1.5px solid var(--cvjbsv-line);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.cvjbsv-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, var(--cvjbsv-brand-soft), var(--cvjbsv-brand));
  opacity: .9;
  transition: width .08s linear, background .2s ease;
}

.cvjbsv-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 46px;
  font-size: 13px;
  letter-spacing: .2px;
  color: var(--cvjbsv-muted);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cvjbsv-handle {
  position: absolute;
  left: 3px; top: 3px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--cvjbsv-brand);
  box-shadow: 0 2px 8px rgba(16, 32, 63, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: grab;
  transition: transform .05s linear, box-shadow .18s ease, color .18s ease;
  outline: none;
}

.cvjbsv-handle:focus-visible { box-shadow: 0 0 0 3px var(--cvjbsv-brand-soft), 0 2px 8px rgba(16, 32, 63, .2); }
.cvjbsv-slider.is-drag .cvjbsv-handle { cursor: grabbing; box-shadow: 0 3px 14px rgba(16, 32, 63, .3); }
.cvjbsv-slider.is-drag .cvjbsv-fill { transition: none; }
.cvjbsv-slider.is-loading .cvjbsv-fill { opacity: .65; }
.cvjbsv-slider.is-loading .cvjbsv-handle { cursor: progress; }

.cvjbsv-slider.is-done { border-color: rgba(18, 148, 111, .45); background: rgba(18, 148, 111, .05); }
.cvjbsv-slider.is-done .cvjbsv-fill { background: linear-gradient(90deg, rgba(18,148,111,.18), var(--cvjbsv-ok)); opacity: 1; }
.cvjbsv-slider.is-done .cvjbsv-text { color: var(--cvjbsv-ok); font-weight: 700; }
.cvjbsv-slider.is-done .cvjbsv-handle { color: var(--cvjbsv-ok); cursor: default; }
.cvjbsv-slider.is-done .cvjbsv-handle::after { content: '\2713'; font-size: 18px; }
.cvjbsv-slider.is-done .cvjbsv-handle > span { display: none; }

.cvjbsv-slider.is-shake { animation: cvjbsv-shake .45s ease; }
@keyframes cvjbsv-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.cvjbsv-msg {
  min-height: 0;
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--cvjbsv-err);
}
.cvjbsv-msg:empty { display: none; }
.cvjbsv-msg.is-ok { color: var(--cvjbsv-ok); }

.cvjbsv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.cvjbsv-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--cvjbsv-muted);
}
.cvjbsv-hint svg { flex: none; }

button:disabled.cvjbsv-gated { opacity: .55; cursor: not-allowed; }

/* -------------------------------------------------------------------------
 * Mode B: shiwufa-style floating panel (activated with cvjbsv/mode = 'fab')
 * ---------------------------------------------------------------------- */
.cvjbsv-fab {
  position: fixed;
  right: 0;
  top: 24%;
  z-index: 9990;
  display: flex;
  align-items: center;
  font-family: inherit;
}

.cvjbsv-fab-tab {
  position: relative;
  z-index: 2;
  border: none;
  cursor: pointer;
  padding: 16px 9px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(160deg, var(--cvjbsv-brand-deep), var(--cvjbsv-brand));
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: -4px 6px 18px rgba(16, 32, 63, .24);
  transition: padding .2s ease, filter .2s ease;
}
.cvjbsv-fab-tab:hover { filter: brightness(1.12); }
.cvjbsv-fab.is-open .cvjbsv-fab-tab { padding-right: 4px; }

.cvjbsv-fab-panel {
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%) translateX(14px);
  width: 306px;
  max-width: calc(100vw - 70px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--cvjbsv-line);
  box-shadow: 0 18px 48px rgba(16, 32, 63, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.cvjbsv-fab.is-open .cvjbsv-fab-panel { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }

.cvjbsv-fab-close {
  position: absolute;
  right: 8px; top: 8px;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--cvjbsv-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cvjbsv-fab-close:hover { background: var(--cvjbsv-bg); color: var(--cvjbsv-ink); }

.cvjbsv-fab-head { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--cvjbsv-ink); }
.cvjbsv-fab-desc { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--cvjbsv-muted); }
.cvjbsv-fab .cvjbsv-wrap { margin: 0; }

.cvjbsv-auth[hidden] { display: none !important; }
.cvjbsv-auth { margin-top: 18px; }

.cvjbsv-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--cvjbsv-bg);
  border-radius: 10px;
}
.cvjbsv-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cvjbsv-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.cvjbsv-tab.is-on { background: #fff; color: var(--cvjbsv-brand); box-shadow: 0 2px 8px rgba(16, 32, 63, .1); }

.cvjbsv-form { display: none; }
.cvjbsv-form.is-on { display: block; }

.cvjbsv-field { display: block; margin-bottom: 10px; }
.cvjbsv-field > span { display: block; margin-bottom: 5px; font-size: 12.5px; color: var(--cvjbsv-muted); }
.cvjbsv-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--cvjbsv-line);
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--cvjbsv-ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cvjbsv-field input:focus { outline: none; border-color: var(--cvjbsv-brand); box-shadow: 0 0 0 3px var(--cvjbsv-brand-soft); }

.cvjbsv-btn {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--cvjbsv-brand);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.cvjbsv-btn:hover { filter: brightness(1.08); }
.cvjbsv-btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }

.cvjbsv-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 12px);
  z-index: 99999;
  max-width: 88vw;
  padding: 11px 20px;
  border-radius: 10px;
  background: rgba(16, 32, 63, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.cvjbsv-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .cvjbsv-fab { top: auto; bottom: 14px; }
  .cvjbsv-fab-tab { writing-mode: horizontal-tb; padding: 10px 14px; border-radius: 12px; }
  .cvjbsv-fab-panel { right: 0; top: auto; bottom: 54px; transform: translateY(0) translateX(0); max-height: calc(100vh - 90px); }
  .cvjbsv-fab.is-open .cvjbsv-fab-panel { transform: translateY(0) translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cvjbsv-fill, .cvjbsv-handle, .cvjbsv-fab-panel, .cvjbsv-toast { transition: none; }
  .cvjbsv-slider.is-shake { animation: none; }
}
