/*
  Button 07 — Hold to Confirm — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is. `--button-accent` is a
  plain custom property — override it wherever this button is used.
*/

:root {
  --button-accent: #39ff14;
  --button-foreground: #0f172a;
}

.hold-btn {
  position: relative;
  display: inline-flex;
  height: 2.75rem;
  min-width: 11rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--button-foreground);
  background-color: #ffffff;
  padding: 0 1.5rem;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--button-foreground);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.hold-btn:active {
  transform: scale(0.98);
}

.hold-btn:focus-visible {
  outline: 2px solid var(--button-accent);
  outline-offset: 2px;
}

.hold-btn:disabled {
  cursor: not-allowed;
}

.hold-btn[data-phase="complete"] {
  background-color: var(--button-foreground);
  color: #ffffff;
}

.hold-btn__fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background-color: rgba(15, 23, 42, 0.08);
  transition-property: transform;
  transition-timing-function: linear;
  transition-duration: 0ms;
}

.hold-btn__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hold-btn__check {
  display: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.hold-btn[data-phase="complete"] .hold-btn__check {
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  .hold-btn {
    transition: background-color 150ms ease, color 150ms ease;
    transform: none;
  }

  .hold-btn:active {
    transform: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.button07-layout {
  display: flex;
  min-height: 20rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.button07-layout__panel {
  display: flex;
  width: 100%;
  max-width: 20rem;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.button07-layout__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}
.button07-layout__copy {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #737373;
}
