.product-order {
  display: contents;
}

.product-order-links {
  display: none;
  grid-column: 1 / -1;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  max-width: 100%;
}

.product-order-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 120px;
  height: 46px;
  border: 1px solid #d7d7dc;
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.product-order-link:hover {
  border-color: #1d1d1f;
  background: #eeeef0;
}

.product-order-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.product-order-link[aria-disabled="true"] {
  color: #68686e;
  cursor: not-allowed;
}

.product-order :focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 3px;
}

.product-order > .buy-now-button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

html.product-order-modal-open {
  overflow: hidden;
}

.product-order-modal {
  width: min(360px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.25);
}

.product-order-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.product-order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.product-order-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.product-order-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #f0f0f2;
  color: #1d1d1f;
  cursor: pointer;
}

.product-order-modal-close svg {
  width: 20px;
  height: 20px;
}

.product-order-modal-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-order-modal-links .product-order-link {
  width: 100%;
  min-height: 64px;
  gap: 10px;
  font-size: 16px;
}

.product-order-modal-links .product-order-icon {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
}

.product-order-modal :focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 3px;
}

@media (min-width: 761px) and (min-height: 600px) {
  .product-order-modal {
    width: min(520px, calc(100% - 64px));
    padding: 36px;
  }

  .product-order-modal-header {
    margin-bottom: 28px;
  }

  .product-order-modal-header h2 {
    font-size: 24px;
  }

  .product-order-modal-close {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .product-order-modal-close svg {
    width: 24px;
    height: 24px;
  }

  .product-order-modal-links {
    gap: 20px;
  }

  .product-order-modal-links .product-order-link {
    min-height: 104px;
    gap: 16px;
    font-size: 20px;
  }

  .product-order-modal-links .product-order-icon {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  .product-order {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
  }

  .product-order > .buy-now-button {
    margin: 0;
    padding: 0 18px;
    min-height: 46px;
    font-size: 14px;
    white-space: nowrap;
  }

  .product-order-links {
    position: absolute;
    top: 0;
    left: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin-top: 0;
    max-width: none;
    padding-left: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-12px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  }

  .product-order:hover .product-order-links,
  .product-order:focus-within .product-order-links,
  .product-order.is-open .product-order-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

}

@media (prefers-reduced-motion: reduce) {
  .product-order-links {
    transition: none;
  }
}
