/*
  Button 01 — standalone HTML/CSS implementation.
  No build step, no framework, no external dependency: copy index.html and
  this file into any project as-is. `--button-accent` is a plain custom
  property, not tied to any design system — override it wherever this
  button is used to change the focus-visible color.
*/

:root {
  --button-accent: #39ff14;
  --button-foreground: #0f172a;
  --button-foreground-hover: #262f3d;
  --button-foreground-active: #020617;
  --button-border: #d4d4d8;
  --button-border-hover: #a1a1aa;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  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.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:active {
  transform: scale(0.97);
}

/* Sizes */
.btn--sm {
  height: 2.25rem;
  gap: 0.375rem;
  padding: 0 1.25rem;
  font-size: 0.875rem;
}

.btn--lg {
  height: 3rem;
  gap: 0.625rem;
  padding: 0 1.75rem;
  font-size: 1rem;
}

/* Variants */
.btn--primary {
  background-color: var(--button-foreground);
  border-color: var(--button-foreground);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--button-foreground-hover);
  border-color: var(--button-foreground-hover);
}

.btn--primary:active {
  background-color: var(--button-foreground-active);
  border-color: var(--button-foreground-active);
}

.btn--secondary {
  background-color: transparent;
  border-color: var(--button-border);
  color: var(--button-foreground);
}

.btn--secondary:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: var(--button-border-hover);
}

.btn--secondary:active {
  background-color: rgba(0, 0, 0, 0.05);
}

.btn--ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--button-foreground);
}

.btn--ghost:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.btn--ghost:active {
  background-color: rgba(0, 0, 0, 0.06);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
  transform: none;
}

.btn__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.btn--sm .btn__icon {
  width: 0.875rem;
  height: 0.875rem;
}

.btn--lg .btn__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn:hover .btn__icon {
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn__icon {
    transition: none;
  }

  .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);
}
.button01-layout {
  display: flex;
  min-height: 20rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.button01-layout__panel {
  display: flex;
  width: 100%;
  max-width: 42rem;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.button01-layout__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .button01-layout__panel {
    padding: 3rem;
  }
}
