/* Minimal buttons */
.button-1,
.wp-block-button .wp-block-button__link {
  display: inline-block;
  padding: 1.5rem 2rem;
  border: 0;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing:0.1rem;
  text-decoration: none;
  transition: background-color var(--transition-fast) ease-in-out,
              color var(--transition-fast) ease-in-out;
}

.button-1:hover,
.button-1:focus,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
  background: var(--color-white);
  color: var(--color-primary);
}

/* Outline variant for button-1 (transparent background, primary border) */
.button-1--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.button-1--outline-white {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-white);
}

.button-1--outline:hover,
.button-1--outline:focus {
  background: var(--color-primary);
  color: var(--color-white);
}

.button-1--outline-white:hover,
.button-1--outline-white:focus {
  background: var(--color-white);
  color: var(--color-primary);
}


/* Optional arrow modifier. Adds a CSS arrow and hover transition. */
.button-1--arrow {
  position: relative;
  /* reserve space for the arrow on the right */
  padding-right: calc(2rem + 2.5rem);
  transition: color var(--transition-fast) ease-in-out, background-color var(--transition-fast) ease-in-out;
}

.button-1--arrow::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  /* Use the SVG as a mask so the arrow inherits the button color (currentColor).
     Fallback to background-image is intentionally omitted because external
     SVGs cannot reliably inherit currentColor when referenced via url(). */
  background-color: currentColor;
  -webkit-mask-image: url('../../img/slide-next.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url('../../img/slide-next.svg');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: transform 0.28s var(--transition-fast), opacity 0.18s var(--transition-fast);
  opacity: 1;
}

/* Arrow moves on hover/focus for any button with the arrow modifier */
.button-1--arrow:hover::after,
.button-1--arrow:focus::after {
  transform: translateY(-50%) translateX(8px);
}

/* Make outline+arrow appear large and letterspaced like the design snippet */
.button-1--outline.button-1--arrow {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  text-transform: uppercase;
}

.button-1--outline.button-1--arrow:hover::after {
  transform: translateY(-50%) translateX(8px);
}

.button-1--outline.button-1--arrow:hover,
.button-1--outline.button-1--arrow:focus {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Ensure Gutenberg's .wp-block-button output uses the theme button styles
   and removes the default border-radius that WordPress may add. Also
   support when your modifier classes are placed on the wrapper div. */
.wp-block-button {
  /* Remove any default wrapper visuals so the real button lives on the link */
  display: inline-block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 1.5rem 2rem;
  border: 0;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1rem;
  text-decoration: none;
  transition: background-color var(--transition-fast) ease-in-out,
              color var(--transition-fast) ease-in-out;
  border-radius: 0 !important;
  position: relative;
  overflow: visible;
}

/* Outline variants applied when modifiers live on the wrapper (.wp-block-button) */
.wp-block-button.button-1--outline .wp-block-button__link {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.wp-block-button.button-1--outline {
  /* ensure the wrapper doesn't get its own border from elsewhere */
  border: 0;
  background: transparent;
}
.wp-block-button.button-1--outline-white .wp-block-button__link {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-white);
}
.wp-block-button.button-1--outline:hover .wp-block-button__link,
.wp-block-button.button-1--outline:focus .wp-block-button__link {
  background: var(--color-primary);
  color: var(--color-white);
}
.wp-block-button.button-1--outline-white:hover .wp-block-button__link,
.wp-block-button.button-1--outline-white:focus .wp-block-button__link {
  background: var(--color-white);
  color: var(--color-primary);
}

/* Arrow modifier when placed on the wrapper */
.wp-block-button.button-1--arrow .wp-block-button__link {
  position: relative;
  padding-right: calc(2rem + 2.5rem);
  transition: color var(--transition-fast) ease-in-out, background-color var(--transition-fast) ease-in-out;
}
.wp-block-button.button-1--arrow .wp-block-button__link::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  background-color: currentColor;
  -webkit-mask-image: url('../../img/slide-next.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url('../../img/slide-next.svg');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: transform 0.28s var(--transition-fast), opacity 0.18s var(--transition-fast);
  opacity: 1;
}
.wp-block-button.button-1--arrow:hover .wp-block-button__link::after,
.wp-block-button.button-1--arrow:focus .wp-block-button__link::after {
  transform: translateY(-50%) translateX(8px);
}

/* Make outline+arrow on wrapper appear like the design */
.wp-block-button.button-1--outline.button-1--arrow .wp-block-button__link {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  text-transform: uppercase;
}
.wp-block-button.button-1--outline.button-1--arrow:hover .wp-block-button__link::after {
  transform: translateY(-50%) translateX(8px);
}
.wp-block-button.button-1--outline.button-1--arrow:hover .wp-block-button__link,
.wp-block-button.button-1--outline.button-1--arrow:focus .wp-block-button__link {
  background: var(--color-primary);
  color: var(--color-white);
}
