:root {
  --mv-font: "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mv-radius: 14px;
  --mv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mv-z: 30;
}

.mv-message,
.mv-check {
  --mv-danger: #f07178;
  --mv-danger-soft: rgba(240, 113, 120, 0.16);
  --mv-ok: #3ecf8e;
  --mv-ok-soft: rgba(62, 207, 142, 0.16);
  --mv-card: #16161c;
  --mv-border: rgba(255, 255, 255, 0.08);
  --mv-text: #f4f4f5;
  --mv-muted: #a1a1aa;
  --mv-track: rgba(255, 255, 255, 0.08);
  --mv-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px var(--mv-border);
  font-family: var(--mv-font);
  -webkit-font-smoothing: antialiased;
}

.mv-message[data-mv-theme="light"],
.mv-check[data-mv-theme="light"] {
  --mv-card: #fff;
  --mv-border: rgba(24, 24, 32, 0.08);
  --mv-text: #18181b;
  --mv-muted: #71717a;
  --mv-track: rgba(24, 24, 32, 0.08);
  --mv-shadow: 0 18px 48px rgba(24, 24, 32, 0.12), 0 0 0 1px var(--mv-border);
}

input.mv-invalid,
textarea.mv-invalid,
select.mv-invalid {
  border-color: #f07178;
  box-shadow: 0 0 0 3px rgba(240, 113, 120, 0.16);
}

[data-mv-style="bootstrap"] .mv-invalid,
[data-mv-style="bootstrap"].mv-invalid {
  border-color: var(--bs-danger, #dc3545);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb, 220, 53, 69), 0.25);
}

.mv-message {
  display: block;
  width: 100%;
  margin: 6px 0 0;
  color: var(--mv-danger);
  font-size: 0.82rem;
  line-height: 1.35;
}

.mv-message[hidden],
.mv-check[hidden] {
  display: none;
}

.mv-check {
  position: fixed;
  z-index: var(--mv-z);
  box-sizing: border-box;
  width: 280px;
  margin: 0;
  padding: 12px 12px 10px;
  border-radius: var(--mv-radius);
  color: var(--mv-text);
  background: var(--mv-card);
  box-shadow: var(--mv-shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: mv-in 0.28s var(--mv-ease) both;
}

.mv-check.is-leaving {
  animation: mv-out 0.22s var(--mv-ease) both;
}

.mv-check-bar {
  height: 3px;
  border-radius: 99px;
  background: var(--mv-track);
  overflow: hidden;
  margin-bottom: 10px;
}

.mv-check-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--mv-ok);
  transition: transform 0.28s var(--mv-ease);
}

.mv-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.mv-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mv-muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.mv-check-item.is-valid {
  color: var(--mv-text);
}

.mv-mark {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--mv-danger);
}

.mv-check-item.is-valid .mv-mark {
  color: var(--mv-ok);
}

.mv-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mv-stroke {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: mv-draw 0.45s var(--mv-ease) forwards;
}

.mv-stroke--mark {
  animation-delay: 0.1s;
}

.mv-check-done {
  margin: 0;
  min-height: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mv-ok);
}

.mv-check.is-complete .mv-check-done {
  margin-top: 8px;
}

.mv-check[data-mv-style="bootstrap"],
.mv-message[data-mv-style="bootstrap"] {
  --mv-font: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", sans-serif);
  --mv-radius: var(--bs-border-radius, 0.375rem);
  --mv-ok: var(--bs-success, #198754);
  --mv-danger: var(--bs-danger, #dc3545);
}

.mv-check[data-mv-style="bootstrap"] {
  font-family: var(--mv-font);
  border: 1px solid var(--mv-border, #dee2e6);
  background:
    linear-gradient(var(--bs-primary, #0d6efd), var(--bs-primary, #0d6efd)) 0 0 / 100% 3px no-repeat,
    var(--mv-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--bs-box-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));
}

.mv-check[data-mv-style="bootstrap"][data-mv-theme="light"],
.mv-message[data-mv-style="bootstrap"][data-mv-theme="light"] {
  --mv-card: var(--bs-body-bg, #fff);
  --mv-border: var(--bs-border-color, #dee2e6);
  --mv-text: var(--bs-body-color, #212529);
  --mv-muted: var(--bs-secondary-color, #6c757d);
  --mv-track: var(--bs-tertiary-bg, #f8f9fa);
}

.mv-check[data-mv-style="bootstrap"][data-mv-theme="dark"],
.mv-message[data-mv-style="bootstrap"][data-mv-theme="dark"] {
  --mv-card: #212529;
  --mv-border: rgba(255, 255, 255, 0.15);
  --mv-text: #f8f9fa;
  --mv-muted: #adb5bd;
  --mv-track: rgba(255, 255, 255, 0.08);
}

.mv-message[data-mv-style="bootstrap"] {
  color: var(--bs-danger, var(--mv-danger));
  font-family: var(--mv-font);
}

@keyframes mv-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes mv-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mv-out {
  to { opacity: 0; transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .mv-check,
  .mv-stroke,
  .mv-check-fill {
    animation: none;
    transition: none;
  }

  .mv-stroke {
    stroke-dashoffset: 0;
  }
}
